pre_as_enqueue_async_action хук-фильтрWC 1.0

Provides an opportunity to short-circuit the default process for enqueuing async actions.

Returning a value other than null from the filter will short-circuit the normal process. The expectation in such a scenario is that callbacks will return an integer representing the enqueued action ID (enqueued using some alternative process) or else zero.


add_filter( 'pre_as_enqueue_async_action', 'wp_kama_pre_as_enqueue_async_action_filter', 10, 5 );

 * Function for `pre_as_enqueue_async_action` filter-hook.
 * @param int|null $pre_option The value to return instead of the option value.
 * @param string   $hook       Action hook.
 * @param array    $args       Action arguments.
 * @param string   $group      Action group.
 * @param int      $priority   Action priority.
 * @return int|null
function wp_kama_pre_as_enqueue_async_action_filter( $pre_option, $hook, $args, $group, $priority ){

	// filter...
	return $pre_option;
The value to return instead of the option value.
Action hook.
Action arguments.
Action group.
Action priority.

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

woocommerce/packages/action-scheduler/functions.php 39
$pre = apply_filters( 'pre_as_enqueue_async_action', null, $hook, $args, $group, $priority );

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

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