Skip to content

Commit

Permalink
Do not activate the plugin on cron requests.
Browse files Browse the repository at this point in the history
  • Loading branch information
kagg-design committed Jul 23, 2024
1 parent e4b8970 commit c2e00b3
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/php/Main.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,18 @@ class Main {
* @return void
*/
public function init(): void {
if ( Request::is_xml_rpc() || wp_doing_cron() ) {
if ( Request::is_xml_rpc() ) {
return;
}

( new Fix() )->init();

new Migrations();

if ( wp_doing_cron() ) {
return;
}

( new Fix() )->init();

add_action( 'plugins_loaded', [ $this, 'init_hooks' ], -PHP_INT_MAX );
}

Expand Down

0 comments on commit c2e00b3

Please sign in to comment.