woocommerce_variation_set_stock хук-событиеWC 1.0

Fire actions to let 3rd parties know the stock changed.

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

add_action( 'woocommerce_variation_set_stock', 'wp_kama_woocommerce_variation_set_stock_action' );

/**
 * Function for `woocommerce_variation_set_stock` action-hook.
 * 
 * @param  $product_with_stock 
 *
 * @return void
 */
function wp_kama_woocommerce_variation_set_stock_action( $product_with_stock ){

	// action...
}
$product_with_stock
-

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

wc_update_product_stock()
woocommerce_variation_set_stock
WC_Product_Data_Store_CPT::handle_updated_props()
woocommerce_variation_set_stock
woocommerce/includes/wc-stock-functions.php 61
do_action( 'woocommerce_variation_set_stock', $product_with_stock );
woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php 663
do_action( 'woocommerce_variation_set_stock', $product );

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

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