woocommerce_should_send_low_stock_notification хук-фильтрWC 4.7.0

Determine if the current product should trigger a low stock notification

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

add_filter( 'woocommerce_should_send_low_stock_notification', 'wp_kama_woocommerce_should_send_low_stock_notification_filter' );

/**
 * Function for `woocommerce_should_send_low_stock_notification` filter-hook.
 * 
 * @param  $product_id 
 *
 * @return 
 */
function wp_kama_woocommerce_should_send_low_stock_notification_filter( $product_id ){

	// filter...
	return $product_id;
}
$product_id
-

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

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

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

WC_Emails::low_stock()
woocommerce_should_send_low_stock_notification
woocommerce/includes/class-wc-emails.php 691
if ( false === apply_filters( 'woocommerce_should_send_low_stock_notification', true, $product->get_id() ) ) {

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

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