diff --git a/changelog/fix-maintain-test-drive-backward-compatibility-with-8-1-0 b/changelog/fix-maintain-test-drive-backward-compatibility-with-8-1-0 new file mode 100644 index 00000000000..c22fd037a46 --- /dev/null +++ b/changelog/fix-maintain-test-drive-backward-compatibility-with-8-1-0 @@ -0,0 +1,5 @@ +Significance: patch +Type: fix +Comment: Maintain test-drive backward compatibility with version 8.1.0. + + diff --git a/includes/class-wc-payments-onboarding-service.php b/includes/class-wc-payments-onboarding-service.php index aa4f19864d6..56bb49f6607 100644 --- a/includes/class-wc-payments-onboarding-service.php +++ b/includes/class-wc-payments-onboarding-service.php @@ -256,10 +256,11 @@ public static function set_test_mode( bool $test_mode ): void { /** * Determine if test mode onboarding is enabled. * - * @return bool + * @return bool Whether test mode onboarding is enabled or not. */ public static function is_test_mode_enabled(): bool { - return 'yes' === get_option( self::TEST_MODE_OPTION, 'no' ); + // We support the `1` option value also for backward compatibility with version 8.1.0. + return in_array( get_option( self::TEST_MODE_OPTION, 'no' ), [ 'yes', '1' ], true ); } /**