=== LuckyFlow - Raffles for WooCommerce ===
Contributors: racmanuel
Donate link: https://racmanuel.dev/
Tags: woocommerce, raffle, giveaways, competitions, tickets
Requires at least: 6.0
Tested up to: 7.0
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Run ticket-based raffles in WooCommerce: numbered tickets, manual selection, automatic winner draws, and email notifications.

== Description ==

LuckyFlow adds a new "Raffle" product type to WooCommerce. Each raffle product gets a configurable range of numbered tickets that customers can select and purchase. When the competition ends, winners are selected automatically and both the admin and the winners receive email notifications.

= Features =

* Custom WooCommerce product type for raffles
* Configurable ticket number range per product
* Visual ticket selector with search and range filters
* Automatic ticket reservation during checkout
* Configurable reservation timeout
* Automatic winner selection when competition ends
* Manual winner selection and competition close actions
* Winner notification emails to customers and admins
* Frontend participants list with configurable fields
* Sold-out actions: do nothing, close, or close and select winners
* Progress bar and stats display on product and loop pages
* Fully translatable (Spanish included)

== Installation ==

1. Upload the `luckyflow-raffles` folder to the `/wp-content/plugins/` directory, or install via the WordPress plugin installer.
1. Activate the plugin through the 'Plugins' menu in WordPress.
1. Make sure WooCommerce is installed and active.
1. Go to Products > Add New and select "Raffle" as the product type.
1. Configure the ticket range, dates, and other settings in the Raffle tab.

== Frequently Asked Questions ==

= How do I create a raffle product? =

Go to Products > Add New. In the Product Data metabox, select "Raffle" from the product type dropdown. Configure the ticket range, start/end dates, and other options in the Raffle tab.

= Can customers choose their own ticket numbers? =

Yes. The ticket selector on the product page lets customers pick individual numbers, search for a specific number, or view a range. Selected numbers are reserved during checkout.

= What happens if a customer doesn't complete checkout? =

Reserved tickets are automatically released after the configured reservation timeout (set in minutes per product). The customer will need to select tickets again.

= How are winners selected? =

When the competition end date is reached, winners are selected automatically from paid tickets. You can also manually close a raffle and select winners from the product edit screen.

= Can I change the ticket range after tickets have been sold? =

No. Once tickets have been generated for a product, the range is locked to prevent inconsistencies. This is enforced automatically.

= How do I translate the plugin? =

The plugin includes a `.pot` file and a complete Spanish translation. Use Loco Translate or Poedit to create translations for other languages. Translations are loaded automatically by WordPress.

== Screenshots ==

1. Raffle product data tab — configure ticket range, dates, and competition settings.
2. Ticket selector on the frontend — customers pick numbers with search and range filters.
3. Cart and checkout — selected tickets shown with reservation countdown.
4. Winners metabox in admin — see selected winners with order and customer details.
5. Participants tab on product page — public list of participants with configurable fields.

== Changelog ==

= 1.0.0 =
* Initial release.
* WooCommerce Raffle product type.
* Visual ticket selector with range and search.
* Automatic ticket reservation and release.
* Automatic and manual winner selection.
* Email notifications for winners and admins.
* Frontend participants list.
* Progress bar and stats display.
* Spanish translation included.

== Upgrade Notice ==

= 1.0.0 =
Initial release. No upgrade steps needed.