Skip to content

Commit

Permalink
Maintain test drive backward compatibility with version 8.1.0 (#9356)
Browse files Browse the repository at this point in the history
  • Loading branch information
vladolaru authored Aug 29, 2024
1 parent 1a45198 commit 3356d32
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: fix
Comment: Maintain test-drive backward compatibility with version 8.1.0.


5 changes: 3 additions & 2 deletions includes/class-wc-payments-onboarding-service.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}

/**
Expand Down

0 comments on commit 3356d32

Please sign in to comment.