Show note if tracking is disabled

[MAILPOET-3743]
This commit is contained in:
Brezo Cordero
2021-10-18 14:05:25 -05:00
committed by Veljko V
parent e828546fa9
commit 0c72f41b8d
2 changed files with 12 additions and 0 deletions

View File

@@ -4,9 +4,12 @@ import { t } from 'common/functions';
import Radio from 'common/form/radio/radio';
import { useSetting } from 'settings/store/hooks';
import { Label, Inputs } from 'settings/components';
import { GlobalContext } from 'context/index.jsx';
export default function Tracking() {
const [enabled, setEnabled] = useSetting('tracking', 'enabled');
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const { features } = React.useContext<any>(GlobalContext);
return (
<>
@@ -36,6 +39,14 @@ export default function Tracking() {
/>
<label htmlFor="tracking-disabled">
{t('no')}
{features.isSupported('re-engagement-email') && !enabled && (
<>
<br />
<span className="mailpoet-note">
{t('re-engagementDisabledBecauseTrackingIs')}
</span>
</>
)}
</label>
</Inputs>
</>

View File

@@ -128,6 +128,7 @@
'installMembers': __('Install the plugin [link]Members[/link] (free) to manage permissions.'),
'trackingTitle': __('Open and click tracking'),
'trackingDescription': __('Enable or disable open and click tracking.'),
're-engagementDisabledBecauseTrackingIs': __('Note: re-engagement emails are disabled when tracking is disabled.'),
'transactionalTitle': _x('Send all sites emails with…', 'Transational emails settings title'),
'transactionalDescription': _x('Choose which method to send all your WordPress emails (e.g. password reset, new registration, WooCommerce invoices, etc.).', 'Transational emails settings description'),
'transactionalLink': _x('Read more.', 'Transactional emails settings link'),