woocommerce_customer_stock_notification_should_skip_sending filter-hookWC 10.2.0

Filter: woocommerce_customer_stock_notification_should_skip_sending

Prevent or manage sending a specific notification.

Usage

add_filter( 'woocommerce_customer_stock_notification_should_skip_sending', 'wp_kama_woocommerce_customer_stock_notification_should_skip_sending_filter', 10, 2 );

/**
 * Function for `woocommerce_customer_stock_notification_should_skip_sending` filter-hook.
 * 
 * @param bool $should_skip     Whether to skip sending.
 * @param int  $notification_id The notification ID.
 *
 * @return bool
 */
function wp_kama_woocommerce_customer_stock_notification_should_skip_sending_filter( $should_skip, $notification_id ){

	// filter...
	return $should_skip;
}
$should_skip(true|false)
Whether to skip sending.
$notification_id(int)
The notification ID.

Changelog

Since 10.2.0 Introduced.

Where the hook is called

EligibilityService::should_skip_notification()
woocommerce_customer_stock_notification_should_skip_sending
woocommerce/src/Internal/StockNotifications/Utilities/EligibilityService.php 182
return (bool) apply_filters( 'woocommerce_customer_stock_notification_should_skip_sending', $should_skip, $notification->get_id() );

Where the hook is used in WooCommerce

Usage not found.