Configuration
Giftvane is configured in two places: the global settings page under WooCommerce > Gift Cards (codes, emails and labels) and the product editor, where you flag a product as a gift card and set its value. All global settings live in a single option, giftcards_settings (an array).
Global settings
Section titled “Global settings”Enable gift cards
Section titled “Enable gift cards”enabled, default on. The master switch. When off, no codes are issued, the checkout redeem field is hidden, the issued-code section disappears, and existing balances cannot be spent. Turning it off pauses the feature without dropping the table or losing any balances.
Code prefix
Section titled “Code prefix”code_prefix, default empty. A short tag prepended to every generated code so customers and support can recognise it (GIFT- produces GIFT-AB12CD34). On save it is uppercased, stripped to A-Z, 0-9 and hyphen, and capped at 12 characters, so what you type is exactly what appears on every code, with no silent rewriting later. Leave blank for codes with no prefix. The random part is always 12 uppercase alphanumerics appended after the prefix.
Checkout discount label
Section titled “Checkout discount label”fee_label, default Gift card ({code}). The text on the discount line at checkout when a code is applied. The {code} token is replaced with the applied code, e.g. Gift card (GIFT-AB12CD34). If you clear the field, the packaged default is restored on save.
Recipient email subject and body
Section titled “Recipient email subject and body”email_subject (default You have received a {amount} gift card) and email_body (default You have received a gift card worth {amount}. followed by Use this code at checkout: {code}). Both are used for the email that is actually sent, not just stored. Two tokens are interpolated:
{code}, the generated gift-card code.{amount}, the card value, formatted with WooCommerce’s currency formatter.
The settings page has click-to-insert token buttons and a live preview that renders the subject and body with a sample code and amount as you type. The email is sent as plain text through wp_mail. Clearing either field restores its packaged default on save.
Show codes on order
Section titled “Show codes on order”show_codes_on_order, default on. Lists the code(s) an order issued on the buyer’s order-confirmation (thank-you) page and in their customer order emails, useful when someone buys a card for themselves or wants to forward it. The list reads only the rows belonging to that order; it is never a public balance lookup, and admin order emails are not affected. With the setting off, those order-page and email hooks are not registered at all. The front-end list shows each code with a copy button; the email variant omits the button (no JavaScript in inboxes).
Flagging a product as a gift card
Section titled “Flagging a product as a gift card”The card is an ordinary WooCommerce product:
- Create or edit a product and set its price to the gift-card value.
- On the General tab, tick Gift card (stored as
_giftcards_is_gift_card). - Save.
Quantity is honoured, buying multiple units issues multiple codes, one per unit, each worth the per-unit line total (so a line discounted by a coupon issues codes for the discounted value).
Recipient address
Section titled “Recipient address”By default the code is emailed to the order’s billing email, so a card is always deliverable. A per-line recipient email captured at add-to-cart time (_giftcards_recipient_email) overrides it so the card goes straight to the person being gifted. The free edition has no built-in “send to a friend” field on the product page; the per-line meta is the integration point a companion or custom code can populate.
Storage and uninstall
Section titled “Storage and uninstall”Each issued card is one row in {$wpdb->prefix}giftcards: code (unique index), balance, recipient_email, order_id, created_at. The table is created on activation and on the next admin load after an update via an idempotent migrator that tracks its own giftcards_db_version option, independent of the plugin version. Deleting the plugin from wp-admin runs uninstall.php, which drops the {prefix}giftcards table and deletes the giftcards_settings and giftcards_db_version options. Deactivating does not remove anything.
Compatibility
Section titled “Compatibility”Giftvane declares compatibility with WooCommerce HPOS and the Cart/Checkout Blocks. The redeem field renders on the classic checkout via woocommerce_review_order_before_payment.
Giftvane Pro settings
Section titled “Giftvane Pro settings”Giftvane Pro requires the free Giftvane plugin active (it creates the gift-card table). Its settings live on these screens:
Custom amount
Section titled “Custom amount”Let customers enter a gift-card amount at checkout within per-product or store-wide min/max bounds set under WooCommerce > Giftvane Pro.
Scheduled delivery
Section titled “Scheduled delivery”When a line item includes a future delivery date, PRO defers card issuance and email until that date. A daily cron event delivers due cards into the same {prefix}giftcards table the free plugin uses.
Balance shortcode
Section titled “Balance shortcode”Use [giftcards_balance] on any page. The visitor enters a code and sees the remaining balance (no login required).
Redemption history
Section titled “Redemption history”WooCommerce > Gift card lookup, search by code to see remaining balance, issuing order, recipient, and a table of partial redemptions (order, amount used, balance after).
PRO also copies the applied redeem code onto the order at checkout so redemption completes reliably on order processing.
Custom card designs
Section titled “Custom card designs”Branded HTML recipient emails with three selectable designs (Classic, Celebration, Minimal), optional accent colour and header image. Configure under WooCommerce > Giftvane Pro > Email design; override per product in Product data > General.
Bulk generation
Section titled “Bulk generation”WooCommerce > Bulk gift cards, generate up to 500 promo codes per batch (no order required) and download a CSV with code, balance and timestamps. Cards redeem at checkout like order-issued codes.
PDF gift cards
Section titled “PDF gift cards”When enabled under WooCommerce > Giftvane Pro > Email design, recipient emails include a printable PDF attachment with the card amount, code and shop URL. Works for immediate delivery, scheduled sends, and plain-text emails when custom HTML designs are off.
Multi-currency
Section titled “Multi-currency”When enabled under WooCommerce > Giftvane Pro, each card records the order currency (including bulk batches and scheduled delivery). The [giftcards_balance] shortcode and Gift card lookup show amounts in the card currency. Optional checkout enforcement clears a mismatched applied code and shows an error when the cart currency differs from the card.