Gift Cards and Store Credit
Gift cards sell themselves in December and cause trouble the rest of the year. WooCommerce has no gift card product, so stores fake it with one-off coupons that lose track of what’s left, or add a gift card plugin plus a wallet plugin for store credit. And a refund still goes back to the card, even when the customer would happily take credit instead.
Gift Cards and Store Credit sells gift cards as ordinary products. Each card bought emails a code to the recipient, and the code is spent in the coupon field, in part or in full. Signed-in customers can move a card onto their account as store credit, and you can refund an order to store credit instead of the card. Every balance keeps a ledger, so you can always see who holds what and why.
Turn On the Module
Open Stackless → Dashboard and switch on Gift Cards and Store Credit. It’s in the Sales & invoices group. The settings are under Stackless → Settings → Gift Cards and Store Credit:
- Code prefix: up to 8 letters or digits in front of new codes, such as GIFT. Empty by default.
- Gift cards expire after (months): 0 means never, up to 120. Many countries set a minimum, so check yours. Store credit on accounts never expires.
- Store credit at checkout: applies a signed-in customer’s store credit by itself. On by default, and customers can remove it.
- Refund to store credit: shows a Refund to store credit box on paid orders. On by default.
The module pauses while WooCommerce Gift Cards, PW WooCommerce Gift Cards, YITH WooCommerce Gift Cards or TeraWallet is active.
Sell a Gift Card
- Create a simple product, for example “Gift card, $50”.
- In Product data, tick Gift card next to Virtual and Downloadable.
- Set the Regular price to the card’s value, then publish.
Each unit bought issues one card worth the product’s regular price, in your store currency. A sale price lowers what the buyer pays, not what the card is worth, so a $50 card on sale for $40 still carries $50. For several amounts, make one product per amount.
The module doesn’t touch the product’s shipping or tax settings. Tick Virtual if there’s nothing to ship, and set Tax status the way your store treats gift cards.
What the Buyer Fills In
The product page gets a Who is it for? box:
- Recipient email: leave it empty to receive the card yourself.
- Recipient name
- From: the sender’s name. Left empty, the email uses the billing name.
- Message: up to 500 characters.
Each recipient becomes its own cart line, shown with a To line. A quantity of 3 on one line sends 3 cards to that recipient.
How Codes Are Issued and Emailed
Cards are issued once the order is paid (payment complete, Processing or Completed), and only once, even when two payment notifications arrive together. For each unit, Stackless:
- creates a code in four groups of four characters, such as
GIFT-ABCD-EFGH-JKMN-PQRSwith a prefix. The codes leave out 0, O, 1, I and L, and customers can type them in any case, with or without spaces. - emails the card to the recipient, or to the buyer when no recipient was given
- sets the expiry date from your expiry setting
The subject is “[sender] sent you a gift card for [store name]”. The sender is the From name, or the buyer’s billing name when From is empty. The email shows the message, the value, the code, the expiry date when there is one and a Start shopping button. The order gets a note such as “2 gift cards issued and emailed.”, and a line with a recipient shows Gift card for and their address.
Gift card emails go out from your live store only, never from a staging copy of it.
Redeem at Checkout
Customers type the code in the coupon field on the cart or checkout. The card then works like a coupon worth its balance:
- It pays for items and the tax on them, and never more than the balance. Whatever it doesn’t cover is paid the usual way.
- It doesn’t pay for shipping or fees.
- It can’t pay for another gift card.
- Whatever isn’t spent stays on the card for next time. One order can use several cards.
- The order summary shows it as
Gift card ••••-PQRS, with only the last group of the code.
The balance comes off when the order is placed, and two orders can’t spend the same money. If a payment fails and the customer tries again, only the difference is taken. When an order is cancelled or refunded in full, what it took goes back to the card, with a note on the order.
An empty, disabled or expired card is refused with “This gift card has no balance left or is no longer active.”
Store Credit on the Account
Store credit is a balance on a customer’s account instead of a code. Signed-in customers get a Store credit tab in My Account, just before Log out, with:
- Your balance, in the currency they’re shopping in
- Add a gift card: they enter a code and click Add to my balance, and the card’s whole balance moves onto the account
- History: the last 30 movements, such as Spent, Refund, Gift card added and Added by the store
With Store credit at checkout on, the balance applies by itself on the cart and checkout as Store credit. A customer who removes it keeps it off for the rest of their session. Only the account it belongs to can spend it.
Store credit never expires, even when it came from a card that would have.
Refund to Store Credit
Paid orders get a Refund to store credit box on the order screen. Enter the Amount (in the order’s currency, filled in with what’s left to refund) and a Reason, click Refund to store credit and confirm.
- WooCommerce records a refund with the reason “Refunded to store credit: [your reason]”. No money goes back to the payment method, and nothing is restocked.
- A customer with an account gets the amount added to their store credit. They aren’t emailed; it shows in their Store credit tab and applies at checkout.
- A guest order gets a new gift card for the amount, emailed to the billing address. It follows your expiry setting.
- The order gets a note such as “$20.00 refunded to store credit (••••-PQRS).”
You can’t refund more than what’s left on the order.
Manage Balances
Stackless → Gift cards lists every gift card and store credit balance with its code, type, recipient, balance, issued amount, status and date. Search by code or email. The line at the top shows the outstanding balance across active cards: what the store owes. Expired cards keep counting until you disable them.
Issue a Balance
Click Issue balance to give credit by hand, for an apology, a prize or a correction:
- Choose Issue as: A new gift card code, or Store credit on a customer account.
- Enter the Amount in your store currency.
- Enter the Email: the recipient of a new card, or the address of the customer’s account for store credit.
- Add a Recipient name and a Message if you like.
- Enter a Reason. It’s required and kept in the ledger.
- Leave Email a new card to the recipient ticked to send the card, then click Issue.
New cards follow your expiry setting. Store credit isn’t emailed.
Adjust, Disable and Resend
Click a code to open it. You’ll see its balance, issued amount, status, owner, expiry and order, and:
- Adjust balance: a positive amount adds money, a negative one takes it off. A reason is required, and a balance can’t go below zero.
- Disable card stops it being spent and takes it out of the outstanding balance. Enable card turns it back on.
- Email the card again resends a gift card to its recipient.
- Ledger: every movement with its date, type (Issued, Spent, Given back, Adjusted, Moved or Refund), amount, balance after, order and note, plus who made it.
Multi-Currency and Taxes
- Balances are kept in your store currency. With Multi-Currency, a cart in another currency sees the balance converted at the current rate.
- What an order uses is converted back. Spending the whole converted balance empties the card, so rounding never leaves a few cents behind.
- The gift card email and the admin screens show store-currency amounts. The My Account balance shows the visitor’s currency.
- A refund to store credit converts the order-currency amount at the current rate.
- When prices are entered without tax, the card pays for an item and its tax together, and still never more than the balance.
Good to Know
- Privacy: gift cards and store credit are part of WordPress’s personal data export. Erasing a person’s data removes names, email addresses and messages, but keeps balances and the ledger as accounting records.
- Templates: the product fields, the gift card email and the Store credit tab can be overridden in your theme under
stackless/gift_cards/. See Hooks and Functions.
Limits
- Only simple products can be gift cards, and each product has one value. Buyers can’t enter their own amount.
- Cards are emailed as soon as the order is paid. There’s no delivery date to schedule.
- Cards pay for items and their tax, not shipping or fees, and never for other gift cards.
- The balance comes off when the order is placed, so an unpaid order holds it until the order is cancelled.
- A partial refund gives each gift card and store credit on the order its share, in proportion to the money refunded. Deleting a refund doesn’t take that share back.
- Refunding or cancelling the order that bought gift cards disables the cards it issued, and a partial refund of a gift card line disables as many cards as it returns. A refund by amount alone leaves them active, with an order note. A disabled card keeps its balance on record and can be turned back on.
- Balances are kept in your store currency only.