Lottery, Lucky Draw, Contests, Raffles Lottery, Lucky Draw, Contests, Raffles Lottery, Lucky Draw, Contests, Raffles Lottery, Lucky Draw, Contests, Raffles
  • Home
  • Contest
    • CellPhones
    • Jackets
    • Motors
    • Shoes
    • T-Shirts
    • Watches
  • Winners
  • Buy Tickets
  • Blog
  • FAQ
  • Account
    • My account
    • Registration From
Lottery, Lucky Draw, Contests, Raffles Lottery, Lucky Draw, Contests, Raffles
  • Home
  • Contest
    • CellPhones
    • Jackets
    • Motors
    • Shoes
    • T-Shirts
    • Watches
  • Winners
  • Buy Tickets
  • Blog
  • FAQ
  • Account
    • My account
    • Registration From
Blog
Lottery, Lucky Draw, Contests, Raffles / Uncategorized / Quick Lottery Setup
Sep 15

Quick Lottery Setup

  • September 15, 2025
  • newadmin
  • No Comments
  • Uncategorized

Quick Lottery Setup

Setting up new lottery is easy:

  • make sure all steps from Installation are done (WooCommerce installed, plugin enabled, cronjobs set)
  • go to Products => Add Products
  • add title, description, images, featured image, select category – all things you do when adding regular product
  • in Product Data dropdown menu select Lottery
  • you will see new tab in left menu named Lottery, see screenshot:
    screenshot
  • fill all details (they are self explainable)
  • set lottery duration by setting start and end date
  • publish product (lottery)

In WooCommerce Settings -> lottery you can set lottery base page where you display a list of all lotteries (archive page). Please see note if you want to set your lottery page as home page. If you have lottery only website there is no need to setup lottery base page, you can use WooCommerce shop page.

When creating new lottery make sure to create it via add new product rather than cloning product or existing lottery. If you clone / copy existing lottery all custom meta will be cloned. That means if lottery has finished, meta field that defines finished lotteries will also be cloned and lottery will always look like it is finished. To create new lottery from existing one use relist feature.

If you need to trash / cancel order please go to edit order, cancel it by changing order status and then trash it. That is proper way to do order cancellation for lotteries, otherwise (if you just trash order) log data can be left in lottery log tables.


 

More Info

New product type lottery:

screenshot

Lottery edit product screenshot (with Pick Number Mod addon for WooCommerce Lottery):

screenshot

Plugin Options

Settings are mostly self explainable, please see screenshot below. You can enable or disable showing past and future lotteries, another useful setting is whether to mix regular products with lotteries or just show lotteries on separate page (defined via WC Lottery Base Page dropdown option, see screenshot).

WooCommerce lottery settings without pick number mod addon

Screenshot above includes available settings for Pick Number Mod addon for WooCommerce Lottery (options listed under title “Lottery pick number and answer” are related to Pick Number Mod addon).

On screenshot below you can see how product list with lotteries looks like. Lottery status icon colors: red – active lottery, orange – finished, red – failed. Column “product type” (with icons) on the products admin screen in WooCommerce was removed in version 3.4.0 and in order to see icons you need to install WooCommerce Product Type Column plugin. See FAQ item no 30.

screenshot

If lottery has failed, in product / lottery details you will see option to “Refund” or buttons to “Relist” or “Extend” lottery. “Refund” enables you to refund all tickets to participants if your lottery rules require that and your payment gateway supports refunds. “Extend” allows extension of end date keeping all current participants (and their orders) while “Relist” resets lottery and it starts with 0 participants. Only failed lotteries can be extended (or refunded) while all finished lotteries can be relisted. See FAQ item no 32.

screenshot

Once lottery is finished you can view winners on single lottery page or in wp-admin edit product page. Below are screenshots.Beside that you can create my lotteries page for users where you can use this shortcode: show user’s lotteries (active lotteries in which user participates and list of user’s won lotteries) –

Please log in to see your lotteries.

screenshot
screenshot

In lottery details block with lottery history entries enables you to view and delete ticket orders, export them to CSV or Excel and view history prior relisting. Check screenshot below. Failed lotteries can be relisted (restarted – meaning participants will be lost) or extended (end date will be changed) keeping all current participants.

screenshot

How does Lottery plugin pick winners (or winning numbers if you use Pick Number addon)?

Winner(s) is / are picked randomly once lottery is finished or you can manually enter winning numbers in case you have Pick Number Mod addon. Plugin uses mt_rand PHP function to randomly pick winners. PHP function mt_rand() which provides solid randomization for this purpose.

If you use WooCommerce Lottery (also with Pick Number Mod addon) and for example you have setup lottery with max 100 tickets and min 50 tickets, then if you sell 55 tickets winner(s) will be choosen between those 55 tickets not all 100 tickets.

With Pick Number Mod addon you can get also different behaviour with enabled checkbox option called “Manual winner picking”, meaning that when lottery ends and after you generate randomly winning numbers (or use national lottery numbers or random.org) you will enter numbers in text input field. It is then possible that your lottery could end without winners (if none of participants picked right number(s)).

With Pick Number Mod and question / answers feature enabled winners will be choosen among those with correct answer only. In case you are manually entering winning numbers you will need to be sure that winning number has correct answer – this can be seen in lottery history table block (which you can export to Excel or CSV for easier management).

Shortcodes

Here is a list of all available plugin shortcodes. Some shortcodes accept optional orderby and order attributes. Shortcode

  • Sale!

    2024 Ford Escape SE

    $395.00 $380.00
    Participate
  • Sale!

    2024 Honda Pilot SPORT

    $445.00 $435.00
    Participate
  • Sale!

    2024 Tesla Model 5 Long Range Dual Motor

    $445.00 $435.00
    Participate
  • Sale!

    2024 Toyota Camry Hybrid SE

    $500.00 $495.00
    Participate
  • Sale!

    Apple iPhone 15 Pro Max 256GB DEEP PURPLE

    $40.00 $39.00
    Participate
  • Sale!

    Apple Watch Series 7 GPS 45mm Starlight

    $20.00 $17.00
    Participate
  • Sale!

    Jordan 1 Retro Low Fragment Design x Travis Scott

    $35.00 $34.00
    Participate
  • Sale!

    OMEGA Speedmaster 3510.50 Chronograph Men’s Watch

    $40.00 $39.00
    Participate
  • Sale!

    Samsung Galaxy S24 Ultra 5G S908 AT&T Verizon T-Mobile US Cellular

    $30.00 $24.00
    Participate
implements paging and attributes like
  • Sale!

    2024 Ford Escape SE

    $395.00 $380.00
    Participate
  • Sale!

    2024 Honda Pilot SPORT

    $445.00 $435.00
    Participate
  • Sale!

    2024 Tesla Model 5 Long Range Dual Motor

    $445.00 $435.00
    Participate
  • Sale!

    2024 Toyota Camry Hybrid SE

    $500.00 $495.00
    Participate
  • Sale!

    Apple iPhone 15 Pro Max 256GB DEEP PURPLE

    $40.00 $39.00
    Participate
  • Sale!

    Apple Watch Series 7 GPS 45mm Starlight

    $20.00 $17.00
    Participate
  • Bounty Grey

    Rated 3.00 out of 5
    $109.95
    Add to cart
  • Sale!

    Jordan 1 Retro Low Fragment Design x Travis Scott

    $35.00 $34.00
    Participate
  • Sale!

    OMEGA Speedmaster 3510.50 Chronograph Men’s Watch

    $40.00 $39.00
    Participate
  • Paris

    $129.95
    Add to cart
  • Sale!

    Samsung Galaxy S24 Ultra 5G S908 AT&T Verizon T-Mobile US Cellular

    $30.00 $24.00
    Participate
shortcode in WooCommerce – see list of all available options here. Other shortcodes do not implement those attributes.

  • show lottery winners – [lotteries_winners], [lotteries_winners paginate="true" limit="12" order="desc"]
  • show featured lotteries –[featured_lotteries], [featured_lotteries paginate="true" limit="12" columns="4" orderby="date" order="desc"]
  • show ending soon lotteries – [ending_soon_lotteries], [ending_soon_lotteries paginate="true" limit="12" columns="4" order="desc" future="no" lottery_status="active"]
  • show recent lotteries, lottery_status=”active” attribute filters out finished lotteries – [recent_lotteries], [recent_lotteries paginate="true" limit="12" columns="4" orderby="date" order="desc" lottery_status="active"]
  • show future lotteries – [future_lotteries], [future_lotteries paginate="true" limit="12" columns="4" orderby="date" order="desc"]
  • show lotteries (with specific product ID) – [lotteries ids="1,2,3,4,5"] this shortcode supports attributes (pagination and sort) similar to WooCommerce shortcode complete list of options is here
  • show user’s lotteries (active lotteries in which user participates and list of user’s won lotteries) – [my_lotteries], [my_lotteries paginate="true" limit="5"]
  • show past / ended lotteries – [finished_lotteries], [finished_lotteries paginate="true" limit="12" columns="4" order="desc"]
  • shortcode for lucky dip with quantity example (Pick Number Mod addon only) – [lottery_lucky_dip_buton qty="5" label="buy 5 tickets"]
  • shortcode to display all instant wins (Pick Number Mod addon only) – [lottery_all_instant_wins paginate="true" limit="5" orderby="title"]
  • shortcode to display all instant winners (Pick Number Mod addon only) – [lottery_all_instant_winners limit="5"]
  • shortcode to display all instant winners tab (Pick Number Mod addon only), if you use this shortcode you can disable instant wins TAB in Woo Settings > Lottery settings – [lottery_instant_winners_tab]

Reference for each shortcode we have can be found in public\class-wc-lottery-shortcodes.php and public\class-wc-shortcode-lotteries.php

  • Facebook
  • Twitter
  • Reddit
  • Pinterest
  • Google+
  • LinkedIn
  • E-Mail

About The Author

Leave a reply Cancel reply

Your email address will not be published. Required fields are marked *

Archives

  • September 2025
  • September 2022
  • December 2014
  • November 2013
  • October 2013
  • September 2013

Categories

  • Business
  • News
  • Sports
  • Travel
  • Uncategorized

Featured

  • Apple iPhone 15 Pro Max 256GB DEEP PURPLE $40.00 $39.00 Time left
  • OMEGA Speedmaster 3510.50 Chronograph Men’s Watch $40.00 $39.00 Time left
  • Jordan 1 Retro Low Fragment Design x Travis Scott $35.00 $34.00 Time left

Ending Soon

  • Jordan 1 Retro Low Fragment Design x Travis Scott $35.00 $34.00Time left
  • Samsung Galaxy S24 Ultra 5G S908 AT&T Verizon T-Mobile US Cellular $30.00 $24.00Time left
  • Apple iPhone 15 Pro Max 256GB DEEP PURPLE $40.00 $39.00Time left

Recent

  • Apple iPhone 15 Pro Max 256GB DEEP PURPLE $40.00 $39.00Time left
  • 2024 Tesla Model 5 Long Range Dual Motor $445.00 $435.00Time left
  • OMEGA Speedmaster 3510.50 Chronograph Men’s Watch $40.00 $39.00Time left

Product tags

bag Camry iphone Jordan omega paris Toyota
© 2022 UniLotto
  • About Us
  • My Lotteries
  • Blog
  • Contact