woocommerce_updated_product_price
Fire an action for this direct update so it can be detected by other code.
Usage
add_action( 'woocommerce_updated_product_price', 'wp_kama_woocommerce_updated_product_price_action' ); /** * Function for `woocommerce_updated_product_price` action-hook. * * @param int $product_id Product ID that was updated directly. * * @return void */ function wp_kama_woocommerce_updated_product_price_action( $product_id ){ // action... }
- $product_id(int)
- Product ID that was updated directly.
Changelog
Since 3.6 | Introduced. |
Where the hook is called
woocommerce_updated_product_price
woocommerce_updated_product_price
woocommerce/includes/data-stores/class-wc-product-grouped-data-store-cpt.php 98
do_action( 'woocommerce_updated_product_price', $product->get_id() );
woocommerce/includes/data-stores/class-wc-product-variable-data-store-cpt.php 625
do_action( 'woocommerce_updated_product_price', $product->get_id() );