=== Gift Cards ===
Contributors: yodsira
Tags: woocommerce, gift card, voucher, certificate, loyalty
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.0
Stable tag: 1.1.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Sell digital gift cards in WooCommerce: the code is issued on payment, the balance covers orders partly and stays on the card until spent.

== Description ==

"Pay today, spend later" - a gift card is money you receive in advance
and a new customer you get for free. Gift Cards runs the whole cycle
locally: issue, spend, partial redemption, balance lookup.

= What it does =

* Tick "This product is a gift card" on any product; its price becomes
  the card value. When the order is paid, a unique code is issued
  automatically and e-mailed to the customer (editable template).
* Codes are stored hashed - a database leak never leaks gift-card
  money.
* The customer spends the code at checkout: the balance covers the
  order, and every leftover stays on the card for next time.
* Card ledger in the admin: balance, movements, status. Manual issuing
  ("give a card by hand") and annulment of untouched cards.
* Optional expiry (months) and a rate-limited balance lookup via the
  [gift_card_balance] shortcode.
* Works with WooCommerce High-Performance Order Storage (HPOS).

= Gift Cards Pro =

The Pro companion adds designer e-mail templates, scheduled delivery
("send on December 31st"), printable physical card batches as CSV and
Telegram notifications with weekly summaries. Learn more:
https://yodsira.com/en/product/gift-cards/

== Screenshots ==

1. The card ledger in the admin.
2. A gift-card code delivered by e-mail.
3. Spending a card at checkout.

== Installation ==

1. Install the plugin through the WordPress plugins screen (Plugins ->
   Add New -> Upload Plugin) and activate it.
2. WooCommerce must be active.
3. Create a product, tick "This product is a gift card", publish.

== Frequently Asked Questions ==

= Can a customer spend the card partly? =

Yes. The code covers as much of the order as it can, and the leftover
balance stays on the card until it is spent or expires.

= Is the code safe in the database? =

Yes. Only a SHA-256 hash of the code is stored, together with the last
4 characters for support. A leaked database does not leak money.

= Can a code be used twice at the same time? =

The balance is debited atomically when the order is paid; a zero card
becomes "empty" and is refused.

= Can I give a card by hand? =

Yes - the admin page issues a card for any amount and shows the code
once.

= Is anything sent to third parties? =

No. Gift Cards works entirely on your site; the code e-mail goes
through your own WordPress wp_mail.

== Changelog ==

= 1.0.0 =
* First release: card products, hashed codes, checkout redemption with
  partial spending, admin ledger, manual issuing, annulment, optional
  expiry, balance lookup shortcode, HPOS support.

== Privacy & Data ==

Gift Cards stores cards and movements in your own WordPress database.
Codes are stored as hashes. The code e-mail is sent by your own
WordPress wp_mail. Nothing is sent to any external service.
