diff --git a/projects/packages/waf/src/class-waf-initializer.php b/projects/packages/waf/src/class-waf-initializer.php index c2720f83ca7cf..57a64306d1812 100644 --- a/projects/packages/waf/src/class-waf-initializer.php +++ b/projects/packages/waf/src/class-waf-initializer.php @@ -68,9 +68,6 @@ public static function init() { * @return bool|WP_Error True if the WAF activation is successful, WP_Error otherwise. */ public static function on_waf_activation() { - update_option( Waf_Runner::MODE_OPTION_NAME, 'normal' ); - add_option( Waf_Rules_Manager::AUTOMATIC_RULES_ENABLED_OPTION_NAME, false ); - try { Waf_Runner::activate(); ( new Waf_Standalone_Bootstrap() )->generate(); diff --git a/projects/packages/waf/src/class-waf-runner.php b/projects/packages/waf/src/class-waf-runner.php index e961c10bff087..a4275ae7e43b4 100644 --- a/projects/packages/waf/src/class-waf-runner.php +++ b/projects/packages/waf/src/class-waf-runner.php @@ -324,6 +324,7 @@ public static function activate() { add_option( self::MODE_OPTION_NAME, 'normal' ); } + add_option( Waf_Rules_Manager::AUTOMATIC_RULES_ENABLED_OPTION_NAME, false ); add_option( self::SHARE_DATA_OPTION_NAME, true ); self::initialize_filesystem();