woocommerce_customer_stock_notification_throttle_threshold
woocommerce_customer_stock_notification_throttle_threshold
Appears in: woocommerce.10.2.2
Hook Type: filter
Displaying hooks found in version: woocommerce.10.2.2apply_filters('woocommerce_customer_stock_notification_throttle_threshold') is found 1 times:
- /src/Internal/StockNotifications/Utilities/EligibilityService.php line 200
* @since 10.2.0 * * @param int $threshold Throttle time in seconds should pass from the last notification delivery time. */ $threshold = (int) apply_filters( 'woocommerce_customer_stock_notification_throttle_threshold', self::SPAM_THRESHOLD ); if ( $threshold <= 0 ) { return false; } $last_notified = $notification->get_date_notified(); $is_throttled = $last_notified instanceof \WC_DateTime && $last_notified->getTimestamp() > ( time() - $threshold );