Beltoft Gift Cards for WooCommerce adds a gift card product type to your store. Customers purchase a gift card, choose an amount, and enter the recipient’s email. When the order is processed, the recipient gets a branded email with their unique gift card code. Codes are redeemed at checkout through the standard WooCommerce coupon field — no extra steps for the customer.
[bgcw_apply_field] shortcode.[bgcw_product_form] for page builders (Bricks, Elementor, etc.).wc-bgcw/v1) to list, create, update, adjust, and delete gift cards from external systems; works with WooCommerce REST API keys.[bgcw_apply_field] — place it on cart or checkout pages.templates/emails/gift-card-delivery.php to your theme’s woocommerce/emails/ folder.[bgcw_product_form] shortcode.Base: https://your-store.example/wp-json/wc-bgcw/v1/. Authenticate with WooCommerce REST API keys (Basic auth over HTTPS) or a WordPress application password. Requires the manage_woocommerce capability.
GET /gift-cards — List. Params: page, per_page (<= 100), search, status, source, orderby, order.
POST /gift-cards — Create. Body: amount*, source* (paid_offline, promotion, compensation), recipient_name, recipient_email, sender_name, sender_email, message, expires_at (ISO 8601 or null), send_email (default true).
GET /gift-cards/{id} — Single card.
GET /gift-cards/code/{code} — Single card by code.
PATCH /gift-cards/{id} — Update status (active/disabled), source, recipient/sender fields, message, expires_at.
POST /gift-cards/{id}/adjust — Change balance. Body: amount (positive credit, negative debit), note.
GET /gift-cards/{id}/transactions — Ledger.
DELETE /gift-cards/{id}?force=true — Permanently delete card and ledger.
All datetimes in responses (created_at, expires_at, transaction created_at) are ISO 8601 in UTC with a trailing Z (e.g. 2032-01-31T00:00:00Z). On input, expires_at accepts an ISO 8601 datetime (interpreted as UTC when no offset is given), a MySQL datetime string, or null to clear it. recipient_email and sender_email accept a valid email address or an empty string to clear the field.
Every card includes source and is_paid. On redeemed orders, each gift card coupon line carries bgcw_gift_card_id, bgcw_source, bgcw_is_paid, bgcw_source_order_id, and the order carries _bgcw_paid_redeemed_total / _bgcw_free_redeemed_total. Those two order totals reflect amounts actually deducted and are not reduced by later refunds; refunds appear as separate refund transactions in the ledger.
Validation failures return HTTP 400; failures while creating, updating, deleting a card, or recording a ledger entry return HTTP 500 (bgcw_rest_create_failed, bgcw_rest_update_failed, bgcw_rest_delete_failed, bgcw_rest_ledger_failed). The /adjust amount is bounded to +/-1,000,000.
Example:
curl -u ck_xxx:cs_xxx “https://your-store.example/wp-json/wc-bgcw/v1/gift-cards?source=promotion”
Developers can extend the plugin:
bgcw_gift_card_created — fires after a gift card is created (used by the email system).bgcw_show_recipient_name_field — return false to hide the Recipient Name field on the product page.bgcw_show_recipient_email_field — return false to hide the Recipient Email field on the product page. The buyer’s billing email is used as the recipient and the email validation is skipped.bgcw_show_personal_message_field — return false to hide the Personal Message field on the product page.bgcw_rest_permission — filter REST access (default: manage_woocommerce).Example — hide the Recipient Email field on every gift card product:
add_filter( 'bgcw_show_recipient_email_field', '__return_false' );