WordPress action hook

wpml_admin_make_post_duplicates

Fired by 7 WordPress plugins, running on 313K+ sites between them.

How to use wpml_admin_make_post_duplicates

It's an action: your callback runs at that point and receives 1 argument. Nothing needs to be returned. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_action( 'wpml_admin_make_post_duplicates', function( $page_id ) {
	// Your code runs here.
}, 10, 1 );

Argument names come from Return Refund and Exchange For WooCommerce's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

7 plugins that fire wpml_admin_make_post_duplicates

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. Photo Gallery, Sliders, Proofing and Themes icon Photo Gallery, Sliders, Proofing and Themes300,000+ installs do_action( 'wpml_admin_make_post_duplicates', $displayed_gallery->ID ) src/Display/I18N.php:276
  2. Sensei LMS icon Sensei LMS9,000+ installs do_action( 'wpml_admin_make_post_duplicates', $element_id ) includes/wpml/trait-wpml-api.php:199
  3. Return Refund and Exchange For WooCommerce icon Return Refund and Exchange For WooCommerce4,000+ installs do_action( 'wpml_admin_make_post_duplicates', $page_id ) includes/class-woo-refund-and-exchange-lite-activator.php:122
  4. Redforts Hotel Booking Engine icon Redforts Hotel Booking Engine300+ installs do_action( 'wpml_admin_make_post_duplicates', $page_id ) includes/OHBE-main.php:122
  5. Pilo’Press icon Pilo’Press90+ installs do_action( 'wpml_admin_make_post_duplicates', $template_post_id ) includes/classes/admin/patterns/class-patterns.php:310
  6. CrocoAI Data Bridge icon CrocoAI Data BridgeFewer than 10 installs do_action( 'wpml_admin_make_post_duplicates', $sourceId ) src/Infrastructure/WpmlAdapter.php:459
  7. Stellar Content Studio for WooCommerce icon Stellar Content Studio for WooCommerceFewer than 10 installs do_action( 'wpml_admin_make_post_duplicates', $product_id ) includes/class-ecgb-wpml.php:36

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.