1. Documentation /
  2. Mystery Gift Box for WooCommerce

Mystery Gift Box for WooCommerce

Mystery Gift Box for WooCommerce allows you to sell loot boxes (like in video games) that contain high-value prizes in your WooCommerce shop.


↑ Back to top

1. Download the mystery-gift-box-for-woocommerce.zip file from your WooCommerce account.

2. Go to: WordPress Admin > Plugins > Add New and Upload Plugin with the file you downloaded with Choose File.

3. Install Now and Activate the extension.

More information at: Install and Activate Plugins/Extensions.

Setup and Configuration

↑ Back to top

General Settings

↑ Back to top
  • To allow customer to purchase mystery gift box products, go to Mystery Gift Box > Settings > General and select Enable Mystery Gift Box option.
  • To allow customer to purchase mystery gift box products along with other products on the same transaction/order, enable Allow Mystery Gift Box Purchase with Other Products option.
  • To process gift items(products) in a seperate order, set the Order to Process Gift Items option as Separate order and set the default order status of the order in Default Order Status of Gift Product Order when Generated option To process gift items in the same order which the customer has purchased the mystery box, set it as Mystery box purchase order

  • You can hide specific payment methods if the customer has added mystery box product to the cart. The selected payment gateways in Payment Methods to be Hidden for Mystery Gift Box Purchase option will be hidden in checkout page.

Display Settings

↑ Back to top
  • In this section, you will be able to Show/Hide the details displayed in Mystery Box single product page. You can show/hide the below details,

    1. Gift Items Price Range Message

    2. Mystery Gift Box Schedule Message

    3. List of Gift Items

    4. Gift Items Stock

    5. Gift Type

    6. Gift Value

    7. Gift Items with Out of Stock Status


↑ Back to top
  • If you want to restrict customers from purchasing the mystery box product, then in Show Mystery Gift Products for option, select the users/user roles to restrict as per your needs.
  • To allow Guest users to purchase mystery box products, then enable Allow Guest Users to Purchase Mystery Gift Box Products option.
  • By default, customers can purchase a mystery gift box product any number of times. If you want to limit the customer from purchasing a mystery box product, then select Limited in Mystery Box Purchase Per Product Per Customer option and set the limit in Mystery Gift Box Purchase Per Product Limit Per Customer option.


↑ Back to top
In this section, you can customize all the labels displayed in the frontend.


↑ Back to top
In this section, you can customize all the messages displayed in the frontend.

Creating a Mystery Gift Box Product

↑ Back to top
  • To create a mystery gift box product, go to Products > Add New and set the Product Type as Mystery Gift Box.
  • Configure the product details as per your requirement(Price, Inventory, Shipping, etc).
  • Then, go to the Mystery Gift Box section.
  • In the Product Selection Method option, select the algorithm used for selecting the Gift product. The workflow of each Algorithm is as follows,
Completely Random: In this method, the product(s) will be randomly picked and will be to the customer. Current Stock: In this method, the product with the highest current stock will be given to the customer. If the stock of a gift product is set as “Unlimited”, then it will be picked up first for giving to the customer. Priority: In this method, you have to give priority to each gift product that you have set. The product with the highest given priority will be picked up first and given to customers until the stock is reduced to 0. The next product will be picked up only after the current stock of the highest priority given product is reduced to 0. The lower the number, the higher the priority. For Example: If you have set the priority as “1” for a gift product, it will be picked up first. Note: In all these methods, if you give more than 1 product as a gift for the customer for purchasing a mystery gift box, then multiple quantities of the same gift product will not be given to the customer(except in a case such that if you are going to give more gift products than the list of available gift products which you have set).
  • In the Number of products to be gifted for one mystery box purchase option, set how many products you want to gift the customer for purchasing the mystery box.
  • In the List of Gift Items, click Add New button to add a gift item. Select the gift type(Product/Coupon/Wallet Balance).

  • Publish the product.
  • Coupon and Wallet Balance type is not applicable for “Current Stock” product selection method.

  • Wallet Balance type will be displayed only when “Wallet for WooCommerce” plugin is Active.

  • Wallet Balance type will be displayed only when Allow Guest Users to Purchase Mystery Gift Box Products option(Mystery Gift Box > Settings > General > Restriction Settings) is disabled.

  • While configuring the inventory, please make sure that the inventory of the Mystery Gift Box Product is always less than the inventory of the Gift products linked to the Mystery Gift Box.


↑ Back to top
  • Once the mystery gift box has been configured, the product will be ready for purchase.
  • On the single product page, the list of gift products in the mystery gift box along with the price range will be displayed.
  • An email will be sent to the user once the purchase is completed. This email will have information about the gift product which the customer will be receiving.
  • The Mystery Gift Box Purchases made by the user will be listed in the “Mystery Box Purchases” section on the My Account page.
  • The Mystery Gift Box purchases will be displayed in a table for the admin to process the orders.


↑ Back to top
Mystery Gift Box for WooCommerce is translation ready, meaning you can edit the po files by which you can translate the text to any language. Steps to perform the translation are as follows. For example, a translation to French.
  • Download and install Poedit
  • Open the file mystery-gift-box-for-woocommerce > languages > mystery-gift-box-for-woocommerce.pot using Poedit.
  • Create a new translation file by clicking Create new translation button.
  • Choose the Source text and set its corresponding French text in Translation Text Area.
  • Save the changes.
  • Save the file name as mystery-gift-box-for-woocommerce-fr_FR.po.
  • Then go to WordPress dashboard > Settings > General and select the Site Language as French.