WooCommerce Lottery resources and ticket limits – can user purchase 30 000 tickets at once?

Resources and ticket limits – are there any limitations for WooCommerce Lottery? We cover this topic in our tutorial about plugin limits. WooCommerce Lottery plugin is basically limited with hosting solution that your WordPress installation runs on. There is no limit how many tickets can be sold at once or how many numbers can you list for lottery but usually on lower spec hosting (especially on cheaper shared hosting) you will hit limit around couple thousands ticket purchases – orders (around 3 000 to 5 000 orders). This would be same as if you would run regular WooCommerce web shop and problem is easily resolved by upgrading your hosting (you can contact us for suggestion).

There are couple of limits you can hit (for this example we will consider WordPress has only WooCommerce and our plugin installed and nothing else) – how many different users (orders) have purchased tickets in your store, more orders mean you need more resources for order data and its custom fields. Another is having a lot of tickets for a lottery say 1 million – this is not problem unless you want pick number table displayed which becomes cumbersome and we strongly suggest agains that (just use randomly assign ticket number instead). Sometimes lot of tickets cause JS issue in backend for auction history export table – for that we have option in Lottery Settings to disable this feature.

Cronjob that we suggest you install is lightweight and is used to finish lottery on time in case WordPress does not have enough traffic to run its internal cronjob. For busier websites this can be skipped, everything will work fine and in most cases lotteries will be ended on time.

When planning big lottery site with many orders you need to keep on your mind that except orders we log data to two log tables used by our plugins called wc_lottery_log and wc_lottery_pn_log which should not be big problem since only integer values are logged to those tables.

Another thing to consider is raising PHP memory limit using WordPress constants. Sometimes, it’s a good idea to tailor WordPress’ memory allocation separately for the frontend and backend. That’s where WP_MAX_MEMORY_LIMIT comes in. WP_MAX_MEMORY_LIMIT allows you to set a different memory limit for WordPress’ administration dashboard. This is useful because certain administration tasks require more RAM. Below is an example of how you can use WP_MEMORY_LIMIT and WP_MAX_MEMORY_LIMIT together.

define( 'WP_MEMORY_LIMIT', '512M' );
define( 'WP_MAX_MEMORY_LIMIT', '2048M');

In general cheapest dedicated server (quad core cpu and 8GB – 16GB memory, normal disk drive no need for SSD) should enable site owner to run big lottery website with hundreds daily orders without performance issues. If you go for cloud solution you will need to get some mid priced solution since from our experience cheap cloud / vps proved to be problematic (probably due to heavy resource throttling done by their service providers). Further scaling can be done by separating app and db and have them on separate servers / vps or cloud instances.

We strongly suggest that before going to production you test all of these cases, for example try to purchase 1 million tickets or do some stress testing and see what is happening in your particular setup. You do not want to end up migrating website to new setup during marketing campaign and fixing things while orders are coming in.

Other than that we can suggest keeping number of active plugins to minimum, do some WordPress / WooCommerce optimization and use 3rd party / external SMTP server for mail notifications (offload main app server and better inboxing rates).

Icons missing in product list for auctions, lotteries and group buy / deals

We had a lot of inquries about missing icons in product type column WooCommerce product list. Users were asking why icons vanished in WooCommerce product list and how can they get it back. From WooCommerce 3.4.0 update, WooCommerce developers removed that column in product list (as a result of users’ feedback).

There is way to restore it back using this plugin https://wordpress.org/plugins/woocommerce-product-type-column/ so in case you are too missing this feature, download and activate this plugin and icons will be back in product list.

Using code snippets and template customizations in child theme

Every now and then you need to modify plugin or theme’s templates, add some code snippet or change couple things using CSS. Best way to include your changes and make them update proof is to do it via child theme. Child theme is special theme that loads parent theme files from parent theme folder and your customized files from child theme folder like templates and styles.

Using code snippet plugins is not advised due to performance penalty they cause. Those plugins save code snippets to DB then on each user request these plugins check databaseand load code then execute it. You want to have code ready for execution early in request (so best is to have code in your child theme) and not doing additional database request to retriece and then execute code. There is also possibility for exploits with these plugins.

You need to have base (parent) theme like StoreFront (or Avada, Divi, any WooCommerce compatible theme will do just fine) and then you create new folder wp-content\themes\mycustomtheme\ with its own style.css and functions.php

Here is how to create child theme in 4 easy steps:

Step 1: create child theme folder for example /wp-content/themes/my-first-child-theme

Step 2: in that folder create style.css and functions.php filse, in style.css add code below:

/*
Theme Name: My Sample WordPress Child Theme
Theme URI: https://wpgenie.org
Description: StoreFront theme based child theme
Author: wpgenie
Author URI: https://wpgenie.org
Template: storefront
Version: 1.0
*/

Step 3: go to Appearance -> Themes and activate your newly created child theme.

Step 4: you can now add your modified templates to child theme folder, code snippets to your functions.php and custom CSS to your child theme’s style.css

Once you have customizations in your child theme you can now update plugin or theme without worries that your modifications will be lost during an update (theme or plugin update). ZIP with child theme described in this tutorial can be downloaded here (it will work only if you have installed StoreFront theme).

Detailed tutorial is here How to Create a Child Theme an article by WordPress about child themes.

For example you want to edit Simple Auction template from folder \woocommerce-simple-auctions\templates\single-product\bid.php – copy it to wp-content\themes\yourchildtheme\woocommerce\single-product\bid.php and make changes there. If you do not see woocommerce folder in your child theme then create it. You will need some kind of file manager best is to use FTP client (for example FileZilla or file managed included in your hosting control panel).

Illustration from https://zenwp.co/child-theme/
How child theme templating works from https://zenwp.co/child-theme/

We have extensive archive of code snippets and modified plugin templates on our Pastebin archive.

WooCommerce Lottery and Pick Number addon Now with full Elementor support

elementor lottery

Today we have released version 2.0.0 for WooCommerce Lottery and Pick Number Mod addon which include full Elementor support. In today’s update there were few minor changes and fixes too and version has been bumped to v2.0.0 for both plugin and addon. To edit lottery template with Elementor you need Elementor (free) plus Elementor Pro (paid) or PRO Elements (free).

Couple of screenshots how it looks like Elementor support:

WooCommerce Lottery and Pick Number addon natively supported in Elementor

Easiest way to create your single lottery page with Elementor is to create new template for single product. Click on wp-admin menu entry Templates -> Add New and you will get modal popup like on image below:

There you can now create your new single lottery product page – add, rearrange and style Woo Lottery elements like countdown, progress bar, lottery winner, lottery info and Pick Number Mod elements like ticket numbers, lucky dip and question / answers.

In order not to have template applied to all single products, you need to tag or categorize lotteries and then apply template only to tag or category your lotteries are tagged / categorized with.

Make sure that in Elementor Settings -> Experiments beta option “Landing Pages” is set to “inactive” otherwise you will have issues with lottery base page. See screenshot below:

elementor landing pages experiment should be set to inactive

If you miss WordPress widgets when searching widgets in Elementor you might need to disable this experiment – Hide native WordPress widgets from search results. This option is located in Elementor Settings – Experiments (and was introduced in Elementor version 3.5.0 so if you have older version you will not have this issue). See screenshot below.

Make sure to check our article about Elementor Loop Templates Performance Issues since this could slow down your site. This is new feature in Elementor which should be used with special care and avoided if possible.

How to create support ticket

We have disabled CodeCanyon integration due to problems with their API and now you need to register account here https://wpgenie.org/my-account after which you need to open ticket at https://wpgenie.org/support There you will have option to open ticket for item purchased on CodeCanyon (and you will be asked to enter purchase code after which item will be loaded and support ticket could be submitted) or for order made on our website.

After creating account click on “Create a ticket”
Just hit next…
And click next again…
Here you will need to copy paste purchase code from CodeCanyon and click next

In case you have purchased some addon from our website you can access ticket support system by going to My Account -> Orders and then in order row you will have option to download addon or get support. Please consult screenshot below.

In case you still have problem please contact us.

Complete List of WordPress Language Locales

List of WordPress locales useful for multilanguage and translations. It can be set in WordPress Settings or in wp-config.php using constant WPLANG like:

define( 'WPLANG', 'es_ES' );

Locale NameNative NameLocale CodeWordPress Locale
AfrikaansAfrikaansafaf
AkanAkanakak
AlbanianShqipsqsq
Algerian Arabicالدارجة الجزايريةarqarq
Amharicአማርኛamam
Arabicالعربيةarar
ArmenianՀայերենhyhy
AromanianArmãneashceruprup_MK
ArpitanArpitanfrpfrp
Assameseঅসমীয়াasas
AzerbaijaniAzərbaycan diliazaz
Azerbaijani (Turkey)Azərbaycan Türkcəsiaz-traz_TR
Balochi Southernبلوچی مکرانیbccbcc
Bashkirбашҡорт телеbaba
BasqueEuskaraeueu
BelarusianБеларуская моваbelbel
Bengaliবাংলাbnbn_BD
BosnianBosanskibsbs_BA
BretonBrezhonegbrbre
BulgarianБългарскиbgbg_BG
CatalanCatalàcaca
Catalan (Balear)Català (Balear)balbal
CebuanoCebuanocebceb
Chinese (China)简体中文zh-cnzh_CN
Chinese (Hong Kong)香港中文版zh-hkzh_HK
Chinese (Taiwan)繁體中文zh-twzh_TW
CorsicanCorsucoco
CroatianHrvatskihrhr
CzechČeština‎cscs_CZ
DanishDanskdada_DK
Dhivehiދިވެހިdvdv
DutchNederlandsnlnl_NL
Dutch (Belgium)Nederlands (België)nl-benl_BE
Dzongkhaརྫོང་ཁdzodzo
Emoji(Emoji)art-xemojiart_xemoji
EnglishEnglishenen_US
English (Australia)English (Australia)en-auen_AU
English (Canada)English (Canada)en-caen_CA
English (New Zealand)English (New Zealand)en-nzen_NZ
English (South Africa)English (South Africa)en-saen_SA
English (UK)English (UK)en-gben_GB
EsperantoEsperantoeoeo
EstonianEestietet
FaroeseFøroysktfofo
FinnishSuomififi
French (Belgium)Français de Belgiquefr-befr_BE
French (Canada)Français du Canadafr-cafr_CA
French (France)Françaisfrfr_FR
FrisianFryskfyfy
FriulianFriulianfurfur
FulahPulaarfucfuc
GalicianGalegoglgl_ES
Georgianქართულიkaka_GE
GermanDeutschdede_DE
German (Switzerland)Deutsch (Schweiz)de-chde_CH
GreekΕλληνικάelel
GreenlandicKalaallisutkalkal
GuaraníAvañe’ẽgngn
Gujaratiગુજરાતીgugu
HawaiianŌlelo Hawaiʻihawhaw_US
Hazaragiهزاره گیhazhaz
Hebrewעִבְרִיתhehe_IL
Hindiहिन्दीhihi_IN
HungarianMagyarhuhu_HU
IcelandicÍslenskaisis_IS
IdoIdoidoido
IndonesianBahasa Indonesiaidid_ID
IrishGaeligegaga
ItalianItalianoitit_IT
Japanese日本語jaja
JavaneseBasa Jawajvjv_ID
KabyleTaqbaylitkabkab
Kannadaಕನ್ನಡknkn
KazakhҚазақ тіліkkkk
Khmerភាសាខ្មែរkmkm
KinyarwandaIkinyarwandakinkin
Kirghizкыргыз тилиkyky_KY
Korean한국어koko_KR
Kurdish (Sorani)كوردیckbckb
Laoພາສາລາວlolo
LatvianLatviešu valodalvlv
LimburgishLimburgslili
LingalaNgalalinlin
LithuanianLietuvių kalbaltlt_LT
LuxembourgishLëtzebuergeschlblb_LU
MacedonianМакедонски јазикmkmk_MK
MalagasyMalagasymgmg_MG
MalayBahasa Melayumsms_MY
Malayalamമലയാളംmlml_IN
MaoriTe Reo Māorimrimri
Marathiमराठीmrmr
Mingrelianმარგალური ნინაxmfxmf
MongolianМонголmnmn
MontenegrinCrnogorski jezikmeme_ME
Moroccan Arabicالعربية المغربيةaryary
Myanmar (Burmese)ဗမာစာmyamy_MM
Nepaliनेपालीnene_NP
Norwegian (Bokmål)Norsk bokmålnbnb_NO
Norwegian (Nynorsk)Norsk nynorsknnnn_NO
OccitanOccitanocioci
Oriyaଓଡ଼ିଆoryory
OsseticИронosos
Pashtoپښتوpsps
Persianفارسیfafa_IR
Persian (Afghanistan)(فارسی (افغانستانfa-affa_AF
PolishPolskiplpl_PL
Portuguese (Brazil)Português do Brasilpt-brpt_BR
Portuguese (Portugal)Portuguêsptpt_PT
Punjabiਪੰਜਾਬੀpapa_IN
RohingyaRuáingarhgrhg
RomanianRomânăroro_RO
Romansh ValladerRumantsch Valladerrohroh
RussianРусскийruru_RU
RusynРусиньскыйruerue
SakhaСахалыыsahsah
Sanskritभारतम्sa_insa_IN
SardinianSardusrdsrd
Scottish GaelicGàidhliggdgd
SerbianСрпски језикsrsr_RS
SilesianŚlōnskŏ gŏdkaszlszl
Sindhiسنڌيsndsnd
Sinhalaසිංහලsisi_LK
SlovakSlovenčinasksk_SK
SlovenianSlovenščinaslsl_SI
SomaliAfsoomaalisoso_SO
South Azerbaijaniگؤنئی آذربایجانazbazb
Spanish (Argentina)Español de Argentinaes-ares_AR
Spanish (Chile)Español de Chilees-cles_CL
Spanish (Colombia)Español de Colombiaes-coes_CO
Spanish (Guatemala)Español de Guatemalaes-gtes_GT
Spanish (Mexico)Español de Méxicoes-mxes_MX
Spanish (Peru)Español de Perúes-pees_PE
Spanish (Puerto Rico)Español de Puerto Ricoes-pres_PR
Spanish (Spain)Españoleses_ES
Spanish (Venezuela)Español de Venezuelaes-vees_VE
SundaneseBasa Sundasusu_ID
SwahiliKiswahiliswsw
SwedishSvenskasvsv_SE
Swiss GermanSchwyzerdütschgswgsw
TagalogTagalogtltl
TahitianReo Tahititahtah
TajikТоҷикӣtgtg
Tamazight (Central Atlas)ⵜⴰⵎⴰⵣⵉⵖⵜtzmtzm
Tamilதமிழ்tata_IN
Tamil (Sri Lanka)தமிழ்ta-lkta_LK
TatarТатар телеtttt_RU
Teluguతెలుగుtete
Thaiไทยthth
Tibetanབོད་སྐདbobo
Tigrinyaትግርኛtirtir
TurkishTürkçetrtr_TR
TurkmenTürkmençetuktuk
TweantsTwentstwdtwd
UighurUyƣurqəugug_CN
UkrainianУкраїнськаukuk
Urduاردوurur
UzbekO‘zbekchauzuz_UZ
VietnameseTiếng Việtvivi
WalloonWalonwawa
WelshCymraegcycy
YorubaYorùbáyoryor

New shop / store page

We have new store page and purchase are done via PayPro Global website which allows variety of payment options and better invoicing. After purchase has been completed you will get access to files and we will create you account on wpgenie.org for accessing future updates via My Account / Downloads. Same coupon code works there too!