Last updated July 11, 2026, Version 0.34
Filter the geocode enqueue call to take over scheduling.
Return any non-null value from this filter to suppress both the
WP-Cron dedup check and the wp_schedule_single_event() call —
a companion plugin that hooks this filter (e.g. one that routes
the fanout through Action Scheduler) owns the full scheduling
path end-to-end, including its own dedup since the fanout
by-passes wp_next_scheduled(). Mirrors the core pre_* filter
convention: null means “pass through to the default”;
everything else, including falsy values like false, 0, and
'', short-circuits.
Core ignores the return value past the null check, so a callback
is free to return whatever is useful to itself — the established
convention is a scheduler-specific identifier (e.g. the Action
Scheduler action ID returned by as_enqueue_async_action()) so
other filters / debug tooling downstream can correlate the job.
Auto-generated Example
add_filter(
'gatherpress_async_geocode_pre_enqueue_job',
function(
mixed $short_circuit,
string $hook,
array $args
) {
// Your code here.
return $short_circuit;
},
10,
3
);
Parameters
mixed$short_circuitNon-null to suppress the default enqueue.string$hookAction hook name fired when the job runs.array$argsArgs passed to the action hook when the job runs:array( $post_id ).
Files
apply_filters(
'gatherpress_async_geocode_pre_enqueue_job',
null,
self::CRON_ACTION,
$args
)