Setting up digital gift cards in WooCommerce
With the Leat plugin for WooCommerce you can sell Leat gift cards as WooCommerce products and let buyers pay with them at checkout. Before you start, create a gift card program in the Leat dashboard: that's what you pick in the WooCommerce product editor.
Set up a gift card product
A gift card is a regular WooCommerce product with one extra tab in the product editor. Set it up as a simple product with 1 price, or as a variable product so buyers can pick from several values.
Simple product (1 price)
Create a WooCommerce product, or open an existing one, and set the product type to Simple product. Set the price on the General tab, then open the Leat: Giftcard Settings tab:
- Virtual: check this if the gift card is delivered digitally. It removes the shipping fields.
- Giftcard Program: the Leat gift card program this product belongs to.
- Enable Sale Price: when this is on, the gift card's value is the regular price, not what the buyer pays. With a regular price of 50 and a sale price of 25, the buyer pays 25 and gets a gift card worth 50. Only use this for promotions where you mean to give more value than the payment.
If you turn on sale pricing, your revenue won't match the value of the gift cards you've sold. Track the difference as a promotional expense, and check that your accounting setup can handle it before you turn it on.
Variable product (several prices)
To let buyers choose between values such as 10, 20 and 50, create a Variable product. Set up the Leat: Giftcard Settings tab the same way as for a simple product.
On the Variations tab, create a variation for each value and set its Regular price. Check Virtual on each variation if the gift card is digital.
Name your price (an amount the buyer chooses)
To let buyers type their own amount, use the WPC Name Your Price plugin. It's the only name-your-price plugin the Leat plugin works with.
Before your first name-your-price gift card, go to WP Clever > Name Your Price in the WordPress admin sidebar and set Status to Disable on the General tab. This stops the name-your-price fields from showing on every product. You then turn it on per product.
- Set the product up as a Simple product with a Regular price where you want pricing to start. Check Virtual if the gift card is digital, and fill in the Leat: Giftcard Settings tab as for any simple gift card.
- Open the Name Your Price tab in the product data panel and select Overwrite, so the product uses its own rules instead of the global defaults.
- Set Type to Input so buyers get a field to type in.
- Under Price constraints, set the minimum, step and maximum. A minimum of 10, a step of 5 and a maximum of 1000 lets buyers enter 10, 15, 20 and so on, up to 1000.
Choose when gift cards are created
By default, the gift card is created and sent when an order reaches Completed. To change this, go to Leat > Gift Card Settings and change Gift Card Order Status. If your store delivers digital products straight away, Processing may suit you better.
Only 1 status creates the gift card. If the order status changes again later, no second gift card is sent.
Recipient email, name and message
At checkout, a buyer of a gift card sees a field for the recipient's email address. That's where the gift card goes.
- To skip that field, turn on Disable gift card recipient email under Leat > Gift Card Settings. The gift card then goes to the buyer's billing email address.
- Buyers can also enter the recipient's name. The field is optional. To remove it, turn on Disable gift card recipient name. It's also hidden when Disable gift card recipient email is on.
- Buyers can add a personal message. The field is optional. To remove it, turn on Disable gift card recipient message.
The name and message only appear in the email if your gift card recipient email contains their merge tags: #{{ custom.recipient_name }} for the name and #{{ custom.message }} for the message. Custom merge tags always start with custom..
To edit that email in Leat, click the gear icon at the top right of the dashboard to open Settings, then click Giftcards under Functionalities. Under Giftcard recipient emails, click View details on the email and then Edit email. This isn't the Settings item in the sidebar of Store → Giftcards, which holds a program's own settings, such as its name and expiry.
Accept gift cards at checkout
Before buyers can pay with a gift card:
- Turn on Accept gift cards under Leat > Gift Card Settings.
- Add the Gift Card Input block to your checkout page in the WooCommerce block editor.
On the classic checkout shortcode, the gift card form is added automatically once Accept gift cards is on. The block step is only for block-based checkouts.
At checkout, the buyer enters the gift card code, sees the balance and applies it to the order. If the balance is more than the order total, the order is fully covered and the rest stays on the card. A buyer can use several gift cards on one order.
Cancel gift cards when an order is refunded
To have Leat cancel the gift card when its order is refunded or cancelled, pick the statuses under Cancel gift cards on these order statuses in Leat > Gift Card Settings. You can pick more than 1. The gift card is cancelled the first time the order reaches any of them, and not again if the status changes later.
Change the checkout text
Every text in the gift card form at checkout can be changed under Leat > Gift Card Settings: the form title, the placeholder, the button label, the balance text, the headings, and every success and error message.