Description
Mikhailkyrychenko Discount Battle Game for WooCommerce adds a playable catapult battle to a WooCommerce promotion. Configure which battlefields appear, how many reward attempts each visitor gets, which products qualify, and what coupon is issued after a win.
Display the game in a popup across your website or place it on selected pages with a shortcode. The popup can open after a delay, after a visitor scrolls, or either way. Set its display frequency and campaign dates in the admin settings.
The game includes four battlefields: Woodland Practice, Solar Bastion, Lacuna Residences, and Frostline Relay. Each reward map has its own discount, eligible and excluded products, attempt limit, coupon usage rules, expiry, and reward cap. Woodland Practice is unlimited and never issues a coupon. Store owners can optionally keep exhausted or already-won maps available for unlimited free play.
The mobile game is designed for landscape orientation. Players can pan around the battlefield with touch, pinch to zoom, and swipe the bottom skill bar. Loading status is shown while the game and selected map start.
Winning creates a standard WooCommerce coupon with the map’s configured product and usage restrictions. Players can copy the code or follow the product link to use it in the cart. A statistics page reports overall activity or recent activity by map.
The bundled battle game is included with its human-readable source under game-source/. Phaser is included under the MIT License. See THIRD-PARTY-LICENSES.txt for the third-party notice and README.md for build notes.
Important: the browser reports the game result. The server verifies a recorded attempt and applies campaign limits, but does not independently replay the complete simulation. Avoid relying on a game win as the only protection for a high-value discount.
Features
- Configure and enable each battlefield independently.
- Set a separate discount, eligible products, excluded products, coupon rules, expiry, and reward-attempt limit for each reward map.
- Offer an unlimited practice map that never creates a discount or coupon.
- Optionally allow unlimited free play on maps after a visitor wins or uses their reward attempts.
- Show the campaign site-wide or on selected pages with
[wpcdg_discount_game]. - Choose a delay, scroll threshold, display frequency, and campaign schedule.
- Issue standard WooCommerce coupons that honor product restrictions, spend limits, sale-item rules, and individual-use settings.
- Review campaign totals and recent attempts, with filters for each map.
- Reset all visitors’ attempt counters and win state without deleting historical records or existing coupons.
- Play on mobile in landscape with touch pan, pinch zoom, swipeable skills, and loading indicators.
- Use WordPress personal-data export and erasure tools for game records attached to registered accounts.
Screenshots






Installation
- Install and activate WordPress 6.5 or later and WooCommerce.
- Upload the plugin ZIP in Plugins Add New Plugin Upload Plugin, or install it from the WordPress Plugin Directory after approval.
- Activate Mikhailkyrychenko Discount Battle Game for WooCommerce.
- Open Discount Battle Settings. Enable the campaign and select the maps to show.
- For each reward map, select the WooCommerce products, discount type and amount, number of reward attempts, coupon rules, and expiration. Training is always unlimited and does not issue coupons.
- Select Across the whole website or choose shortcode placement. For shortcode placement, add
[wpcdg_discount_game]to the pages where the game should appear. - Choose when and how often the popup opens and set optional start and end dates.
- Test the complete flow with a low-value discount and a test product before launching a live campaign.
For step-by-step guidance inside WordPress, open Discount Battle Setup Guide. Use Discount Battle Statistics to review game activity.
Installation video walkthrough: https://youtu.be/Vs-I8v9_ON4
FAQ
-
Does this plugin require WooCommerce?
-
Yes. WooCommerce is required for product selection, coupon creation, and applying a reward in the cart. The dependency is declared in the plugin header.
-
How do I choose where the game appears?
-
Open Discount Battle Settings. Choose Across the whole website or Only on pages with [wpcdg_discount_game]. In shortcode mode, add
[wpcdg_discount_game]to each desired page. -
How do maps, attempts, and free play work?
-
Each reward map can be enabled separately and has its own reward-attempt limit and coupon campaign. Woodland Practice is always unlimited and never offers a coupon. The After reward attempts run out setting controls whether a separate free-play launcher stays available after reward attempts are used. It lets visitors practice or replay maps they have already won without earning another coupon.
-
What happens when a player wins?
-
The plugin asks WooCommerce to create a coupon using that map’s campaign settings. The game displays the code and product links. The visitor can return to the map menu; free replay is available when enabled in Settings. Issued coupon codes remain WooCommerce coupons and are not removed by the global progress reset.
-
How do I play on a phone?
-
Rotate the phone to landscape. Drag with one finger to move around the map, pinch with two fingers to zoom, and swipe the bottom skill bar to reach additional controls. In the game, drag the catapult arm and release to fire. Select a skill, then tap a landed Savling to assign it. Space pauses, F toggles 2× speed, and Q/W switches between Savlings and barrels.
-
What data does the plugin store?
-
Game records store the WordPress user ID for logged-in visitors or a keyed hash of a random first-party
wpcdg_visitorcookie for logged-out visitors (the cookie expires after one year). Records include the map, result, timestamps, and submitted gameplay replay. A keyed IP hash used for rate limiting expires after one minute. Popup frequency uses session or local storage. Records remain in the WordPress database until removed. The plugin sends no game analytics to an external service.WordPress privacy tools export and erase records linked to registered accounts. If an issued coupon must remain redeemable, its attempt row is anonymized and the technical coupon link retained. Logged-out records are not linked to email and cannot be found by email-based privacy tools; the site owner must remove them. Resetting progress preserves history and issued coupons.
-
Is the game result independently verified by the server?
-
The server verifies that an attempt was recorded, checks the minimum elapsed time, rate limits requests, and applies reward rules. The game outcome itself is reported by the browser and the server does not independently replay the full simulation. Use a conservative reward for this style of campaign.
-
Where can I review statistics or reset attempts?
-
Open Discount Battle Statistics to see overall totals, filter by map, or inspect recent activity. The reset control on the Settings page resets attempt counters and win state for all visitors and all maps. It does not delete historical attempts or coupons already issued.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“Mikhailkyrychenko Discount Battle Game for WooCommerce” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Mikhailkyrychenko Discount Battle Game for WooCommerce” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
0.6.1
- Add a Setup Guide page to the Discount Battle admin menu with configuration, placement, control, mobile, and troubleshooting guidance.
- Add the Climber skill to Solar Bastion and Lacuna Residences.
- Register personal-data export and erasure callbacks and suggest privacy-policy text.
- Declare the WooCommerce dependency and GPL license metadata.
- Remove a developer-machine path from the game build script so the included source can be rebuilt on another computer.
- Fix closing the embedded game from the free-play menu before a reward attempt starts.
0.6.0
- Add Woodland Practice, Solar Bastion, and Lacuna Residences while retaining Frostline Relay as the hard battlefield.
- Add per-map availability, reward attempts, coupon rules, free replay options, statistics, and global progress reset.
- Add mobile landscape play, touch panning, pinch zoom, a swipeable skill bar, and loading status for the game and map.
- Return players to map selection after a battle so they can continue playing without closing the popup.
- Add completion results that show the issued WooCommerce coupon and links for eligible products.
