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

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

add_action( 'woocommerce_product_set_stock_status', 'wp_kama_woocommerce_product_set_stock_status_action', 10, 3 );

/**
 * Function for `woocommerce_product_set_stock_status` action-hook.
 * 
 * @param  $product_id           
 * @param  $product_stock_status 
 * @param  $product              
 *
 * @return void
 */
function wp_kama_woocommerce_product_set_stock_status_action( $product_id, $product_stock_status, $product ){

	// action...
}
$product_id
-
$product_stock_status
-
$product
-

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

WC_Product_Data_Store_CPT::handle_updated_props()
woocommerce_product_set_stock_status
woocommerce/includes/data-stores/class-wc-product-data-store-cpt.php 673
do_action( 'woocommerce_product_set_stock_status', $product->get_id(), $product->get_stock_status(), $product );

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

woocommerce/includes/class-wc-post-data.php 39
add_action( 'woocommerce_product_set_stock_status', array( __CLASS__, 'delete_product_query_transients' ) );
woocommerce/includes/wc-term-functions.php 511
add_action( 'woocommerce_product_set_stock_status', 'wc_recount_after_stock_change' );