Add subscribe old customers field
[MAILPOET-2708]
This commit is contained in:
committed by
Veljko V
parent
d9d467b5db
commit
0109477597
@@ -2,12 +2,14 @@ import React from 'react';
|
||||
import { SaveButton } from 'settings/components';
|
||||
import EmailCustomizer from './email_customizer';
|
||||
import CheckoutOptin from './checkout_optin';
|
||||
import SubscribeOldCustomers from './subscribe_old_customers';
|
||||
|
||||
export default function WooCommerce() {
|
||||
return (
|
||||
<div className="mailpoet-settings-grid">
|
||||
<EmailCustomizer />
|
||||
<CheckoutOptin />
|
||||
<SubscribeOldCustomers />
|
||||
<SaveButton />
|
||||
</div>
|
||||
);
|
||||
|
@@ -0,0 +1,27 @@
|
||||
import React from 'react';
|
||||
import { t, onToggle } from 'common/functions';
|
||||
import { useSetting } from 'settings/store/hooks';
|
||||
import { Label, Inputs } from 'settings/components';
|
||||
|
||||
export default function SubscribeOldCustomers() {
|
||||
const [enabled, setEnabled] = useSetting('mailpoet_subscribe_old_woocommerce_customers', 'enabled');
|
||||
|
||||
return (
|
||||
<>
|
||||
<Label
|
||||
title={t('subscribeOldWCTitle')}
|
||||
description={t('subscribeOldWCDescription')}
|
||||
htmlFor="mailpoet_subscribe_old_wc_customers"
|
||||
/>
|
||||
<Inputs>
|
||||
<input
|
||||
type="checkbox"
|
||||
id="mailpoet_subscribe_old_wc_customers"
|
||||
data-automation-id="mailpoet_subscribe_old_wc_customers"
|
||||
checked={enabled === '1'}
|
||||
onChange={onToggle(setEnabled, '')}
|
||||
/>
|
||||
</Inputs>
|
||||
</>
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user