diff --git a/changelog.txt b/changelog.txt
index 9bd78be14c7..b32a5fa4c08 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,5 +1,8 @@
*** WooPayments Changelog ***
+= 8.1.1 - 2024-08-23 =
+* Fix - Fixed sandbox mode accounts being able to disable test mode for the payment gateway settings.
+
= 8.1.0 - 2024-08-21 =
* Add - Add button rules to appearance
* Add - Add heading rules to appearance
diff --git a/client/components/account-status/account-tools/index.tsx b/client/components/account-status/account-tools/index.tsx
index de772a63fb3..ad73a88fb08 100644
--- a/client/components/account-status/account-tools/index.tsx
+++ b/client/components/account-status/account-tools/index.tsx
@@ -12,7 +12,7 @@ import strings from './strings';
import './styles.scss';
import ResetAccountModal from 'wcpay/overview/modal/reset-account';
import { trackAccountReset } from 'wcpay/onboarding/tracking';
-import { isInDevMode } from 'wcpay/utils';
+import { isInTestModeOnboarding } from 'wcpay/utils';
interface Props {
openModal: () => void;
@@ -30,8 +30,8 @@ const handleReset = () => {
export const AccountTools: React.FC< Props > = () => {
const [ modalVisible, setModalVisible ] = useState( false );
- // Only render when in dev/sandbox mode.
- if ( ! isInDevMode() ) {
+ // Only render when in test/sandbox mode onboarding.
+ if ( ! isInTestModeOnboarding() ) {
return null;
}
diff --git a/client/components/account-status/account-tools/strings.tsx b/client/components/account-status/account-tools/strings.tsx
index 920e5990f0e..f47e8416574 100644
--- a/client/components/account-status/account-tools/strings.tsx
+++ b/client/components/account-status/account-tools/strings.tsx
@@ -7,11 +7,11 @@ import { __ } from '@wordpress/i18n';
/**
* Internal dependencies
*/
-import { isInDevMode } from 'utils';
+import { isInTestModeOnboarding } from 'utils';
export default {
title: __( 'Account Tools', 'woocommerce-payments' ),
- description: isInDevMode()
+ description: isInTestModeOnboarding()
? __(
'Your account is in sandbox mode. If you are experiencing problems completing account setup, or wish to test with a different email/country associated with your account, you can reset your account and start from the beginning.',
'woocommerce-payments'
diff --git a/client/components/account-status/account-tools/test/__snapshots__/index.test.tsx.snap b/client/components/account-status/account-tools/test/__snapshots__/index.test.tsx.snap
index 7ba3c01abd5..a3217d4df35 100644
--- a/client/components/account-status/account-tools/test/__snapshots__/index.test.tsx.snap
+++ b/client/components/account-status/account-tools/test/__snapshots__/index.test.tsx.snap
@@ -2,7 +2,7 @@
exports[`AccountTools should NOT render in live mode 1`] = `
{
it( 'should NOT render in live mode', () => {
global.wcpaySettings = {
- devMode: false,
+ testModeOnboarding: false,
};
const { container } = render(
@@ -31,9 +31,9 @@ describe( 'AccountTools', () => {
expect( container ).toMatchSnapshot();
} );
- it( 'should render in sandbox mode', () => {
+ it( 'should render in test/sandbox mode onboarding', () => {
global.wcpaySettings = {
- devMode: true,
+ testModeOnboarding: true,
};
const { container } = render(
diff --git a/client/components/account-status/test/index.js b/client/components/account-status/test/index.js
index cf9ea0f59b1..0bf382dd8db 100644
--- a/client/components/account-status/test/index.js
+++ b/client/components/account-status/test/index.js
@@ -122,7 +122,7 @@ describe( 'AccountStatus', () => {
} );
test( 'renders account tools', () => {
- global.wcpaySettings.devMode = true;
+ global.wcpaySettings.testModeOnboarding = true;
const { container: accountStatus } = renderAccountStatus(
{
diff --git a/client/components/sandbox-mode-switch-to-live-notice/modal/index.tsx b/client/components/sandbox-mode-switch-to-live-notice/modal/index.tsx
index 21ee42d83b7..10631780fae 100644
--- a/client/components/sandbox-mode-switch-to-live-notice/modal/index.tsx
+++ b/client/components/sandbox-mode-switch-to-live-notice/modal/index.tsx
@@ -6,6 +6,7 @@ import { __ } from '@wordpress/i18n';
import { addQueryArgs } from '@wordpress/url';
import { Button, Modal } from '@wordpress/components';
import { Icon, currencyDollar } from '@wordpress/icons';
+import { useState } from '@wordpress/element';
/**
* Internal dependencies
@@ -26,12 +27,16 @@ const SetupLivePaymentsModal: React.FC< Props > = ( {
source,
onClose,
}: Props ) => {
+ const [ isLoading, setIsLoading ] = useState( false );
+
const handleSetup = () => {
recordEvent( 'wcpay_onboarding_flow_setup_live_payments', {
from,
source,
} );
+ setIsLoading( true );
+
window.location.href = addQueryArgs( wcpaySettings.connectUrl, {
'wcpay-disable-onboarding-test-mode': 'true',
from,
@@ -45,6 +50,7 @@ const SetupLivePaymentsModal: React.FC< Props > = ( {
source,
} );
+ setIsLoading( false );
onClose();
};
@@ -85,7 +91,12 @@ const SetupLivePaymentsModal: React.FC< Props > = ( {
-
diff --git a/client/components/test-mode-notice/index.tsx b/client/components/test-mode-notice/index.tsx
index 5e799158204..6f13da9def2 100644
--- a/client/components/test-mode-notice/index.tsx
+++ b/client/components/test-mode-notice/index.tsx
@@ -26,7 +26,7 @@ interface Props {
currentPage: CurrentPage;
actions?: React.ComponentProps< typeof BannerNotice >[ 'actions' ];
isDetailsView?: boolean;
- isOnboardingTestMode?: boolean;
+ isTestModeOnboarding?: boolean;
}
const nounToUse = {
@@ -50,11 +50,11 @@ const verbToUse = {
const getNoticeContent = (
currentPage: CurrentPage,
isDetailsView: boolean,
- isOnboardingTestMode: boolean
+ isTestModeOnboarding: boolean
): JSX.Element => {
switch ( currentPage ) {
case 'overview':
- return isOnboardingTestMode ? (
+ return isTestModeOnboarding ? (
<>
{ interpolateComponents( {
mixedString: sprintf(
@@ -163,7 +163,7 @@ export const TestModeNotice: React.FC< Props > = ( {
currentPage,
actions,
isDetailsView = false,
- isOnboardingTestMode = false,
+ isTestModeOnboarding = false,
} ) => {
if ( ! isInTestMode() ) return null;
@@ -176,7 +176,7 @@ export const TestModeNotice: React.FC< Props > = ( {
{ getNoticeContent(
currentPage,
isDetailsView,
- isOnboardingTestMode
+ isTestModeOnboarding
) }
);
diff --git a/client/connect-account-page/index.tsx b/client/connect-account-page/index.tsx
index e4eb86aef2f..5f7a383d827 100644
--- a/client/connect-account-page/index.tsx
+++ b/client/connect-account-page/index.tsx
@@ -33,7 +33,7 @@ import InlineNotice from 'components/inline-notice';
import { WooPaymentMethodsLogos } from 'components/payment-method-logos';
import WooPaymentsLogo from 'assets/images/logo.svg?asset';
import { sanitizeHTML } from 'wcpay/utils/sanitize';
-import { isInDevMode } from 'wcpay/utils';
+import { isInTestModeOnboarding } from 'wcpay/utils';
import ResetAccountModal from 'wcpay/overview/modal/reset-account';
import { trackAccountReset } from 'wcpay/onboarding/tracking';
import SandboxModeSwitchToLiveNotice from 'wcpay/components/sandbox-mode-switch-to-live-notice';
@@ -96,8 +96,7 @@ const ConnectAccountPage: React.FC = () => {
const {
connectUrl,
connect: { availableCountries, country },
- devMode,
- onboardingTestMode,
+ testModeOnboarding,
isJetpackConnected,
isAccountConnected,
isAccountValid,
@@ -467,7 +466,7 @@ const ConnectAccountPage: React.FC = () => {
) }
{
// Show general sandbox notice when no account is connected but sandbox mode is active.
- ! isAccountConnected && devMode ? (
+ ! isAccountConnected && testModeOnboarding ? (
) : (
// If we already have a sandbox account connected (but in an invalid state) and
@@ -475,7 +474,7 @@ const ConnectAccountPage: React.FC = () => {
// show the switch to live sandbox notice.
isAccountConnected &&
! isAccountValid &&
- onboardingTestMode &&
+ testModeOnboarding &&
isJetpackConnected && (
{
isAccountConnected &&
( ! wcpaySettings.accountStatus
.detailsSubmitted ||
- isInDevMode() ) && (
+ isInTestModeOnboarding() ) && (
diff --git a/client/data/settings/hooks.js b/client/data/settings/hooks.js
index 8dca41224e6..921a04693ea 100644
--- a/client/data/settings/hooks.js
+++ b/client/data/settings/hooks.js
@@ -85,6 +85,12 @@ export const useTestMode = () => {
return [ isTestModeEnabled, updateIsTestModeEnabled ];
};
+export const useTestModeOnboarding = () =>
+ useSelect(
+ ( select ) => select( STORE_NAME ).getIsTestModeOnboarding(),
+ []
+ );
+
export const useDevMode = () =>
useSelect( ( select ) => select( STORE_NAME ).getIsDevModeEnabled(), [] );
diff --git a/client/data/settings/selectors.js b/client/data/settings/selectors.js
index 912f67606d6..6855eea10b2 100644
--- a/client/data/settings/selectors.js
+++ b/client/data/settings/selectors.js
@@ -153,6 +153,10 @@ export const getIsTestModeEnabled = ( state ) => {
return getSettings( state ).is_test_mode_enabled || false;
};
+export const getIsTestModeOnboarding = ( state ) => {
+ return getSettings( state ).is_test_mode_onboarding || false;
+};
+
export const getIsDevModeEnabled = ( state ) => {
return getSettings( state ).is_dev_mode_enabled || false;
};
diff --git a/client/globals.d.ts b/client/globals.d.ts
index a97d40f9590..7284347d48e 100644
--- a/client/globals.d.ts
+++ b/client/globals.d.ts
@@ -19,6 +19,7 @@ declare global {
};
fraudServices: unknown[];
testMode: boolean;
+ testModeOnboarding: boolean;
devMode: boolean;
isJetpackConnected: boolean;
isJetpackIdcActive: boolean;
@@ -97,7 +98,6 @@ declare global {
accountDefaultCurrency: string;
isFRTReviewFeatureActive: boolean;
frtDiscoverBannerSettings: string;
- onboardingTestMode: boolean;
onboardingFieldsData?: {
business_types: Country[];
mccs_display_tree: MccsDisplayTreeItem[];
diff --git a/client/overview/connection-sucess-notice.tsx b/client/overview/connection-sucess-notice.tsx
index 634d84c14fd..0afe9949e75 100644
--- a/client/overview/connection-sucess-notice.tsx
+++ b/client/overview/connection-sucess-notice.tsx
@@ -21,7 +21,7 @@ const ConnectionSuccessNotice: React.FC = () => {
},
status: accountStatus,
},
- onboardingTestMode,
+ testModeOnboarding,
} = wcpaySettings;
const DismissMenu = () => {
@@ -41,7 +41,7 @@ const ConnectionSuccessNotice: React.FC = () => {
);
};
const isPoDisabledOrCompleted = ! isPoEnabled || isPoComplete;
- return ! isDismissed && ! onboardingTestMode && isPoDisabledOrCompleted ? (
+ return ! isDismissed && ! testModeOnboarding && isPoDisabledOrCompleted ? (
diff --git a/client/overview/index.js b/client/overview/index.js
index a0312035349..5a2cc84ba52 100644
--- a/client/overview/index.js
+++ b/client/overview/index.js
@@ -67,7 +67,7 @@ const OverviewPage = () => {
wpcomReconnectUrl,
} = wcpaySettings;
- const isOnboardingTestMode = wcpaySettings.onboardingTestMode;
+ const isTestModeOnboarding = wcpaySettings.testModeOnboarding;
const { isLoading: settingsIsLoading } = useSettings();
const [
isTestDriveSuccessDisplayed,
@@ -175,7 +175,7 @@ const OverviewPage = () => {
) }
) }
- { isOnboardingTestMode ? (
+ { isTestModeOnboarding ? (
{
) : (
) }
diff --git a/client/overview/modal/reset-account/strings.tsx b/client/overview/modal/reset-account/strings.tsx
index c097c7f850a..d6bb17d68b7 100644
--- a/client/overview/modal/reset-account/strings.tsx
+++ b/client/overview/modal/reset-account/strings.tsx
@@ -7,11 +7,11 @@ import { __, sprintf } from '@wordpress/i18n';
/**
* Internal dependencies
*/
-import { isInDevMode } from 'utils';
+import { isInTestModeOnboarding } from 'utils';
export default {
title: __( 'Reset account', 'woocommerce-payments' ),
- description: isInDevMode()
+ description: isInTestModeOnboarding()
? __(
'In sandbox mode, you can reset your account and onboard again at any time. Please note that all current WooPayments account details, test transactions, and deposits history will be lost.',
'woocommerce-payments'
diff --git a/client/overview/task-list/tasks.tsx b/client/overview/task-list/tasks.tsx
index 4c5830eec24..7781cb6ff6f 100644
--- a/client/overview/task-list/tasks.tsx
+++ b/client/overview/task-list/tasks.tsx
@@ -19,7 +19,7 @@ import { CachedDispute } from 'wcpay/types/disputes';
import { TaskItemProps } from './types';
import { getAddApmsTask } from './tasks/add-apms-task';
import { getGoLiveTask } from './tasks/go-live-task';
-import { isInDevMode } from 'wcpay/utils';
+import { isInTestModeOnboarding } from 'wcpay/utils';
// Requirements we don't want to show to the user because they are too generic/not useful. These refer to Stripe error codes.
const requirementBlacklist = [ 'invalid_value_other' ];
@@ -88,7 +88,8 @@ export const getTasks = ( {
detailsSubmitted &&
! isPoInProgress;
- const isGoLiveTaskVisible = isInDevMode( false ) && showGoLiveTask;
+ const isGoLiveTaskVisible =
+ isInTestModeOnboarding( false ) && showGoLiveTask;
return [
isUpdateDetailsTaskVisible &&
diff --git a/client/settings/general-settings/index.js b/client/settings/general-settings/index.js
index 767a342face..da843f4c0cd 100644
--- a/client/settings/general-settings/index.js
+++ b/client/settings/general-settings/index.js
@@ -9,7 +9,7 @@ import interpolateComponents from '@automattic/interpolate-components';
/**
* Internal dependencies
*/
-import { useDevMode, useTestMode } from 'wcpay/data';
+import { useTestMode, useTestModeOnboarding } from 'wcpay/data';
import CardBody from '../card-body';
import InlineNotice from 'wcpay/components/inline-notice';
import SetupLivePaymentsModal from 'wcpay/components/sandbox-mode-switch-to-live-notice/modal';
@@ -20,7 +20,7 @@ import { recordEvent } from 'wcpay/tracks';
const GeneralSettings = () => {
const [ isEnabled, updateIsTestModeEnabled ] = useTestMode();
const [ modalVisible, setModalVisible ] = useState( false );
- const isDevModeEnabled = useDevMode();
+ const isTestModeOnboarding = useTestModeOnboarding();
const [ testModeModalVisible, setTestModeModalVisible ] = useState( false );
return (
@@ -28,7 +28,7 @@ const GeneralSettings = () => {
- { ! isDevModeEnabled && (
+ { ! isTestModeOnboarding && (
<>
{ __( 'Test mode', 'woocommerce-payments' ) }
@@ -82,7 +82,7 @@ const GeneralSettings = () => {
/>
>
) }
- { isDevModeEnabled && (
+ { isTestModeOnboarding && (
( {
useDevMode: jest.fn(),
useIsWCPayEnabled: jest.fn(),
useTestMode: jest.fn(),
+ useTestModeOnboarding: jest.fn(),
useEnabledPaymentMethodIds: jest.fn().mockReturnValue( [ [ 'card' ] ] ),
useWooPayEnabledSettings: jest.fn().mockReturnValue( [ false ] ),
usePaymentRequestEnabledSettings: jest.fn().mockReturnValue( [ false ] ),
@@ -21,6 +27,7 @@ jest.mock( 'wcpay/data', () => ( {
describe( 'GeneralSettings', () => {
beforeEach( () => {
useDevMode.mockReturnValue( false );
+ useTestModeOnboarding.mockReturnValue( false );
useIsWCPayEnabled.mockReturnValue( [ false, jest.fn() ] );
useTestMode.mockReturnValue( [ false, jest.fn() ] );
} );
diff --git a/client/settings/support-phone-input/index.js b/client/settings/support-phone-input/index.js
index f4741f4ddaf..5ae4c4466da 100644
--- a/client/settings/support-phone-input/index.js
+++ b/client/settings/support-phone-input/index.js
@@ -11,7 +11,7 @@ import { useState, useEffect, useRef } from 'react';
import {
useAccountBusinessSupportPhone,
useGetSavingError,
- useDevMode,
+ useTestModeOnboarding,
} from 'wcpay/data';
import PhoneNumberInput from 'wcpay/settings/phone-input';
@@ -23,9 +23,9 @@ const SupportPhoneInput = ( { setInputVallid } ) => {
const currentPhone = useRef( supportPhone ).current;
const isEmptyPhoneValid = supportPhone === '' && currentPhone === '';
- const isDevModeEnabled = useDevMode();
+ const isTestModeOnboarding = useTestModeOnboarding();
const isTestPhoneValid =
- isDevModeEnabled && supportPhone === '+10000000000';
+ isTestModeOnboarding && supportPhone === '+10000000000';
const [ isPhoneValid, setPhoneValidity ] = useState( true );
if ( ! isTestPhoneValid && ! isPhoneValid && ! isEmptyPhoneValid ) {
@@ -49,7 +49,7 @@ const SupportPhoneInput = ( { setInputVallid } ) => {
}, [ supportPhoneError, setInputVallid ] );
let labelText = __( 'Support phone number', 'woocommerce-payments' );
- if ( isDevModeEnabled ) {
+ if ( isTestModeOnboarding ) {
labelText += __(
' (+1 0000000000 can be used in sandbox mode)',
'woocommerce-payments'
diff --git a/client/settings/support-phone-input/test/support-phone-input.test.js b/client/settings/support-phone-input/test/support-phone-input.test.js
index a86c66ae12e..02e4ce0b92c 100644
--- a/client/settings/support-phone-input/test/support-phone-input.test.js
+++ b/client/settings/support-phone-input/test/support-phone-input.test.js
@@ -10,13 +10,13 @@ import SupportPhoneInput from '..';
import {
useGetSavingError,
useAccountBusinessSupportPhone,
- useDevMode,
+ useTestModeOnboarding,
} from 'wcpay/data';
jest.mock( 'wcpay/data', () => ( {
useAccountBusinessSupportPhone: jest.fn(),
useGetSavingError: jest.fn(),
- useDevMode: jest.fn(),
+ useTestModeOnboarding: jest.fn(),
} ) );
describe( 'SupportPhoneInput', () => {
@@ -103,7 +103,7 @@ describe( 'SupportPhoneInput', () => {
'+10000000000', // test phone number.
jest.fn(),
] );
- useDevMode.mockReturnValue( true );
+ useTestModeOnboarding.mockReturnValue( true );
const { container } = render( );
expect(
diff --git a/client/settings/transactions/test/index.test.js b/client/settings/transactions/test/index.test.js
index 407602e060b..0726bde8839 100644
--- a/client/settings/transactions/test/index.test.js
+++ b/client/settings/transactions/test/index.test.js
@@ -41,6 +41,7 @@ jest.mock( 'wcpay/data', () => ( {
useGetSavingError: jest.fn(),
useSavedCards: jest.fn(),
useDevMode: jest.fn(),
+ useTestModeOnboarding: jest.fn(),
useCardPresentEligible: jest.fn(),
} ) );
diff --git a/client/utils/index.js b/client/utils/index.js
index 71f4c971138..bc24bf44f4f 100644
--- a/client/utils/index.js
+++ b/client/utils/index.js
@@ -42,6 +42,26 @@ export const isInTestMode = ( fallback = false ) => {
return !! wcpaySettings.testMode || fallback;
};
+/**
+ * Returns true if WooPayments is in test/sandbox mode onboarding, false otherwise.
+ *
+ * @param {boolean} fallback Fallback in case test/sandbox mode onboarding value can't be found
+ * (for example if the wcpaySettings are undefined).
+ *
+ * @return {boolean} True if in test/sandbox mode onboarding, false otherwise.
+ * Fallback value if test/sandbox mode onboarding value can't be found.
+ */
+export const isInTestModeOnboarding = ( fallback = false ) => {
+ if (
+ ! isObject( wcpaySettings ) ||
+ ! wcpaySettings.hasOwnProperty( 'testModeOnboarding' )
+ ) {
+ return fallback;
+ }
+
+ return !! wcpaySettings.testModeOnboarding || fallback;
+};
+
/**
* Returns true if WooPayments is in dev/sandbox mode, false otherwise.
*
diff --git a/includes/admin/class-wc-payments-admin.php b/includes/admin/class-wc-payments-admin.php
index 018b5d6e1d8..b56c63f24a3 100644
--- a/includes/admin/class-wc-payments-admin.php
+++ b/includes/admin/class-wc-payments-admin.php
@@ -808,11 +808,18 @@ private function get_js_settings(): array {
Logger::log( sprintf( 'WooPayments JS settings: Could not determine if WCPay should be in test mode! Message: %s', $e->getMessage() ), 'warning' );
}
+ $test_mode_onboarding = false;
+ try {
+ $test_mode_onboarding = WC_Payments::mode()->is_test_mode_onboarding();
+ } catch ( Exception $e ) {
+ Logger::log( sprintf( 'WooPayments JS settings: Could not determine if WCPay should be in sandbox mode! Message: %s', $e->getMessage() ), 'warning' );
+ }
+
$dev_mode = false;
try {
$dev_mode = WC_Payments::mode()->is_dev();
} catch ( Exception $e ) {
- Logger::log( sprintf( 'WooPayments JS settings: Could not determine if WCPay should be in sandbox mode! Message: %s', $e->getMessage() ), 'warning' );
+ Logger::log( sprintf( 'WooPayments JS settings: Could not determine if WCPay should be in dev mode! Message: %s', $e->getMessage() ), 'warning' );
}
$connect_url = WC_Payments_Account::get_connect_url();
@@ -838,7 +845,7 @@ private function get_js_settings(): array {
'connectIncentive' => $connect_incentive,
'devMode' => $dev_mode,
'testMode' => $test_mode,
- 'onboardingTestMode' => WC_Payments_Onboarding_Service::is_test_mode_enabled(),
+ 'testModeOnboarding' => $test_mode_onboarding,
// Set this flag for use in the front-end to alter messages and notices if on-boarding has been disabled.
'onBoardingDisabled' => WC_Payments_Account::is_on_boarding_disabled(),
'onboardingFieldsData' => $this->onboarding_service->get_fields_data( get_user_locale() ),
diff --git a/includes/admin/class-wc-rest-payments-settings-controller.php b/includes/admin/class-wc-rest-payments-settings-controller.php
index 314faad586f..ace444f5ae1 100644
--- a/includes/admin/class-wc-rest-payments-settings-controller.php
+++ b/includes/admin/class-wc-rest-payments-settings-controller.php
@@ -481,6 +481,7 @@ public function get_settings(): WP_REST_Response {
'is_wcpay_enabled' => $this->wcpay_gateway->is_enabled(),
'is_manual_capture_enabled' => 'yes' === $this->wcpay_gateway->get_option( 'manual_capture' ),
'is_test_mode_enabled' => WC_Payments::mode()->is_test(),
+ 'is_test_mode_onboarding' => WC_Payments::mode()->is_test_mode_onboarding(),
'is_dev_mode_enabled' => WC_Payments::mode()->is_dev(),
'is_multi_currency_enabled' => WC_Payments_Features::is_customer_multi_currency_enabled(),
'is_wcpay_subscriptions_enabled' => WC_Payments_Features::is_wcpay_subscriptions_enabled(),
diff --git a/package-lock.json b/package-lock.json
index 2a8e7ae7c3d..096544d3a4a 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "woocommerce-payments",
- "version": "8.1.0",
+ "version": "8.1.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "woocommerce-payments",
- "version": "8.1.0",
+ "version": "8.1.1",
"hasInstallScript": true,
"license": "GPL-3.0-or-later",
"dependencies": {
diff --git a/package.json b/package.json
index a93c5308eee..e77b6facd24 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "woocommerce-payments",
- "version": "8.1.0",
+ "version": "8.1.1",
"main": "webpack.config.js",
"author": "Automattic",
"license": "GPL-3.0-or-later",
diff --git a/readme.txt b/readme.txt
index 2b540d8eebd..9dd1f7c1582 100644
--- a/readme.txt
+++ b/readme.txt
@@ -4,7 +4,7 @@ Tags: woocommerce payments, apple pay, credit card, google pay, payment, payment
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.3
-Stable tag: 8.1.0
+Stable tag: 8.1.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
@@ -94,6 +94,10 @@ Please note that our support for the checkout block is still experimental and th
== Changelog ==
+= 8.1.1 - 2024-08-23 =
+* Fix - Fixed sandbox mode accounts being able to disable test mode for the payment gateway settings.
+
+
= 8.1.0 - 2024-08-21 =
* Add - Add button rules to appearance
* Add - Add heading rules to appearance
diff --git a/woocommerce-payments.php b/woocommerce-payments.php
index b3aa0cdfe1e..16cecd888db 100644
--- a/woocommerce-payments.php
+++ b/woocommerce-payments.php
@@ -11,7 +11,7 @@
* WC tested up to: 9.2.0
* Requires at least: 6.0
* Requires PHP: 7.3
- * Version: 8.1.0
+ * Version: 8.1.1
* Requires Plugins: woocommerce
*
* @package WooCommerce\Payments