woocommerce_product_type_changed
Usage
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
- -
Where the hook is called
woocommerce_product_type_changed
woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php 1200
do_action( 'woocommerce_product_type_changed', $product, $old_type, $new_type );
Where the hook is used in WooCommerce
woocommerce/includes/class-wc-post-data.php 49
add_action( 'woocommerce_product_type_changed', array( __CLASS__, 'product_type_changed' ), 10, 3 );