Skip to content

Commit

Permalink
Move add_action to register
Browse files Browse the repository at this point in the history
  • Loading branch information
Swanand01 committed May 22, 2024
1 parent a87297d commit 0a10307
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion includes/Settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ class Settings implements Service, Registerable, PluginUninstallAware {
*/
public function __construct( Shopping_Vendors $shopping_vendors ) {
$this->shopping_vendors = $shopping_vendors;
add_action( 'init', [ $this, 'prime_option_caches' ] );
}

/**
Expand Down Expand Up @@ -437,6 +436,8 @@ public function register(): void {
],
]
);

add_action( 'init', [ $this, 'prime_option_caches' ] );
}

/**
Expand Down

0 comments on commit 0a10307

Please sign in to comment.