woocommerce_customer_stock_notifications_next_batch_delay filter-hookWC 10.2.0

Filter: woocommerce_customer_stock_notifications_next_batch_delay

Usage

add_filter( 'woocommerce_customer_stock_notifications_next_batch_delay', 'wp_kama_woocommerce_customer_stock_notifications_next_batch_delay_filter', 10, 2 );

/**
 * Function for `woocommerce_customer_stock_notifications_next_batch_delay` filter-hook.
 * 
 * @param int $delay      Delay time in seconds before next batch.
 * @param int $product_id Product ID being scheduled.
 *
 * @return int
 */
function wp_kama_woocommerce_customer_stock_notifications_next_batch_delay_filter( $delay, $product_id ){

	// filter...
	return $delay;
}
$delay(int)
Delay time in seconds before next batch.
$product_id(int)
Product ID being scheduled.

Changelog

Since 10.2.0 Introduced.

Where the hook is called

JobManager::schedule_next_batch_for_product()
woocommerce_customer_stock_notifications_next_batch_delay
woocommerce/src/Internal/StockNotifications/AsyncTasks/JobManager.php 134
$delay = (int) apply_filters( 'woocommerce_customer_stock_notifications_next_batch_delay', 0, $product_id );

Where the hook is used in WooCommerce

Usage not found.