From a0dcfc1bade3c78f5106886f007236c99a3aee79 Mon Sep 17 00:00:00 2001
From: Philipp Stracker
Date: Wed, 23 Oct 2024 16:31:00 +0200
Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Integrate=20Redux=20store=20with=20?=
=?UTF-8?q?the=20welcome=20screen?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../js/Components/Screens/Onboarding/StepWelcome.js | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/modules/ppcp-settings/resources/js/Components/Screens/Onboarding/StepWelcome.js b/modules/ppcp-settings/resources/js/Components/Screens/Onboarding/StepWelcome.js
index b08b3107b..095136c56 100644
--- a/modules/ppcp-settings/resources/js/Components/Screens/Onboarding/StepWelcome.js
+++ b/modules/ppcp-settings/resources/js/Components/Screens/Onboarding/StepWelcome.js
@@ -4,6 +4,7 @@ import { Button, TextControl } from '@wordpress/components';
import PaymentMethodIcons from '../../ReusableComponents/PaymentMethodIcons';
import SettingsToggleBlock from '../../ReusableComponents/SettingsToggleBlock';
import Separator from '../../ReusableComponents/Separator';
+import { useOnboardingDetails } from '../../../data';
const StepWelcome = () => {
return (
@@ -72,6 +73,13 @@ const WelcomeFeatures = () => {
};
const WelcomeForm = () => {
+ const {
+ isSandboxMode,
+ setSandboxMode,
+ isManualConnectionMode,
+ setManualConnectionMode,
+ } = useOnboardingDetails();
+
const advancedUsersDescription = sprintf(
// translators: %s: Link to PayPal REST application guide
__(
@@ -92,6 +100,8 @@ const WelcomeForm = () => {
'Activate Sandbox mode to safely test PayPal with sample data. Once your store is ready to go live, you can easily switch to your production account.',
'woocommerce-paypal-payments'
) }
+ isToggled={ !! isSandboxMode }
+ setToggled={ setSandboxMode }
>