Adding an Opt-in Checkbox to the WooCommerce Checkout Page

If you have the WooCommerce plugin installed, you can add an opt-in checkbox from MailPoet to your checkout page so your customers can subscribe to your mailing list and receive emails sent from the MailPoet plugin.

All customers will be automatically added to the WooCommerce Customers list by default, but their status as subscribers will depend on your settings in the MailPoet > Settings > WooCommerce tab.

There you can enable Opt-in on checkout, customize the message that will be displayed on the checkout page next to the opt-in checkbox, and you can also choose from different positions as shown in the image below:

Note: the position options only work if your checkout page is set up with the shortcode. On the block-based checkout, see the next section.

Opt-in checkbox on the block-based checkout

If your checkout page uses the Checkout block (the WooCommerce default), the checkbox is the MailPoet Marketing Opt-in block. It sits inside the Contact Information block, below the email address field.

While Opt-in on checkout is enabled, the block is locked so it can’t be deleted by accident. You can still move it up or down inside Contact Information.

The locked MailPoet Marketing Opt-in block selected inside the Contact information section of the Checkout block, with a lock icon in its toolbar

To remove the block:

  1. Go to MailPoet > Settings > WooCommerce, turn off Opt-in on checkout, and click Save settings.
  2. Open your checkout page in the editor.
  3. Select the MailPoet Marketing Opt-in block, click the three-dot menu in its toolbar and choose Delete.
  4. Save the page.

With Opt-in on checkout turned off, the block doesn’t show anything to customers, so you only need to delete it if you want it gone from the editor.

Opt-in on checkout enabled

You can also select other lists to automatically add your subscribers to, so they will be added to the WooCommerce Customers list and to a different MailPoet list of your choice. Leave it empty if you want the subscribers to be added to the WooCommerce Customers list only.

Users who check this checkbox on checkout will be added to the WooCommerce Customers list (and any other list of your choice) as “Unconfirmed” until they confirm their subscription via email. Users who didn’t check this checkbox will be added as “Unsubscribed”.

If Subscriber choice (open and click tracking) is set to ask, a second checkbox appears below this one, asking customers to allow tracking of email opens and link clicks. It’s separate from the subscription. See How to let subscribers opt out of email open and click tracking.

WooCommerce checkout with the MailPoet opt-in checkbox and a separate tracking consent checkbox below it

In the ” Checkbox opt-in message” option, you can customize the opt-in message that will be displayed on the checkout page. The WooCommerce opt-in default message and all strings are translatable.

In the ” Checkbox opt-in position” option, you can customize where the checkbox is positioned on the checkout page. 

Please note that transactional emails sent from WordPress or WooCommerce itself or any 3rd-party plugin will be sent regardless of checking or not checking this checkbox. This opt-in checkbox is exclusively related to the emails created and set up using the MailPoet plugin.


Existing subscribers

When the WooCommerce Checkout page loads, the checkbox should be unchecked by default. 

If the customer doesn’t opt-in to receive newsletters, no action will be taken, and their status will remain the same (e.g., if previously “Subscribed”, they remain subscribed).

When the customer opts in by checking the checkbox on the checkout page, they will be subscribed to the list (upon double sign-up confirmation, according to MailPoet’s Settings).


Opt-in on checkout disabled

If the “Opt-in on checkout” option is disabled, meaning there’s no checkbox displayed on the checkout page to subscribe to a mailing list, the subscribers will be added to MailPoet > Subscribers as “Unsubscribed”, however, they don’t belong to any list.