Skip Navigation
availability:

WooCommerce Multilingual Version: 3.5

description:

Run actions after the post meta fields are being set for a duplicated product.

type:
action
category:
Updating Content
parameters:
add_action( 'wcml_after_duplicate_product_post_meta', 'the_callback_function', 10, 3 );

There are three parameters being passed to this action:

$original_product_id
(integer) The ID of original product.
$translated_product_id
(integer) The ID of translated product.
$data
(array) The original product data.
hook example usage:

Example

add_action( 'wcml_after_duplicate_product_post_meta', 'my_custom_action', 10, 3 );

function my_custom_action( $original_product_id, $duplicated_product_id, $data ) {

	// my custom action

}