From 1cd38a396e6fa96b72c1b49c12c9ab738e59dd07 Mon Sep 17 00:00:00 2001 From: Rodrigo Primo Date: Thu, 8 Dec 2022 13:19:30 -0300 Subject: [PATCH] Add parent container to the list of options in the WooCommerce step This parent container is needed so that the last-child CSS pseudo selector that was added in #4602 works to remove the horizontal line from the last .mailpoet-wizard-woocommerce-option. [MAILPOET-4817] --- .../js/src/wizard/steps/woo_commerce_step.jsx | 94 ++++++++++--------- 1 file changed, 48 insertions(+), 46 deletions(-) diff --git a/mailpoet/assets/js/src/wizard/steps/woo_commerce_step.jsx b/mailpoet/assets/js/src/wizard/steps/woo_commerce_step.jsx index 0f2305a008..dfadede055 100644 --- a/mailpoet/assets/js/src/wizard/steps/woo_commerce_step.jsx +++ b/mailpoet/assets/js/src/wizard/steps/woo_commerce_step.jsx @@ -41,29 +41,65 @@ function WizardWooCommerceStep(props) {

{MailPoet.I18n.t('wooCommerceSetupInfo')}

- {props.showCustomersImportSetting ? ( +
+ {props.showCustomersImportSetting ? ( +
+
+ + setImportType(value ? 'subscribed' : 'unsubscribed') + } + name="mailpoet_woocommerce_import_type" + automationId="woocommerce_import_type" + /> +
+
+

+ {ReactStringReplace( + MailPoet.I18n.t('wooCommerceSetupImportInfo'), + /\[link\](.*?)\[\/link\]/, + (match) => ( + + {match} + + ), + )} +

+
+ GDPR + {MailPoet.I18n.t('wooCommerceSetupImportGDPRInfo')} +
+
+
+ ) : null}
- setImportType(value ? 'subscribed' : 'unsubscribed') - } - name="mailpoet_woocommerce_import_type" - automationId="woocommerce_import_type" + showError={submitted && allowed === null} + checked={allowed} + onCheck={(value) => setAllowed(value)} + name="mailpoet_woocommerce_tracking" + automationId="woocommerce_tracking" />

{ReactStringReplace( - MailPoet.I18n.t('wooCommerceSetupImportInfo'), + MailPoet.I18n.t('wooCommerceSetupTrackingInfo'), /\[link\](.*?)\[\/link\]/, (match) => ( @@ -74,44 +110,10 @@ function WizardWooCommerceStep(props) {

GDPR - {MailPoet.I18n.t('wooCommerceSetupImportGDPRInfo')} + {MailPoet.I18n.t('wooCommerceSetupTrackingGDPRInfo')}
- ) : null} -
-
- setAllowed(value)} - name="mailpoet_woocommerce_tracking" - automationId="woocommerce_tracking" - /> -
-