=== WPC eGift Cards for WooCommerce ===
Contributors: wpclever
Tags: woocommerce, gift cards, gift certificates, vouchers, store credit
Requires at least: 5.9
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Boost your store's revenue with a powerful, high-performance gift card and store credit system for WooCommerce.

== Description ==

WPC eGift Cards is a robust solution that allows you to sell digital gift cards, manage store credit, and boost customer retention. Built from the ground up for high-volume stores, it bypasses the traditional and slow WordPress post-meta architecture in favor of a fast custom database engine.

Whether you're selling digital vouchers for holidays, managing offline physical cards, or handling complex customer refunds via store credit, WPC eGift Cards delivers a seamless, secure, and beautiful experience for both you and your customers.

**Key Features:**

*   Sell digital gift cards directly as WooCommerce products
*   Custom Database Tables for high performance (no CPT bloat)
*   Allow customers to upload custom images for personalizing their gift cards
*   Live frontend preview of the gift card design that updates in real-time
*   Allow customers to set custom gift card amounts
*   Automated email delivery with optional future scheduling
*   Partial and full balance redemption at Cart and Checkout
*   Smart refund handling (automatically restore balance on order cancellation)
*   Manual balance adjustments (Credit/Debit) by store admins
*   Detailed transaction history for every card
*   Frontend shortcode `[wpcgc_check_balance]` to check remaining balance
*   Customer self-service panel in WooCommerce My Account
*   Customizable frontend text via built-in Localization panel
*   High-Performance Order Storage (HPOS) compatible
*   Translation ready

== 💳 Gift Card Creation & Management ==

WPC eGift Cards makes it easy to sell digital vouchers or import physical cards.

*   **Dedicated Product Type:** Simply create a new product and select "WPC Gift Card".
*   **Fixed or Custom Amounts:** Offer predefined price tiers (e.g., $10, $50, $100) or let your customers type in their own custom amount.
*   **Bulk Generator:** Need to print physical cards for your retail store? Use the admin Bulk Generator to instantly create hundreds of unique card codes with predefined balances.
*   **Expiration Dates:** Set optional expiration dates to create urgency.

== 🖼️ Personalization & Live Preview ==

Give your customers the power to create a personal gift experience right from the product page.

*   **Custom Image Uploads:** Customers can upload their own photos or graphics to be featured on the gift card, making it a unique and thoughtful present.
*   **Real-time Live Preview:** As customers type their personal message, enter the recipient's name, or upload an image, the gift card preview updates instantly on the screen.
*   **Preview in Product Gallery:** Optionally display the interactive gift card preview directly inside the WooCommerce product image gallery for a seamless, modern shopping experience.

== ✉️ Automated Delivery & Reminders ==

Ensure your gift cards arrive at the right moment and are never forgotten.

*   **Scheduled Delivery:** Customers can choose exactly which day the gift card email should arrive in the recipient's inbox (great for birthdays and anniversaries).
*   **Smart Reminders:** Automatically send a reminder email to the recipient before their card expires, driving them back to your store to spend their balance.
*   **Resend Utility:** If a customer loses their email, admins can instantly resend the card to any email address with a single click.

== 🛡️ Custom Database & High Performance ==

Most gift card plugins store codes and balances as Custom Post Types (CPT), which can slow down your store as data grows. We built this plugin differently:

*   **Dedicated Tables:** Gift cards and transactions are stored in their own normalized tables (`wp_wpc_gc_cards`, `wp_wpc_gc_transactions`).
*   **Zero Bloat:** No massive `wp_postmeta` lookups during checkout, ensuring fast redemption and querying.
*   **Developer Ready:** The robust architecture is fully decoupled and ready for REST API or Webhook integrations via extensive built-in action hooks.

== 💰 Balance Adjustments & Refunds ==

Handling money requires precision. WPC eGift Cards tracks balances reliably.

*   **Order Refunds:** If a customer pays with a gift card and later requests a refund, the plugin intelligently restores the exact used amount back to the card's balance.
*   **Manual Adjustments:** Store admins can manually Credit (Add) or Debit (Subtract) balances to resolve customer support issues, leaving an auditable note for the transaction.
*   **Transaction Ledger:** Both admins and customers can view a detailed, immutable history of every transaction associated with a specific card.

== ✨ Seamless Cart & Checkout Integration ==

A smooth checkout experience helps conversions.

*   **Native UI:** The gift card redemption form integrates seamlessly into your WooCommerce Cart and Checkout pages.
*   **Partial Usage:** Customers can use a portion of their gift card and save the rest for later, or combine multiple gift cards to pay for a single order.
*   **Balance Display:** Applied cards clearly show their remaining balance right in the order summary.

== 🎨 Customization & Localization ==

Make the plugin feel like a native part of your brand.

*   **Built-in Localization:** Don't want to mess with `.po` files? A dedicated Localization settings panel lets you instantly rewrite frontend strings (e.g., changing "Check Balance" to "View Store Credit").
*   **Live Preview:** Customers can see exactly what the digital gift card will look like—complete with their custom message and recipient name—before they add it to the cart.

== Installation ==

1. Upload the plugin folder to the `/wp-content/plugins/` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the "Plugins" screen in WordPress.
3. Go to `WPC eGift Cards > Settings` to configure your general preferences.
4. Create a new WooCommerce product and select the "WPC Gift Card" product type to start selling!

== Frequently Asked Questions ==

= Can customers use multiple gift cards on a single order? =
Yes! Customers can apply as many gift cards as they want to their cart until the order total is fully covered.

= What happens if an order is refunded? =
The plugin will automatically detect if a gift card was used as payment. Upon refund, the exact amount debited from the gift card will be credited back to the card's balance automatically.

= Does this plugin slow down my site? =
No. Unlike many other plugins that rely on WooCommerce's Custom Post Types (which bloat the `postmeta` table), WPC eGift Cards uses completely independent, optimized database tables for high performance.

== Changelog ==

= 1.1.0 =
* Tweak: Code cleanup and optimization.

= 1.0.1 =
* Tweak: Minor typo fix in readme.txt
* Tweak: Code formatting and security review.

= 1.0.0 =
* Initial Release.
