๐ŸŽ SL Gift Cards & Store Credits

Complete gift card, store credit, and coupon management for WooCommerce

Version 1.0.11

Overview

SL Gift Cards & Store Credits adds a complete gift card and store credit system to your WooCommerce store, fully integrated with the Streamline POS plugin.

๐ŸŽ Gift Cards

Auto-generated card numbers, e-gift and physical cards, balance tracking, expiry dates, branded email delivery, and customer self-service combining.

๐Ÿ’ฐ Store Credits

Per-customer credit balances, easy add/deduct, refund-to-credit, full transaction history, and bulk CSV import/export.

๐Ÿ”Œ POS Integration

Gift card and store credit payment at POS checkout, customer profile credit display, and permission-aware access controls.

๐Ÿ“ฆ Import / Export

Bulk gift card and store credit CSV operations with pre-formatted download templates and validation reporting.

Database Tables

Created automatically on activation:

  • wp_streamline_gift_cards โ€” Gift card records
  • wp_streamline_gift_card_transactions โ€” Full transaction history
  • wp_streamline_store_credits โ€” Store credit transactions per customer

Installation

  1. Upload the sl-gift-cards-store-credits folder to /wp-content/plugins/.
  2. Go to WordPress Admin โ†’ Plugins.
  3. Find SL Gift Cards & Store Credits and click Activate.
  4. Refresh the page โ€” a Gift Cards & Credits menu appears in the WordPress sidebar.
  5. Visit Gift Cards & Credits โ†’ Settings to configure email templates and URLs.

Requirements

  • WordPress 5.0+
  • WooCommerce 5.0+
  • PHP 7.4+

Gift Cards

Admin: Gift Cards List

Navigate to Gift Cards & Credits โ†’ Gift Cards to view all cards. Each row shows the card number, current balance, status, recipient, and creation date.

From this screen you can:

  • Edit โ€” modify balance, status, expiry, recipient email, and notes
  • Combine โ€” transfer the balance of one card into another (source card is zeroed out)
  • View transactions โ€” full debit/credit history for the card

Create Physical Gift Card

Go to Gift Cards & Credits โ†’ Create Physical Card.

  1. Enter the initial balance.
  2. Optionally set an expiry date and notes.
  3. Click Create โ€” a card number in the format GC-XXXX-XXXX-XXXX is generated and saved immediately.
  4. Print or note the card number to give to the recipient.

Create E-Gift Card Products

E-gift cards are WooCommerce products that trigger automatic email delivery to the recipient on purchase.

  1. Go to Products โ†’ Add New.
  2. Set Product Type to Gift Card in the Product Data panel.
  3. Set the price and publish.
  4. Customers who purchase will be prompted to enter a recipient email at checkout. The recipient receives a branded HTML email with the card number and balance.
Tip You can offer multiple denominations by creating several Gift Card products (e.g. $25, $50, $100) or by using a variable product with amount variations.

Gift Card Number Format

All cards use the format GC-XXXX-XXXX-XXXX where each segment is randomly generated. Numbers are unique and checked against existing cards at creation time.

Store Credits

View Customer Credits

Go to Gift Cards & Credits โ†’ Store Credits. The table shows all customers who have a store credit balance, with current balance and last transaction date.

Add or Deduct Store Credit

Go to Gift Cards & Credits โ†’ Add Store Credit.

  1. Search for the customer by name or email.
  2. Enter an amount (positive to add, negative to deduct).
  3. Select a reason (Refund, Compensation, Promotion, Adjustment, or Other).
  4. Optionally add a note.
  5. Click Save. The transaction is recorded immediately and the customer's balance updates.

Refund to Store Credit

When processing a WooCommerce refund, select Refund to Store Credit to credit the customer's balance instead of issuing a payment reversal. The transaction is linked to the originating order.

Note Store credit balances are per-customer and tied to the WordPress user account. Guest checkouts cannot use store credits.

Customer-Facing Features

My Account โ†’ My Gift Cards

Logged-in customers can visit My Account โ†’ My Gift Cards to:

  • View all gift cards linked to their account
  • Check the current balance and full transaction history for each card
  • Link a received card โ€” enter a card number to associate it with their account
  • Combine cards โ€” merge the balance of one card into another

Cart & Checkout

  • Apply a gift card on the Cart page or the Checkout page using the "Apply Gift Card" field
  • Remove an applied card with a single click
  • If the gift card fully covers the order total, a $0 checkout notice is displayed
  • Applied cards persist in the session across page loads

POS Integration

When Streamline POS is active alongside this plugin, the following features become available at the POS terminal:

Extensions Tab

The POS checkout screen gains an Extensions tab with sub-tabs for Gift Cards and Store Credits.

Sub-tabWhat it does
Gift CardsEnter a gift card number to apply it to the current POS transaction. Balance is validated in real time.
Store CreditsShows the current customer's store credit balance and lets you apply all or part of it to the order.
CouponsApply WooCommerce coupon codes to the POS cart.

Customer Profile

The store credit balance appears in the customer profile panel on the POS screen whenever a customer is loaded.

Permissions Gift card issuance and store credit adjustments from the POS respect the POS permission levels configured in Streamline POS settings.

Import / Export

Navigate to Gift Cards & Credits โ†’ Import/Export.

Export

  • Export Gift Cards โ€” downloads all gift cards as a CSV file
  • Export Store Credits โ€” downloads all store credit transactions as a CSV file
  • Customer-specific exports are also available from the GC Transaction History and Customer Lookup screens

Import

  1. Download the pre-formatted CSV template for gift cards or store credits using the Download Template link.
  2. Fill in the template โ€” column headers must match exactly.
  3. Upload the completed CSV using the file picker and click Import.
  4. The import screen reports any validation errors row-by-row before committing.
Tip When importing gift cards, leave the card_number column blank to have numbers auto-generated, or provide existing numbers to migrate cards from another system.

Settings

Navigate to Gift Cards & Credits โ†’ Settings.

SettingDescription
Email From NameThe sender name shown in e-gift card delivery emails
Email From AddressThe reply-to address for gift card emails
Email SubjectSubject line for the e-gift card delivery email
Email Header / FooterHTML content injected into the branded email template
My Gift Cards URLThe slug for the customer-facing My Gift Cards page (default: my-gift-cards)
Expiry DefaultOptional default expiry period applied to new gift cards (e.g. 12 months)

Changelog

1.0.11

  • Fixed double store credit deduction on POS orders
  • Fixed double store credit/gift card restoration on POS returns
  • Added CSV exports to Reports page (GC transactions, gift cards, store credits)
  • Added customer-specific exports from GC Transaction History and Customer Lookup
  • Added multi-customer picker when search matches multiple customers
  • Fixed HTML appearing in CSV export files

1.0.8

  • Security: Added nonce verification to gift card and store credit checkout handlers
  • Security: Replaced wp_redirect with wp_safe_redirect throughout
  • Security: Wrapped all echo output with appropriate escaping functions
  • Bundled Chart.js locally โ€” removed remote CDN dependency
  • Renamed main plugin class to SGCSC_Plugin for consistent prefixing

1.0.4

  • Added plugin row meta links: Visit plugin site, View ReadMe, User Guide
  • Minor stability improvements and code cleanup

1.0.3

  • Added customer self-service card combining from My Account
  • Added admin edit functionality for gift card balance, status, and notes
  • Improved CSV import validation and error reporting

1.0.2

  • Added bulk import/export for gift cards and store credits
  • Added pre-formatted CSV templates with download links
  • Added customer-facing gift card linking from My Account

1.0.1

  • Added POS customer profile store credit display and "Use Credit" modal
  • Added POS gift card payment input at checkout
  • Added REST API endpoints for POS integration

1.0.0

  • Initial release