=== CompKit Game Engine ===
Contributors: kriscreates
Tags: woocommerce, giveaways, instant win, scratchcard, slots
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 3.0.3
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Instant-win reveal games for Giveaway for WooCommerce by Flintop — scratchcards, slots, spin, racing, football, claw grab, darts and more.

== Description ==

**This is an add-on and does nothing on its own.** It requires:

* **WooCommerce**
* **Giveaway for WooCommerce by Flintop** — formerly known as **Lottery for WooCommerce** — the WooCommerce.com extension at https://woocommerce.com/products/giveaway-for-woocommerce/

Please note: this must be the **Flintop** plugin (the one previously called *Lottery for WooCommerce*). It is **not** the similarly-named "Giveaway for WooCommerce" plugin by WebCartisan — that one will not work with CompKit.

With WooCommerce and the Flintop Giveaway plugin active, CompKit adds interactive instant-win reveal games to your giveaways.

CompKit Game Engine adds interactive instant win reveal games to Giveaway for WooCommerce by Flintop (formerly Lottery for WooCommerce).

Instead of displaying a simple static winning ticket, CompKit transforms instant win prize reveals into engaging playable experiences designed to increase excitement, engagement, and repeat participation.

Customers can reveal prizes through immersive game mechanics including scratchcards, slot machines, spin wheels, racing games, football shootouts, dart challenges, claw grabs, and more.

**Instant Reveal and the Smart Email Delay Handler are included free** with no licence key required.

Premium game modules are available separately through monthly or yearly subscription plans, with bundle options available.

= Free features =

* **Instant Reveal**: A clickable animated gift box that reveals whether the customer has won a prize
* **Smart Email Delay Handler**: Delays WooCommerce order confirmation emails until all prizes and tickets have been revealed, preventing spoilers and protecting the reveal experience
* Mobile-friendly reveal experience
* Seamless integration with Giveaway for WooCommerce by Flintop
* Instant Win prize group support
* Automatic order confirmation page integration

= Premium game modules =

* Spin the Wheel
* Slot Machine
* Scratch Cards
* Football Penalties
* Race Car
* Balloon Pop
* Darts Challenge
* Prize Grab Claw

Premium modules are licensed individually or through bundle subscriptions.

= Requirements =

* WooCommerce
* Giveaway for WooCommerce by Flintop (formerly Lottery for WooCommerce)
* Instant Win enabled on giveaway products
* Prize Groups enabled on giveaway products

= How Instant Reveal works =

1. Assign your giveaway product to the **Instant Reveal** product category
2. Enable Instant Win prize groups on the product
3. When a customer completes an order, an interactive reveal game appears automatically on the order confirmation page
4. The customer reveals their result through the selected game experience

= Why use CompKit? =

Traditional instant win reveals are often static and predictable.

CompKit turns the prize reveal itself into part of the entertainment experience, helping store owners create more engaging giveaway campaigns that encourage repeat participation and improve customer excitement.

= External services =

This plugin connects to the KrisCreates licence server at `licencing.kriscreates.co.uk` for the optional premium games. It does NOT download or run code from the server inside this plugin — premium games are a separate plugin you install yourself.

The server is contacted to:

* Validate a premium licence key for the current site (on the settings page and on order confirmation pages where a licensed game is shown).
* Process a purchase via Stripe Checkout (creating the checkout session and retrieving the licence after payment).
* Provide your premium games download (a link to a zip of the games your licences cover, which you then install via Plugins → Add New → Upload).

The following data may be transmitted:

* Licence key(s)
* Site domain
* Stripe checkout session ID (during a purchase only)

No personally identifiable customer information is transmitted. Payment details are handled entirely by Stripe and are never sent to or stored by this plugin.

This service is provided by KrisCreates.

Privacy Policy:
https://kriscreates.co.uk/privacy-policy

Stripe Privacy Policy:
https://stripe.com/privacy

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`
2. Activate the plugin through the **Plugins** menu in WordPress
3. Ensure **Giveaway for WooCommerce by Flintop (formerly Lottery for WooCommerce)** is installed and active
4. Enable Instant Win and Prize Groups on your giveaway products
5. Assign giveaway products to the **Instant Reveal** product category
6. The Instant Reveal game will appear automatically on order confirmation pages

For premium modules, enter your licence key under **Giveaways Add-ons** in the WordPress admin menu.

== Frequently Asked Questions ==

= Does this work without Giveaway for WooCommerce by Flintop? =

No. CompKit Game Engine is an add-on for Giveaway for WooCommerce by Flintop (formerly Lottery for WooCommerce) and requires it to be installed and active.

= Is Instant Reveal really free? =

Yes. Instant Reveal and the Smart Email Delay Handler are bundled with the plugin and require no licence key.

= What does the Smart Email Delay Handler do? =

The Smart Email Delay Handler temporarily delays WooCommerce order confirmation emails until all prizes and tickets have been revealed. This prevents customers from accidentally seeing prize information in emails before completing the reveal experience.

= Where do I get licence keys for premium modules? =

Visit https://compkit.kriscreates.co.uk for pricing, bundles, and premium module access.

= Can I use this on a staging or local site? =

Premium licence keys are domain-locked. Contact support if you require a staging domain added to your licence.

= Where do I report bugs? =

Use the WordPress.org support forum for this plugin.

== Changelog ==

= 3.0.3 =

* Each game's own version number now shows on the games list and in the corner of its settings page.
* Every game: the Import / Export button now uses that game's own colour.
* Race Card: rebuilt win and lose result cards - choose the card's orientation, image position, size, text alignment and nudge the image and text into place, with separate settings for mobile and desktop. Cards can take a background colour, your own image, or the ticket's own prize artwork, with border, corner radius and header colours. New settings tabs for race cards, header, modal, countdown and the ticket row.
* Football: the shoot button's hold-to-charge power bar is now fully configurable - show or hide it, set how long a full charge takes, and pick the three colours it ramps through plus the glow at full power. The aim marker is now bounded to the goal, so it can no longer be driven above the crossbar.
* Slots: separate mobile and desktop sizing and spacing, new settings for the results strip, ticket line, reel layout, winning symbol, symbol size, turbo results strip and the win / lose cards. Settings can now be imported and exported per product as well as globally.
* Spin: 62 settings that were only available globally can now be overridden per product. Separate mobile and desktop values with an Editing switch, so you always edit the layout you are looking at. The "View Desktop" button is replaced by a Desktop / Mobile switch that keeps the preview beside your settings, plus a full-size inspector when you want it.
* Balloon Pop: the popup gets corner radius and border settings, and the play area becomes a distinct surface with its own background, corner radius and inset - so the objects stay inside it and your logo sits clearly above the play instead of floating over it. The pops-left count moves into a small badge in the corner of the play area, and the end-of-game message now appears as a notification banner across the top of the popup rather than lying over the objects it is reporting on. Existing settings are carried across, so upgraded games look the same until you change them.
* Balloon Pop: the Auto Play and Quick Play buttons move out of the top bar into a full-width row of their own beneath the play area, matching Slots and Race Card. They now share the width evenly instead of being squeezed in beside the pops-left count, which is centred on its own. All existing button style settings still apply.
* Balloon Pop: new Header tab - add a title above the game with its own colour, size, weight, case and alignment, plus an optional logo image with its own height and alignment. New Overlay settings for the backdrop behind the game: colour, image, opacity and blur. The header bar's own background and count colour move here too, so everything header-related is in one place. Defaults match how the game already looked.
* Balloon Pop: separate mobile and desktop values for the win and lose cards, their text, the final summary banners and the Play / Auto Play / Quick Play buttons, with an Editing switch so you always edit the layout you are looking at. The "View Desktop" button is replaced by a Desktop / Mobile switch that keeps the preview beside your settings, plus a full-size inspector when you want it. Existing settings are untouched - the mobile half follows the desktop value until you move it.
* Grab Claw: per-product settings now open and display correctly, and mirror the global page; the 'Use global' tickboxes are replaced by a per-row Use Global button; the preview drawer opens with the tab; a global theme export can now be imported onto a single product.

= 3.0.2 =

* Game Addons: the "Premium Games plugin is out of date" notice now appears correctly when your installed games plugin is a different version from the engine. It previously never showed.

= 3.0.0 =

**Major release — redesigned admin, live previews everywhere, and far deeper game customisation.**

Architecture
* Premium games are now delivered as a separate **CompKit Game Engine Premium** plugin, installed in one click from the admin. The free plugin no longer downloads or unzips code into itself.
* New in-admin Download / Install flow, including an upgrade prompt when the premium plugin version doesn't match the engine.

New admin experience
* Brand-new admin design across the engine and every game's settings page — consistent CompKit header, tabbed settings, and a **sticky live preview** that updates as you edit.
* Live game previews now appear on both the global settings page **and** the per-product settings panel for every game.

Instant Reveal & Orders Email — fully rebuilt
* Redesigned settings screen matching the game pages, with a **live email preview** of the real order email and the per-prize reveal email (including your WooCommerce email header).
* New Prize Table controls: coupon-button and claim-button colours, editable cash/credit and physical-prize notes, and a prize-table heading.
* New ticket-badge, coupon-button and claim-button **corner-radius and text-size sliders**.
* "Send me a test email" button to preview the reveal email in your inbox.
* The order email message now applies only to orders containing a game.

Per-game custom settings (with per-product overrides and "Use Global" fallback)
* **Spin the Wheel** — wheel size (desktop/mobile), frame image, pointer style + custom badge, segment colours/text/borders/images, full Spin / Play / Reveal-All button styling, ticket-column layout, sound effects, behaviour.
* **Slots** — text / emoji / image reel symbols, reel styling, header, win/lose shown fields, Nudge, Turbo mode, modal, custom sounds.
* **Scratch Card** — Standard, Symbol-match and Sums modes with a Prize Vault, scratch surface, win/lose cards, win popup, full navigation-button styling, sounds.
* **Football Penalty** — stadium images, team strip/kit, advertising boards, scoreboard, controls, results strip, full theming.
* **Race Car** — player/opponent car sprites, track and start-line, trackside billboards, HUD, theme colours, win/lose, sounds.
* **Grab Claw** — built-in style presets, cabinet colours and shape, machine title, 6 custom toy-image slots.
* **Balloon Pop** — object type (balloon, bubble, star, gift box, pumpkin), game-area image, win/lose colours, sounds.
* **Darts** — dart and board styles, branding images, power-bar styling, win/lose colours, sounds.

Reliability
* All games now reliably trigger the instant-win reveal email and correctly hold then release the order confirmation email until every ticket is played.
* Game icons unified to a single source; plugin renamed to **CompKit Game Engine**.

= 2.2.1 =

* Instant Reveal bundled locally with no licence required
* Added Smart Email Delay Handler
* Added premium module interest opt-in form
* Fixed dependency check for Giveaways plugin renamed from Lottery
* Removed external CDN dependencies
* Standardised text domain to giveaways-addons
* Restored SSL verification on licence validation requests

= 2.2.0 =

* Full admin settings overhaul for Spin the Wheel
* Added CSS custom property system for game colours
* Added Reveal All button settings
* Added behaviour settings including auto-play, summary screens, and win popups

= 2.1.0 =

* Added Spin the Wheel module
* Added Slot Machine module
* Added Prize Grab Claw module

= 2.0.0 =

* Initial public release with Instant Reveal and Scratch Card
