Skip to main content

How to Add a Newsletter Signup Checkbox to WooCommerce Checkout

· 9 min read
PostBeagle Team
Email Marketing Experts

Checkout is where your most valuable subscribers show up: people who just paid you. But WooCommerce doesn't ship with a newsletter checkbox, so many stores either collect nothing there or quietly add every buyer to the list, which leads to spam complaints and a list full of people who never asked to hear from you.

This guide covers how to add an opt-in checkbox that works on both the new block checkout and the classic one, how to word and place it, and what to do with the people who tick it.

First, decide what the checkbox is for​

A checkout opt-in only does one job: it records that this customer agreed to get marketing email from you. Order confirmations, shipping notices and refund emails are transactional, and they go out whether the box is ticked or not. Keep the two separate in your head, and in your settings, from the start.

That separation matters for two reasons:

  • The law. In the EU and UK, consent has to be an active choice. Recital 32 of the GDPR says plainly that "silence, pre-ticked boxes or inactivity should not … constitute consent." The UK ICO's electronic mail marketing guidance describes a narrow "soft opt-in" for existing customers, but it comes with conditions, including giving people a clear chance to refuse when you collect their address. A checkbox is the simplest way to meet any of these rules.
  • The inbox. Gmail and Yahoo now hold bulk senders to a spam complaint limit. Google's sender guidelines ask you to keep the spam rate reported in Postmaster Tools below 0.3%. Customers who were subscribed without asking are the ones who press "Report spam", and those reports count against your domain, including the order emails that come from it.

So: an unticked box, clear wording, and a record of who ticked it and when.

Where to put the checkbox​

You have two sensible spots:

  1. Next to the email field (the "Contact information" section on the block checkout). The shopper is already thinking about their email address, and the field is high on the page where nobody misses it.
  2. Just above the "Place order" button. This is where consent and terms checkboxes usually live on the classic checkout. It's visible, but it competes with the terms checkbox and the payment form.

Either works. What doesn't work is hiding it in an expandable "additional information" panel or styling it so it reads like fine print. A checkbox nobody notices gives you a small list. A checkbox people tick by mistake gives you complaints.

How to word it​

Say what they'll get, how often, and how to leave. Some examples:

  • "Email me about new products and offers (about twice a month). Unsubscribe anytime."
  • "Send me restock alerts and the monthly newsletter. You can unsubscribe in one click."
  • "Yes, I'd like 10% off my next order and occasional emails about new arrivals."

Avoid these:

  • Double negatives, such as "Uncheck this box if you don't want to stop receiving…". They confuse people and won't hold up as consent.
  • Bundling, such as one checkbox for "I accept the terms and want to receive marketing email". Terms acceptance is required to buy and marketing isn't, so they need separate boxes.
  • Vague promises, such as "Stay in the loop". It doesn't tell the customer what they're signing up for, and people who don't know what they signed up for are the ones who report your mail as spam.

Option 1: Use your email platform's WooCommerce plugin​

For most stores this is the right answer. Mailchimp, Klaviyo and most other email tools that work with WooCommerce have a plugin that adds a checkbox and sends opted-in customers to your list. The setup is usually the same: install the plugin, connect it with an API key, choose the list, edit the checkbox text, and turn off any "checked by default" option.

Before you pick one, check three things:

  1. Does it work with the block checkout? WooCommerce's newer Checkout block ignores the old woocommerce_checkout_fields filter that many plugins were built on, so older plugins can show nothing at all on stores that use it.
  2. Does it sync only the people who ticked the box? Some plugins sync every customer and mark the ones who didn't opt in as "non-subscribed", which is fine. Others subscribe everyone, which isn't.
  3. What happens if the email service is down? A failed API call should be logged, and the order should still go through.

The free PostBeagle for WooCommerce plugin covers all three. It adds the opt-in checkbox with your own text and supports the block checkout through WooCommerce's Additional Checkout Fields API as well as the classic one. Customers who tick it are added to the list you choose once the order is placed. If that API call fails, the error is logged and the order still goes through. If the list uses double opt-in in PostBeagle, new subscribers get a confirmation email. The plugin documentation walks through setup.

Option 2: Add the checkbox yourself​

If you'd rather not add a plugin, or your email tool doesn't have one, you can add the field with a few lines of PHP in a small custom plugin or your theme's functions.php. Which code you need depends on the checkout your store uses.

Block checkout​

The Checkout block has its own API for extra fields. Register a checkbox in the contact section on the woocommerce_init action, following WooCommerce's Additional Checkout Fields documentation:

add_action( 'woocommerce_init', function () {
woocommerce_register_additional_checkout_field(
array(
'id' => 'my-store/newsletter-opt-in',
'label' => 'Email me about new products and offers. Unsubscribe anytime.',
'location' => 'contact',
'type' => 'checkbox',
)
);
} );

Leave out 'required' => true. On a checkbox, that would force shoppers to tick it before they can pay, which is exactly the forced consent you're trying to avoid.

WooCommerce saves the value to the order and, for contact fields, to the customer. You can read it back with the CheckoutFields helper's get_field_from_object() method, as the same documentation shows, and hand it to whatever sends your email.

Classic checkout​

On the shortcode-based checkout, output the field before the "Place order" button and save it with the order:

add_action( 'woocommerce_review_order_before_submit', function () {
woocommerce_form_field(
'newsletter_opt_in',
array(
'type' => 'checkbox',
'class' => array( 'form-row-wide' ),
'label' => 'Email me about new products and offers. Unsubscribe anytime.',
),
0
);
} );

add_action( 'woocommerce_checkout_create_order', function ( $order, $data ) {
if ( ! empty( $_POST['newsletter_opt_in'] ) ) {
$order->update_meta_data( '_newsletter_opt_in', 'yes' );
$order->update_meta_data( '_newsletter_opt_in_at', gmdate( 'c' ) );
}
}, 10, 2 );

The third argument to woocommerce_form_field() is the field's starting value, and 0 keeps the box unticked.

Either way, the checkbox only records consent. Getting those customers into your email tool is a second job, through its API or a CSV export, and that's the part a plugin takes off your hands.

If anyone ever asks "why am I getting this?", you want to answer with specifics. For each subscriber, keep:

  • the date and time they opted in,
  • where they opted in (checkout, footer form, popup),
  • the exact wording of the checkbox at that time.

The classic snippet above stores the first two on the order. When you change the checkbox text, write down the date, so you know which wording each customer agreed to.

What to do after someone ticks the box​

A checkbox on its own just grows a list. What you send next decides whether that list is worth anything.

  • Send a welcome email right away. Someone who just ordered is paying attention. A short welcome that confirms what they signed up for, and how often you'll write, sets expectations and lowers the chance of a spam report later.
  • Don't email the people who didn't tick it. That includes past customers you're importing from an old system. If you can't show they agreed, send them a single invitation to join, or leave them out.
  • Watch clicks, replies and orders, not opens. Apple Mail Privacy Protection loads images automatically for many readers, so open rates come out inflated. Clicks and revenue tell you whether checkout subscribers are actually engaged.
  • Clean out bounces and unsubscribes promptly. Mailing addresses that bounce hurts your sender reputation. If your emails are already drifting toward spam, this guide to why emails go to spam covers the other common causes.

In PostBeagle, the checkout opt-in can start a welcome automation directly. The plugin also tags customers as first-time or repeat buyers, so the welcome can be different for someone who has ordered five times. Unsubscribes and bounces drop off automatically, and pricing counts only active subscribers.

A quick checklist​

  • The checkbox is unticked by default.
  • The label says what they'll get, roughly how often, and that they can unsubscribe.
  • Marketing consent is separate from the terms-and-conditions checkbox.
  • It shows up on the checkout your store actually uses, whether block or classic. Place a test order to check.
  • Only customers who ticked it reach your marketing list.
  • You store when, where and under what wording each person opted in.
  • A welcome email goes out soon after the opt-in.
  • Order and shipping emails still go to everyone, regardless of the box.

If you run WooCommerce and want the checkbox, the sync and the welcome flow handled in one place, you can connect your store to PostBeagle for free and have the opt-in live in about ten minutes.