woocommerce_updated_product_sales
Fire an action for this direct update so it can be detected by other code.
Usage
add_action( 'woocommerce_updated_product_sales', 'wp_kama_woocommerce_updated_product_sales_action' ); /** * Function for `woocommerce_updated_product_sales` action-hook. * * @param int $product_id Product ID that was updated directly. * * @return void */ function wp_kama_woocommerce_updated_product_sales_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_sales
woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php 1701
do_action( 'woocommerce_updated_product_sales', $product_id );