
外掛標籤
開發者團隊
② 後台搜尋「Birthday Coupons for WooCommerce – Gatemi」→ 直接安裝(推薦)
原文外掛簡介
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.
