woocommerce_updated_product_price хук-событиеWC 3.6

Fire an action for this direct update so it can be detected by other code.

Использование

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.

Список изменений

С версии 3.6 Введена.

Где вызывается хук

WC_Product_Grouped_Data_Store_CPT::update_prices_from_children()
woocommerce_updated_product_price
WC_Product_Variable_Data_Store_CPT::sync_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() );

Где используется хук в WooCommerce

Использование не найдено.