woocommerce_updated_product_sales action-hookWC 3.6

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

WC_Product_Data_Store_CPT::update_product_sales()
woocommerce_updated_product_sales
woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php 1701
do_action( 'woocommerce_updated_product_sales', $product_id );

Where the hook is used in WooCommerce

Usage not found.