Merge pull request #1685 from mailpoet/new-woo-email
Disable WooCommerce emails for free users [MAILPOET-1674]
This commit is contained in:
@@ -28,7 +28,9 @@ class NewsletterTypes extends React.Component {
|
|||||||
|
|
||||||
return _.map(window.mailpoet_automatic_emails, (automaticEmail) => {
|
return _.map(window.mailpoet_automatic_emails, (automaticEmail) => {
|
||||||
const email = automaticEmail;
|
const email = automaticEmail;
|
||||||
const onClick = _.partial(this.setupNewsletter, automaticEmail.slug);
|
const onClick = window.mailpoet_premium_active
|
||||||
|
? _.partial(this.setupNewsletter, automaticEmail.slug)
|
||||||
|
: undefined;
|
||||||
email.action = (() => (
|
email.action = (() => (
|
||||||
<div>
|
<div>
|
||||||
<a
|
<a
|
||||||
@@ -36,6 +38,7 @@ class NewsletterTypes extends React.Component {
|
|||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
role="button"
|
role="button"
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
|
disabled={!window.mailpoet_premium_active}
|
||||||
>
|
>
|
||||||
{ MailPoet.I18n.t('setUp') }
|
{ MailPoet.I18n.t('setUp') }
|
||||||
</a>
|
</a>
|
||||||
|
Reference in New Issue
Block a user