Skip to content

Commit

Permalink
Add note about timing of loading JobInitializer
Browse files Browse the repository at this point in the history
  • Loading branch information
mikkamp committed Jan 14, 2025
1 parent 5633a40 commit 04102b6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Infrastructure/GoogleListingsAndAdsPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ function () {
add_action(
'init',
function () {
// register the job initializer only if it is available. see JobInitializer::is_needed.
// Register the job initializer only if it is available, see JobInitializer::is_needed.
// Note: ActionScheduler must be loaded after the init hook, so we can't load JobInitializer like a regular Service.
if ( $this->container->has( JobInitializer::class ) ) {
$this->container->get( JobInitializer::class )->register();
}
Expand Down

0 comments on commit 04102b6

Please sign in to comment.