woocommerce_customer_stock_notifications_signup_rate_limit_options │ filter-hook │ WC 11.2.0

Filter: woocommerce_customer_stock_notifications_signup_rate_limit_options

Options for rate limiting stock notification sign-ups. Mirrors the shape of woocommerce_store_api_rate_limit_options.

  • enabled: switches the limiter off entirely. Default true.
  • proxy_support: read the client address from forwarding headers (X-Real-IP, X-Forwarded-For) rather than REMOTE_ADDR. Enable only when the store is behind a proxy, load balancer or CDN that sets them, since the headers are otherwise spoofable. Default false.
  • client_delay: seconds a client (the logged-in user, or the IP address for guests) has to wait between two sign-up attempts. 0 switches this limit off. Default 30.
  • email_delay: seconds an e-mail address has to wait between two sign-up attempts.

0 switches this limit off. Default 30.

Usage

add_filter( 'woocommerce_customer_stock_notifications_signup_rate_limit_options', 'wp_kama_woocommerce_customer_stock_notifications_signup_rate_limit_options_filter' );

/**
 * Function for `woocommerce_customer_stock_notifications_signup_rate_limit_options` filter-hook.
 * 
 * @param array $options Rate limiting options.
 *
 * @return array
 */
function wp_kama_woocommerce_customer_stock_notifications_signup_rate_limit_options_filter( $options ){
	// filter...
	return $options;
}
$options(array)
Rate limiting options.

Changelog

Since 11.2.0 Introduced.

Where the hook is called

SignupRateLimiter::get_options()
woocommerce_customer_stock_notifications_signup_rate_limit_options
woocommerce/src/Internal/StockNotifications/Frontend/SignupRateLimiter.php 213
$options = apply_filters( 'woocommerce_customer_stock_notifications_signup_rate_limit_options', $defaults );

Where the hook is used in WooCommerce

Usage not found.