Show note if tracking is disabled
[MAILPOET-3743]
This commit is contained in:
@@ -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>
|
||||
</>
|
||||
|
@@ -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 site’s 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'),
|
||||
|
Reference in New Issue
Block a user