=== SL Gift Cards & Store Credits ===
Contributors: streamlinediving
Tags: gift cards, store credits, woocommerce, coupons, pos
Requires at least: 5.0
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.0.11
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Complete gift card, store credit, and coupon management system integrated with Streamline POS and WooCommerce.

== Description ==

SL Gift Cards & Store Credits is a comprehensive WordPress/WooCommerce plugin for managing gift cards, store credits, and coupons — with full Streamline POS integration.

**Gift Cards**

* Auto-generated card numbers (GC-XXXX-XXXX-XXXX)
* E-gift cards with automatic email delivery
* Physical gift cards for in-store printing
* Balance tracking and transaction history
* Expiration date support
* Branded HTML email notifications
* Customer account integration — link gift cards to accounts
* Combine multiple gift cards into one
* Edit balance, status, and notes from admin
* Bulk import/export via CSV

**Store Credits**

* Customer balance tracking
* Add or deduct credits easily
* Refund to store credit
* Full transaction history with order associations
* Bulk import/export via CSV

**Coupons**

* Uses native WooCommerce coupons
* Integrated into the POS Extensions tab

**Customer Features**

* View all gift cards in "My Account"
* Link received gift cards to their account
* Combine multiple cards into one
* Check balances and transaction history
* Remove applied gift cards from cart

**POS Integration**

* Extensions tab with sub-tabs
* Store credit display in customer profile
* Gift card payment at checkout
* Permission management

== Installation ==

1. Upload the `streamline-gift-cards-store-credits` folder to `/wp-content/plugins/`
2. Activate the plugin through the **Plugins** menu in WordPress Admin
3. Refresh the page after activation
4. Look for the **Gift Cards** menu in the WordPress sidebar
5. Configure your settings under **Gift Cards → Settings**

== Frequently Asked Questions ==

= Is This Plugin FREE? =

Yes! All of my plugins are completely free. There are no fees to unlock features and no monthly subscriptions.

I created these plugins to help small businesses. After becoming frustrated with the high costs of POS systems and software subscriptions, I decided to build my own WordPress and WooCommerce-based solutions and share them with others.

License Notice: These plugins are provided for personal use only. Reproduction, redistribution, resale, sublicensing, or commercial use is prohibited without the express written consent of the copyright owner.

= I Love Your Plugins and POS! You've Saved Me Thousands of Dollars. Where Can I Donate? =

Donations are accepted through my website at:

https://streamlinediving.com/plugins/

I am a one-person operation, and donations help offset the costs of hosting, AI services, software subscriptions, and the time required to develop and maintain these plugins.

= Why Aren't All of Your Plugins in the WordPress Plugin Library? =

I am a one-person operation, and a significant amount of time and effort goes into developing and maintaining these plugins, even with AI assistance.

Submitting plugins to the WordPress Plugin Directory can take weeks due to the review process. I do plan to submit more of my plugins to the WordPress Plugin Library in the future.

= Does This Plugin Require WooCommerce? =

Yes. WooCommerce 5.0 or higher is required for gift card and store credit checkout functionality.

= Can I Import Existing Gift Cards? =

Yes. The plugin supports bulk CSV import and export for both gift cards and store credits, including downloadable CSV templates.

= Does This Work With Streamline POS? =

Yes. The plugin includes a dedicated POS Extensions tab that supports gift card payments and displays store credit balances within customer profiles.

= Why Was This Plugin Created? =

All of my plugins are free and open source.

I believe small businesses should have complete control over their websites and systems without being locked into expensive subscriptions or restricted by software they cannot modify.

= Where Can I Get Updates for This Plugin? =

This plugin does not include automatic updates.

Updated plugin ZIP files can always be downloaded from:

https://streamlinediving.com/plugins/

I use all of my plugins on a live production website. As I discover issues, improve functionality, or add new features, updated versions will be made available on my website.

You can also subscribe to my newsletter to receive update notifications.

= Why Don't You Provide Automatic Updates? =

All of my plugins are free and open source.

By not forcing automatic updates, you are free to customize the plugin to fit your needs without worrying that future updates will overwrite your modifications.

You remain in complete control of your installation.

= What Plugins Have You Created? =

Some of the plugins I have created include:

Streamline POS (for dive shops, sporting goods stores, retail stores, restaurants, and more)
Travel Booking
Newsletter & eMarketing
Bulk Sale Manager
Vendor Price & Image Updater
Variants Builder
Rewards
Location Manager
GCSC (Gift Cards & Store Credit)
Category Hider
Order Importer (for importing historical orders from other systems)
ScanStock Mobile App (inventory management with barcode scanning, with or without WooCommerce integration)

= What Plugins Work With This Plugin? =

I maintain a list of the plugins currently used on my website alongside this plugin. You can view the list at:

https://streamlinediving.com/plugins/

Because some plugins use custom database tables and naming conventions, compatibility may vary.

When developing my plugins, I make every effort to follow standard WordPress database structures and coding practices to maximize compatibility with other WordPress plugins. However, due to differences in how some third-party plugins store and manage data, certain integrations may not function as expected.

= If I Want to Make Changes to My Copy of the Plugin, How Should I Do It? =

I used Claude AI to help create many of these plugins.

Claude offers a free plan that can help you modify plugin code, add features, and troubleshoot issues.

After making changes, I recommend asking Claude what areas of the plugin should be tested and what functionality could have been affected by your modifications. This can help identify any unintended side effects.

If you create an enhancement that you think other users would benefit from, feel free to contact me. I may consider including it in future releases for everyone to enjoy.

= How Can I Contact You With Suggestions or Improvements? =

If you have suggestions, bug reports, improvements, or would like to share modifications you've made, please contact me at:

plloyd@streamlinediving.com

Please include a descriptive subject line and detailed information in the body of your email so I can better understand your request.


== Screenshots ==

1. Dashboard
2. Gift Cards
3. Create Physical Gift Card
4. Store Credit
5. Add/Deduct store Credit
6. Reports
7. Settings
8. Import/Export
9. Combine Gift Cards
10. Customer Account Page - GC Balance
11. Cart - Using GCSC
12. Allows Physical Card purchases
13. Allows eCards purchases


== 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: Added nonce verification to admin download template and clear gift card URL handlers
* Security: Replaced wp_redirect with wp_safe_redirect throughout
* Security: Wrapped all echo output with appropriate escaping functions
* Code: Bundled Chart.js locally, removed remote CDN dependency
* Code: Replaced inline script tag with wp_add_inline_script and wp_localize_script
* Code: Renamed main plugin class to SGCSC_Plugin for consistent prefixing
* Code: Removed debug error_log calls
* Code: Fixed Text Domain header to match plugin slug

= 1.0.4 =
* Gift card management with e-gift and physical card support
* Store credit tracking and management
* WooCommerce checkout integration
* Customer account My Account integration
* Combine and edit gift card functionality
* CSV import/export for gift cards and store credits
* Streamline POS integration

== Upgrade Notice ==

= 1.0.4 =
Initial release.
