woocommerce_product_duplicate_before_save

The WooCommerce woocommerce product duplicate before save hook.

Description

do_action( 'woocommerce_product_duplicate_before_save', (unknown) $duplicate, (unknown) $product ); 

Parameters (2)

0. $duplicate (unknown)
The duplicate.
1. $product (unknown)
The product.

Usage

To run the hook, copy the example below.
  1. // run the action 
  2. do_action( 'woocommerce_product_duplicate_before_save', $duplicate, $product ); 
The following example is for adding a hook callback.
  1. // define the woocommerce_product_duplicate_before_save callback 
  2. function action_woocommerce_product_duplicate_before_save( $duplicate, $product ) { 
  3. // make action magic happen here... 
  4. }; 
  5.  
  6. // add the action 
  7. add_action( 'woocommerce_product_duplicate_before_save', 'action_woocommerce_product_duplicate_before_save', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the action 
  2. remove_action( 'woocommerce_product_duplicate_before_save', 'action_woocommerce_product_duplicate_before_save', 10, 2 ); 

Defined (2)

The action is defined in the following location(s).

/includes/admin/class-wc-admin-duplicate-product.php  
  1. do_action( 'woocommerce_product_duplicate_before_save', $duplicate, $product ); 
  1. do_action( 'woocommerce_product_duplicate_before_save', $child_duplicate, $child );