=== Birthday Rewards for WooCommerce – NeoLite Birthday Bash ===
Contributors: MTPamir
Tags: woocommerce, coupons, birthday, discount, marketing
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
WC requires at least: 8.0
WC tested up to: 11.0
Stable tag: 1.3.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Automate WooCommerce birthday coupons. Drive repeat sales by automatically emailing each customer a unique coupon before their birthday.

== Description ==

**Stop losing customers on their special day. 🎂**
Birthday emails are the secret weapon of high-growth WooCommerce stores. Statistics show that birthday rewards have a **481% higher transaction rate** and **342% more revenue per email** compared to regular promotions.

**NeoLite Birthday Bash** is the architect-grade solution for store owners who value speed. While other automation suites are heavy and complex, NeoLite is built to be a **Micro-Satellite**: lightweight, standalone, and incredibly fast.

https://www.youtube.com/watch?v=pUqgreI-3yw

**🚀 100% Standalone: No Dependencies Required.**
Unlike other birthday tools that require heavy automation suites or complex parent plugins, **NeoLite Birthday Bash** is a self-contained extension. The only thing you need is WooCommerce.

**NeoLite Birthday Bash** is built for the "Performance Purist." We’ve replaced bloated automation workflows with a "Zero-Bloat" architecture that underpins your store's speed while maximizing customer retention.

**✨ Key Features:**
*   **Automated Conversion:** Automatically send unique coupons 7 days before the event to drive early "Hype" traffic.
*   **Intelligent Data Collection:** Collect birth dates via My Account, Registration forms, or directly in the modern **Checkout Block** (Gutenberg supported).
*   **Architect-Grade Performance:** Implemented with object caching and optimized database queries to ensure zero lag on your store.
*   **Can't-Resist Coupons:** Configure fixed or percentage discounts with automatic expiry to create a psychological "Use it or Lose it" trigger.
*   **NeoPlugin Ecosystem:** Built to work seamlessly alongside **NeoGrow** for a complete 365-day loyalty strategy. 

== Screenshots ==

1. Birthday Bash Settings: Field Configuration Area.
2. Birthday Information Form on Registration Page: Input Birthday Data.
3. Birthday Information Form on Checkout Page: Input Birthday Data.

== Installation ==

1.  Navigate to `Plugins` > `Add New` in your WordPress Dashboard.
2.  Search for **NeoLite Birthday Bash**.
3.  Click `Install Now` and then `Activate`.
4.  Find the **NeoPlugin** menu in your sidebar to configure your first birthday campaign.

== Frequently Asked Questions ==

= How does NeoLite compare to all-in-one automation suites? =
While all-in-one tools are excellent for complex marketing workflows, they often come with significant database overhead. NeoLite is a **Micro-Satellite**—it is 10x lighter, requires zero configuration of "work-flows," and operates independently without requiring expensive parent plugins.

= Does it work with the new WooCommerce Cart and Checkout Blocks? =
Yes! We have implemented full compatibility with the latest WooCommerce Blocks. Whether you use the classic shortcode-based checkout or the modern Blocks interface, the birthday features integrate seamlessly.

= Can I customize the birthday email? =
Absolutely. You can upload your logo, customize the greeting, and write your own message. We provide a Live Email Preview feature so you can see exactly what your customers will receive.

= Is it compatible with WooCommerce HPOS? =
Yes. NeoLite was architected with High-Performance Order Storage (HPOS) in mind. Your store remains future-proof and performance-ready.

= Can I use this with NeoGrow? =
Absolutely. While Birthday Bash handles the "Event," **NeoGrow** handles the "Loyalty." Using them together allows you to reward customers for birthdays AND every other purchase they make.

**Q: Will this plugin slow down my WooCommerce store?**
A: Not at all. As part of the NeoLite suite, it is built with a "Performance-First" architecture. We use optimized database queries and only load necessary assets on specific pages to ensure zero bloat and lightning-fast load times.

**Q: Does it work with the new WooCommerce Cart and Checkout Blocks?**
A: Yes! We have implemented full compatibility with the latest WooCommerce Blocks. Whether you use the classic shortcode-based checkout or the modern Blocks interface, the birthday features will integrate seamlessly.

**Q: Can I customize the birthday email to match my brand?**
A: Absolutely. You can upload your logo, customize the greeting, and write your own message. We also provide a Live Email Preview feature so you can see exactly what your customers will receive before you hit "Send."

**Q: Is it possible to make the birthday field mandatory at checkout?**
A: Yes, the admin has the option to make the birthday collection field mandatory or optional during the checkout process or on the account registration page.

**Q: Where can I see which coupons have been issued?**
A: The plugin includes a dedicated Birthday Logs dashboard. You can track which user received a coupon, when it was generated, and whether it has been redeemed for a purchase.

**Q: What happens if a customer already has a birthday coupon?**
A: The system performs a "Duplicate Check" before issuing a new one. If an active, unused birthday coupon already exists for that user, it won't create a second one, keeping your coupon database clean.

== Changelog ==

= 1.3.1 =
*   **Fix:** A percentage birthday coupon can no longer be set above 100%. Entering a higher figure now saves as 100% and tells you why. Previously any number was accepted, so a coupon set to, say, 500% would discount several times the value of the basket.
*   **Fix:** If your store already had a percentage above 100% saved, new birthday coupons are capped at 100% straight away — you do not need to open the settings screen for the cap to apply. Your saved figure is left alone so you can see what it was.
*   Fixed-amount coupons are unaffected: they have no ceiling and never did.

= 1.3.0 =
*   **Fix:** The "Enable this email notification" switch under WooCommerce → Settings → Emails → Birthday Coupon now actually works. Previously the birthday email was sent regardless of that setting, and no coupon is now issued while the notification is switched off.
*   **Fix:** Birthday emails are now wrapped in WooCommerce's standard email layout. They previously shipped a fragment with no header, so the message text inherited none of your store's email fonts, colours or width, and the closing markup did not match anything.
*   **Fix:** Added the missing plain-text template. Stores with the email type set to **Plain text** or **Multipart** were sending an empty message, so the coupon code never reached the customer.
*   **Fix:** The email preview on WooCommerce → Settings → Emails now shows a sample name, coupon code and expiry date instead of a blank message.
*   **Enhancement:** The email now respects the email type, Cc, Bcc and Reply-to settings WooCommerce offers for it, renders in the store language, and is recorded correctly in WooCommerce's email log.
*   **Enhancement:** A logo set on the plugin's Email tab is now used as the email header image, so it appears above the heading like every other WooCommerce email.
*   **Compatibility:** Tested with WordPress 7.1 and WooCommerce 11.

= 1.2.0 =
*   **Reliability:** The daily birthday check now processes customers in bounded batches via Action Scheduler, so large stores no longer risk timeouts or memory exhaustion.
*   **New:** Coupon redemptions are now recorded — the admin Coupon Logs show the redeemed date and linked order, with pagination for long lists.
*   **Fix:** Uninstall now removes every option, the coupons table, generated coupons and scheduled tasks, across all sites on multisite.
*   **Fix:** Activating the plugin before WooCommerce no longer leaves it half-installed; setup completes automatically once WooCommerce is active.
*   **Performance:** Front-end styles now load only on pages that show the birthday form instead of site-wide.
*   **Internationalization:** Added a translation template, text-domain loading and script translations; removed hard-coded English strings from admin scripts.
*   **Maintenance:** Added coding-standard and static-analysis tooling, a `.distignore`-driven build, and removed unused code.

= 1.1.4 =
*   **Security:** Removed a debug log that recorded checkout details to a file inside the plugin folder. The file is deleted on update. If your site was affected, also delete `wp-content/plugins/birthday-bash/bb_checkout_debug.log` if it remains.
*   **Maintenance:** Removed unused internal code and tightened the release build so development files are never packaged.

= 1.1.3 =
*   **Enhancement: Dynamic Admin Colors** Settings and design pages now adapt dynamically to match the logged-in WordPress user's selected "Administration Color Scheme" (Fresh, Modern, Light, Blue, Midnight, Sunrise, Ectoplasm, Ocean, Coffee).
*   **Enhancement: Cache Prevention** Updated stylesheet version parameters with dynamic file modification timestamps to prevent browser styling cache issues.
*   **Compatibility:** Fully tested and declared compatible with WordPress 7.0.

= 1.1.2 =
*   **New: Documentation Tab** Added a dedicated "Guide & Help" tab in the admin area with comprehensive documentation, quick start guides, and shortcode usage examples.
*   **New Feature: Live Demo** Added a "Try it now" button on the plugin repository page linking to a live demo environment.

= 1.1.1 =
**🚀 New in Version 1.1.1: Flexibility & Integration**
*   **Shortcode Power:** Use `[birthday_bash_form]` to place the collection form anywhere on your site.
*   **Block Checkout Ready:** Use `[birthday_bash_checkout_input]` to add birthday fields to the modern WooCommerce Checkout Block.
*   **Native Account Integration:** Birthday fields now automatically appear in the 'Account Details' section for a seamless user experience.
*   **Live Demo:** Explore the plugin instantly via the WordPress Playground link on our repository page.

= 1.1.0 =
* **Major Refactor:** New `NeoPlugin\NeoLite` namespace architecture for better performance and isolation.
* **New Feature:** Birthday Form Design Area.
* **UI Update:** Integrated into the new Neo Hub admin menu.
* **UI Update:** Updated Brand Logo Integration in Email.
* **UI Update:** Email Preview in Admin.

= 1.0.0 =
* Initial release. Core birthday coupon automation and data collection.

== Upgrade Notice ==

= 1.3.0 =
Important email fixes: the Enable/Disable switch now works, plain-text stores no longer send an empty message, and birthday emails now use your store's standard email layout — so this release changes how they look.

= 1.2.0 =
Reliability and cleanup release: batched daily processing for large stores, redemption logging, a complete uninstall, and translation support.

= 1.1.4 =
Security fix: removes a debug log that stored checkout details in the plugin folder. Update as soon as possible.

= 1.1.1 =
🚀 New in Version 1.1.1: Flexibility & Integration