From 0eb932a73ed7311ab40ca48c71504bb4528faa6c Mon Sep 17 00:00:00 2001 From: Narek Zakarian Date: Tue, 5 Aug 2025 11:45:23 +0400 Subject: [PATCH] use boolean as option value --- modules/ppcp-settings/src/Ajax/SwitchSettingsUiEndpoint.php | 2 +- modules/ppcp-settings/src/Data/Definition/TodosDefinition.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ppcp-settings/src/Ajax/SwitchSettingsUiEndpoint.php b/modules/ppcp-settings/src/Ajax/SwitchSettingsUiEndpoint.php index a1bc218d0..62f2a5eaf 100644 --- a/modules/ppcp-settings/src/Ajax/SwitchSettingsUiEndpoint.php +++ b/modules/ppcp-settings/src/Ajax/SwitchSettingsUiEndpoint.php @@ -72,7 +72,7 @@ class SwitchSettingsUiEndpoint { $this->settings_data_migration->migrate(); - update_option( self::OPTION_NAME_MIGRATION_IS_DONE, 'yes' ); + update_option( self::OPTION_NAME_MIGRATION_IS_DONE, true ); wp_send_json_success(); } catch ( Exception $error ) { wp_send_json_error( array( 'message' => $error->getMessage() ), 500 ); diff --git a/modules/ppcp-settings/src/Data/Definition/TodosDefinition.php b/modules/ppcp-settings/src/Data/Definition/TodosDefinition.php index a8018842c..6c5bc4b0e 100644 --- a/modules/ppcp-settings/src/Data/Definition/TodosDefinition.php +++ b/modules/ppcp-settings/src/Data/Definition/TodosDefinition.php @@ -256,7 +256,7 @@ class TodosDefinition { * @return bool True if the migration is marked as done, false otherwise. */ protected function is_settings_migration_done(): bool { - return 'yes' === get_option( SwitchSettingsUiEndpoint::OPTION_NAME_MIGRATION_IS_DONE ); + return '1' === get_option( SwitchSettingsUiEndpoint::OPTION_NAME_MIGRATION_IS_DONE ); } /**