WooCommerce integration

Spin to win wheel for WooCommerce

Spin to win wheel for WooCommerce, plus a scratch card and a mystery box: the free DealCraft plugin from WordPress.org puts the game on your shop and checks every prize code at the cart. You set the win rate and the budget, the server decides each result before the animation, and a code is spent only when the order is paid.

Install it in 4 steps

  1. Install the plugin

    In your WordPress admin go to Plugins, then Add New, search for DealCraft, click Install Now and then Activate. It is the official listing at wordpress.org/plugins/dealcraft, so updates arrive like any other plugin.

  2. Create your keys

    Sign up for DealCraft, build your game and open Integrations, then WooCommerce, and create the key pair. The secret key checks codes from your server, the public key shows the game. The secret key is shown only once, so copy both straight away.

  3. Paste the keys into WooCommerce

    Go to WooCommerce, then Settings, then DealCraft. Paste the secret key and the public key and save. The page tells you whether the key works.

  4. Check it on your shop

    Open any page of your shop with ?deal_preview=1 at the end of the address to see the game at once. Play, tap Claim my prize, and the cart opens with the prize applied.

What the plugin checks at the cart

Every prize code goes through the same checks, so a prize cannot be spent twice or on the wrong order.

  • That the code is a DealCraft prize code. Your own WooCommerce coupons are left alone and keep working as before.
  • That the prize's minimum purchase is met by the rest of the cart, not by the prize's own item, so a free item alone is never free.
  • The code again, without any cache, when the order is placed, so a code spent a moment ago is refused before the payment is taken.
  • That no other open order holds the code. A placed order keeps its codes while it is pending, on hold or processing, for example while a bank transfer is on its way.
  • The order status: the code is marked used when the order is paid. If you take cash on delivery, choose Completed instead, so the code is spent only when the parcel is paid for.
  • Cancellations, refunds and failed payments: the code is given back to the customer.
  • What happens when DealCraft cannot be reached: the code is refused, because a cart is never discounted on a guess. Marking a paid order's code as used is retried every five minutes, up to six times, and noted on the order.

Prizes the plugin understands

Percent off
Applied to the whole cart, like a normal coupon.
Amount off
A fixed amount in your shop's currency, applied to the whole cart.
Free item
Set the prize's product code in DealCraft to the product's SKU in WooCommerce. One unit of that product becomes free, and claiming the prize puts it in the cart.
Free delivery
A custom prize with the product code free_shipping. Set your free shipping method to require a coupon.
Any other custom prize
You hand it over yourself from the DealCraft dashboard. The coupon field tells the customer to contact the shop.

One tap from win to cart

A winner does not have to copy anything. The Claim my prize button in the game adds the product they were looking at and applies the code, so they land in the cart with the discount already there. Typing the code into the coupon field works too.

If the cart is empty or still below the prize's minimum purchase, the prize is saved and applied as soon as the cart reaches it.

Why no WooCommerce coupons are created

Many wheel plugins create a real WooCommerce coupon for every prize. Those coupons can be shared and reused, and they fill up your coupon list.

The DealCraft plugin builds the discount in memory from DealCraft's answer for that one code. Nothing is saved in WooCommerce that could be spent behind DealCraft's back, so every code has one state in one place, and the budget cap and maximum winners you set really hold.

Rehearse with a test key

Create a test key under API keys on the Integrations page and paste it instead of the live one. Codes are checked for real but never spent, and every order gets a note saying what would have happened.

Switch to the live key before you launch the game.

Caching and speed plugins

WP Rocket, LiteSpeed Cache and Autoptimize are told to leave the DealCraft script alone. With any other optimiser, exclude /w.js from combining, deferring and delaying.

If you already pasted the DealCraft script into your theme, you can leave it: the script runs only once.

What you need

  • WordPress 5.8 or newer with WooCommerce.
  • PHP 7.2 or newer.
  • A DealCraft account. The free plan is enough to start and needs no card.
  • The plugin's settings are in English. The file you can download from the dashboard also brings Georgian, Spanish and Russian.

Questions

Is the WooCommerce plugin free?
Yes. The plugin is free on WordPress.org, and the DealCraft free plan is enough to run your first game. Paid plans start at 29 dollars a month when you need more plays.
Does the plugin create WooCommerce coupons?
No. The discount is built from DealCraft's answer for each code at the cart, so no coupon is saved in WooCommerce and none can be reused.
What happens to a prize code when an order is refunded?
When an order is cancelled, refunded or fails, the plugin gives the code back to the customer.
Will my own WooCommerce coupons still work?
Yes. The plugin only answers for DealCraft prize codes. Your own coupons work exactly as before.
Is it only a spin to win wheel?
No. The same plugin runs a wheel, a scratch card or a mystery box. You pick the game, the prizes, the win rate and the budget in DealCraft.
Is there a Shopify version?
Yes. Connect the DealCraft Shopify app from Integrations, then switch the DealCraft app embed on in your theme editor.

Put a wheel on your WooCommerce shop

Create a free account, build the game and set its win rate and budget. Then install the plugin and paste your keys.

Start free