woocommerce_product_duplicate_before_save
This action can be used to modify the object further before it is created - it will be passed by reference.
Использование
add_action( 'woocommerce_product_duplicate_before_save', 'wp_kama_woocommerce_product_duplicate_before_save_action', 10, 2 ); /** * Function for `woocommerce_product_duplicate_before_save` action-hook. * * @param $duplicate * @param $product * * @return void */ function wp_kama_woocommerce_product_duplicate_before_save_action( $duplicate, $product ){ // action... }
- $duplicate
- -
- $product
- -
Список изменений
С версии 3.0 | Введена. |
Где вызывается хук
woocommerce_product_duplicate_before_save
woocommerce/includes/admin/class-wc-admin-duplicate-product.php 178
do_action( 'woocommerce_product_duplicate_before_save', $duplicate, $product );
woocommerce/includes/admin/class-wc-admin-duplicate-product.php 214
do_action( 'woocommerce_product_duplicate_before_save', $child_duplicate, $child );