Description
Ask your customers for their date of birth in My Account or on the classic
checkout, and a daily job emails each of them a coupon a week before their birthday —
so it is in their inbox in time, and still valid on the day.
How it works
One customer, one coupon a year — and the claim is atomic. A daily job is
exactly the job that runs twice: WP-Cron spawns on page loads, so two visitors
landing in the same second can both start the run, and a store with a real
system cron and WP-Cron left on has two by construction. The year is claimed
with a single database insert that succeeds for exactly one caller, so the
customer gets one birthday coupon however many runs overlap.
A birthday is a day in your shop’s calendar, not an interval. It is worked
out in your store’s own timezone, so a shop in Auckland does not send its
coupons on the wrong day for four months of the year. And 29 February is
observed on 28 February in a common year, because somebody born on it has a
birthday every year.
A date of birth is personal data, and this plugin treats it as such. It is
stored on the customer’s account and nowhere else, shown back to them in My
Account so they can change or clear it, included in WordPress’ own
personal-data export, removed by its erasure request, and deleted when the
plugin is uninstalled. The coupons themselves are never deleted: a code you
have already emailed is a promise.
Features
- A single-use coupon emailed a week before each customer’s birthday
- A percentage off, or a fixed amount off the cart
- An expiry in days, counted in your store’s own timezone and written into the
email - Codes with a random tail nobody can guess from their own
- The date asked for in My Account, on the classic checkout, or both
- Ordinary WooCommerce coupons, so they work at the classic checkout, the
block checkout and the Store API with nothing to configure - No tracking, no external requests, ever — this plugin never phones home
Careful about the details
- Every coupon is email-restricted, limited to one use in total and one per
customer, and marked individual-use. - A run that misses a day does not send a week of late birthday greetings when
it comes back. Those days have passed. - Birthdays are found with a meta query, so a store with fifty thousand
customers and two hundred birthdays reads two hundred rows. - A coupon that could not be minted gives its claim back, so the customer is
not silently skipped for the year. - The date is only ever stored on a customer account — a guest checkout has
nowhere to keep one.
The full edition
The full edition — Gatemi Birthday Coupons for WooCommerce, a separate
plugin sold on gatemi.com — adds a coupon on the anniversary of the day each customer joined
(which needs nothing from them at all), a head start of up to 60 days before
the birthday, your own subject and message for each email, your
own code prefix, a minimum the coupon may be spent against, a required date of
birth at the checkout, and a Birthday column on the Users list. Your settings
and every date carry over, and a customer who has already had this year’s
coupon here is never sent a second one.
Screenshots


FAQ
They can send it to a friend, but the friend cannot use it. Every coupon is restricted to the email address of the customer it was minted for.
What if the daily job runs twice?
Nothing happens the second time. The year is claimed with a single database insert before the coupon is created, so only one run can win it.
Does it work with the Checkout block?
The coupons do, at any checkout. The date field appears on the classic checkout only, so on a shop using the Checkout block customers give their date in My Account.
Do guests get one?
No. A date of birth is stored on a customer account, and a guest checkout has nowhere to keep one.
What happens to the dates if I delete the plugin?
They are deleted. A birthday is a fact about a person held for exactly one purpose, and a store that has removed this plugin has no purpose left to hold it for. The coupons already sent are kept.
Does this plugin send any data anywhere?
No. It makes no external requests of any kind.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“Birthday Coupons for WooCommerce – Gatemi” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Birthday Coupons for WooCommerce – Gatemi” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.0.0
- First release: a single-use coupon emailed a week before each customer’s birthday — claimed atomically for the year so two overlapping runs cannot send it twice, dated in the store’s own calendar with 29 February observed on the 28th in a common year, and never sent late — the date asked for at the checkout and in My Account where the customer can change or clear it, exported and erased through WordPress’ own privacy tools, and deleted at uninstall while the coupons already emailed are kept.
