add_action( 'wcml_after_duplicate_product', 'the_callback_function', 10, 2 );
- Type
- action
- Category
- Inserting Content
- WooCommerce Multilingual Version
- 3.5
Description
Run actions after duplicating a product.
Arguments
There are two parameters being passed to this action:- $new_id
- (integer) The ID of new product.
- $post_to_duplicate
- (object) The original post data to duplicate.
Example usage
Example
add_action( 'wcml_after_duplicate_product', 'my_custom_action', 10, 2 );
function my_custom_action( $original_product_id, $new_id, $post_to_duplicate ) {
// my custom action
}