=== Studza for WooCommerce ===
Contributors: miljonlotteriet
Tags: woocommerce, lottery, checkout, miljonlotteriet, gamification
Requires at least: 5.8
Tested up to: 6.9
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Embeds the Studza product on the WooCommerce order confirmation (“Thank You”) page.

== Description ==

Studza allows store owners to reward customers with a lottery game immediately after a successful purchase. By integrating with the Studza platform, you can increase customer engagement on the "Order Received" page.

**Key Features:**
* Automatic embedding on the WooCommerce "Thank You" page.
* Server-side and client-side duplicate prevention.
* Support for High Performance Order Storage (HPOS).
* Flexible developer filters to customize data or trigger logic.

== Installation ==

1. Upload the plugin folder to the `/wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Go to **WooCommerce > Studza** and enter your credentials (User ID and API Key).

== Frequently Asked Questions ==

= Does it work with guest checkouts? =
Yes, the plugin generates a unique ID for guests in the format `guest_<order_id>`.

= Can I disable the lottery for specific orders? =
Yes, you can use the `STUDZA_should_trigger_lottery` filter in your theme's functions.php.

== Screenshots ==

1. The main settings page in WooCommerce admin.
2. The product is embedded on the order confirmation page.
3. Advanced settings and callback configuration.

== Changelog ==

= 1.1.0 =
* Added HPOS compatibility.
* Improved phone formatting for Swedish international format.
* Added server-side duplicate prevention.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.1.0 =
This version adds support for WooCommerce HPOS. Highly recommended for latest WooCommerce versions.