woocommerce_product_type_changed
Использование
add_action( 'woocommerce_product_type_changed', 'wp_kama_woocommerce_product_type_changed_action', 10, 3 ); /** * Function for `woocommerce_product_type_changed` action-hook. * * @param $product * @param $old_type * @param $new_type * * @return void */ function wp_kama_woocommerce_product_type_changed_action( $product, $old_type, $new_type ){ // action... }
- $product
- -
- $old_type
- -
- $new_type
- -
Где вызывается хук
woocommerce_product_type_changed
woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php 1008
do_action( 'woocommerce_product_type_changed', $product, $old_type, $new_type );
Где используется хук в WooCommerce
woocommerce/includes/class-wc-post-data.php 41
add_action( 'woocommerce_product_type_changed', array( __CLASS__, 'product_type_changed' ), 10, 3 );