Installation & Setup
Follow this guide to install and configure Quantum Competitions for WooCommerce on your WordPress site.
Installation Methods
Section titled “Installation Methods”Method 1: WordPress Admin Upload (Standard)
Section titled “Method 1: WordPress Admin Upload (Standard)”- Log into your WordPress Dashboard (
/wp-admin). - Navigate to Plugins > Add New > Upload Plugin.
- Choose the plugin
.zippackage (quantum-competitions-for-woocommerce.zip) and click Install Now. - Once uploaded, click Activate Plugin.
Method 2: Manual FTP / SFTP Upload
Section titled “Method 2: Manual FTP / SFTP Upload”- Extract the
quantum-competitions-for-woocommerce.zipfile on your computer. - Connect to your web server using SFTP/FTP.
- Upload the unzipped
quantum-competitions-for-woocommercefolder into:/wp-content/plugins/ - Go to Plugins > Installed Plugins in WordPress and click Activate.
License Activation & Automatic Updates
Section titled “License Activation & Automatic Updates”To receive automatic one-click updates and access support, navigate to: Competitions > Settings > License.
Quantum Competitions provides two flexible activation methods depending on whether you are the site owner or managing client websites:
Method 1: WPGenie Account Login (Standard)
Section titled “Method 1: WPGenie Account Login (Standard)”Best for store owners managing their own websites who want automatic updates and direct access to the in-admin support ticket desk.
- In the WPGenie Account Login tab, enter your Username and Password from
wpgenie.org. - Click Authenticate.
- Once authenticated, your account name and Remaining domain slots are displayed.
- Click Register Domain (or Register Staging Domain if working on a local/staging environment).
- The license status changes to Active, unlocking automated plugin updates and the Competitions > Support ticket desk.
Method 2: Site Key / Agency (Client & Agency Sites)
Section titled “Method 2: Site Key / Agency (Client & Agency Sites)”Ideal for agencies, freelancers, and multi-client deployments where you do not want to expose your master WPGenie login credentials on a client’s server.
- Log into your WPGenie My Account and generate a Site Key (
wpg_sk_...) bound to the client’s domain. - In the WordPress admin, switch to the Site Key / Agency tab.
- Paste the Site Key into the Site Key field.
- Select the environment (Production or Staging).
- Click Activate Site Key.
Headless / wp-config.php Constant Activation
Section titled “Headless / wp-config.php Constant Activation”You can also automate activation via your site’s wp-config.php file, making it ideal for version-controlled codebases, Docker, or CI/CD pipelines:
// Define site key constant in wp-config.phpdefine( 'WPGENIE_SITE_KEY', 'wpg_sk_your_generated_site_key_here' );// Alternatively:define( 'QCW_SITE_KEY', 'wpg_sk_your_generated_site_key_here' );- When defined in
wp-config.php, the plugin automatically activates itself on admin load. - The license cannot be deactivated from the UI while the constant is present.
- The in-admin support ticket desk is automatically disabled for client users, ensuring support queries route through your agency instead of your personal WPGenie account.
WooCommerce Configuration: Disable Guest Checkout
Section titled “WooCommerce Configuration: Disable Guest Checkout”Quantum Competitions requires all ticket purchases to be linked to a registered customer account for ticket logging, verification, and prize claims.
- Navigate to WooCommerce > Settings > Accounts & Privacy.
- Under Guest checkout, uncheck:
- ❌ Allow customers to place orders without an account
- Under Account creation, ensure customer registration is permitted during checkout:
- ✅ Allow customers to create an account during checkout
- Click Save changes.
Required Cron Jobs Configuration
Section titled “Required Cron Jobs Configuration”For accurate countdown closings, instant winner determination, and automatic relisting, you must configure two external cron jobs on your server or hosting panel.
The plugin executes these routines via dedicated URL endpoints:
1. Main Competition Check Cron (Every 1 Minute)
Section titled “1. Main Competition Check Cron (Every 1 Minute)”This cron job executes the simple_lottery_cron() engine. It checks for finished competitions, finalizes ended draws, and triggers automatic winner selections.
- Trigger URL:
https://yourdomain.com/?competition-cron=check - Recommended Frequency: Every 1 minute (
* * * * *)
# Option A: Using wget (Standard)* * * * * wget -q -O - "https://yourdomain.com/?competition-cron=check" >/dev/null 2>&1
# Option B: Using curl* * * * * curl -s "https://yourdomain.com/?competition-cron=check" >/dev/null 2>&12. Automated Relisting Cron (Every 1 Hour)
Section titled “2. Automated Relisting Cron (Every 1 Hour)”If you enable the Automatic Relist option on your competitions, this cron triggers qcw_pn_cron() to republish expired competitions with new dates.
- Trigger URL:
https://yourdomain.com/?competition-relist=true - Recommended Frequency: Every 1 hour (
0 * * * *)
# Using wget0 * * * * wget -q -O - "https://yourdomain.com/?competition-relist=true" >/dev/null 2>&1
# Using curl0 * * * * curl -s "https://yourdomain.com/?competition-relist=true" >/dev/null 2>&1Database Verification
Section titled “Database Verification”Upon activation, the plugin automatically creates dedicated custom database tables via dbDelta:
{$wpdb->prefix}wc_lottery_log: Participant log connecting users, orders, and competition IDs.{$wpdb->prefix}wc_lottery_pn_log: Ticket allocations and answered question IDs.{$wpdb->prefix}wc_lottery_pn_reserved: Session cart holds and anti-collision locks.{$wpdb->prefix}wc_lottery_pn_instantwin: Log of awarded instant win prizes and winners.{$wpdb->prefix}wc_lottery_pn_instant_prizes: Configuration table of instant win prizes mapped to tickets.
If you ever need to recreate or repair these tables, navigate to Competitions > Settings > Tools and click Repair Database Tables.