use boolean as option value

This commit is contained in:
Narek Zakarian 2025-08-05 11:45:23 +04:00
parent ca86cb83ae
commit 0eb932a73e
No known key found for this signature in database
GPG key ID: 07AFD7E7A9C164A7
2 changed files with 2 additions and 2 deletions

View file

@ -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 );

View file

@ -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 );
}
/**