=== Raffle Ticket Generator - Woocommerce ===
Contributors: Teo Leonard and The Web Design Ninja
Donate link: http://wpraffle.com/
Tags: woocommerce, raffle
Requires at least: 3.0.1
Tested up to: 6.9.4
Stable tag: 5.2.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

This plugin is used with WooCommerce to generate raffle ticket numbers that are emailed to customers.


== Description ==

The free version of this plugin generates 500 unique raffle ticket numbers and then recycles.  It starts with ticket number 100 and increments each ticket number by 1 until 599.  The 501st ticket will be assigned number 100 again and so on.  This is designed for small raffles.  Upon completing checkout in WooCommerce, the customer is emailed the ticket numbers.

To setup the raffle, simple install the plugin as described below.  Then create a product in WooCommerce and put in the number of raffle tickets for the product.  Example, if you put 5 in the number of tickets field, that product will generate 5 tickets.  

Please use https://wpraffle.com for support.  If you open a support ticket there, you will receive much faster support.  For some reason we are having problems getting alerted to support requests on the repository here at wordpress.org.

Informational videos and FAQs are can be found at https://wpraffle.com

The Silver and Gold versions of this plugin includes unlimited unique raffle ticket numbers and the number format are fully configurable.  It also allows for a prefix and suffix declaration and can define multiple raffles with different ticket numbers in the same cart.   The Silver Version also included the option to generate graphical ticket images from a selection of stock images and includes a pick a winner feature to select a winner for your raffle and embed it in a page or post using shortcodes.

The Gold version includes Archiving, Backup and Restore capabilities, a 50-50 or Split the Pot Raffle Feature, use custom raffle ticket images, and the ability to manage and limit ticket sales for a specific raffle.  The Gold version also has a successive number feature to put refunded tickets back into stock to be reassigned for events such as a ball drop or duck race.

== Installation ==

1. Upload `raffle-ticket-generator.zip` to the `/wp-content/plugins/` directory
2. Activate the plugin through the 'Plugins' menu in WordPres

3. For complete instructions - please see our full documentation at https://wpraffle.com/docs/bronze-instruction-manual



== Frequently Asked Questions ==

= Can I define a custom raffle ticket number format? =

Not with this version.  The Silver and Gold versions allow that.

= Does this allow me to sell unlimited tickets? =

Yes, although the numbers recycle after the first 500 tickets, so there are only 500 unique numbers.  
The Silver and Gold versions allow unlimited unique ticket numbers.

= Is this a trial version of the paid full feature editions? =

No, this is simple version for small raffles.  This is not a trial of our full featured editions.

= Can I remove the WPRaffle branding from the order emails? =

Not with this version.  The Silver and Gold versions allow that.

= Raffle Plugin Support =

Please visit http://online.wpraffle.com/plugin-support/ and open a support ticket for the fastest response


= Silver and Gold Raffle Buy =

Please visit https://online.wpraffle.com.

== Upgrade notice ==
The previous versions allowed for 100 unique numbers, we have increased that to 500 and have added an export feature

== Screenshots ==

1. This screenshot shows the product configuration in WooCommerce.  When the plugin is installed, the product editor will show a "Number of Raffle Tickets" field.  Leave it blank for normal products without a raffle ticket, if you want it to be a raffle ticket item, then put in the appropriate number.  In this example it is 50 - this product will generate 50 tickets.

== Changelog ==

= 1.0.1 =

Changed numbers from 100-199.

= 1.0.4 =

Update Speed Issues

= 2.1.5 =

Bug fixes and Speed Issues 

= 3.0 =

<<<<<<< .mine
Compatibilty with 4.7 and Speed Issues 

= 3.2.2 =

Compatibility with 4.9 and added gold feature for starting and ending raffle and prize option in gold and also front end winner selection and also removed functions confliction with other plugins

= 3.2.3 =
Compatibility with wordpress version 4.9.4 and updated functions for woocommerce 3.3.3 version

= 3.2.5 =
Compatibility with woo commerce version 3.4 

= 3.5.3 =

GOLD VERSION

Add pagination on customer tickets page to reduce CPU usage
Add custom import tickets function
Resolved error after refund order and cancelled order put raffle ticket back to stock in successive ticket numbers.
Changed messages in backup tools page
Resolved error of same ticket numbers applied to 1 ticket packages
Changed SQL methods to better secure plugin

SILVER VERSION

Add pagination on customer tickets page
Add pagination on customer tickets page to reduce CPU usage
Resolved error after refund order and cancelled order with ticket removed from database
Changed SQL methods to better secure plugin

BRONZE VERSION

Changed SQL methods to better secure plugin

=3.5.3.1=
Bug fixes of displaying non raffle products and js confliction in bronze version

=3.6=					
Added Platinum Edition Feature Set.  
Small PHP updates in other editions to minimize code changes between editions.

=3.6.5=					
Changes to license check timing
Small changes to php for woo4.x compatibility and forward planning
Changed queries to handle hosting limitations where CAST is not supported

=4.0=					
Random number options in Platinum
Pick a number options in Platinum
WPML support for Silver, Gold, Platinum
Question options for generating tickets or not in drawing
Added shortcodes for various timers
Change to licensing check
Added CSS editing for color and fonts in backend
Added font color and decoration in order confirmation email in Gold and Platinum
Added raffle icon in category and product list view in woo
Updated reporting and export options
Changed formatting of quiz
Changed functionality of max number of tickets per customer.  

=4.1=				
Platinum and Gold:
Add to cart text change only for raffle categories
Added db status check and repair tool 
Fixed max number of ticket input field
Platinum only:
Added option to move progress bar and question section and hide raddle ending text and tickets sold text
Updates and code adjustments
fixed js confliction with time function for different themes and plugins
Gold category setting page js confliction fix
updated functions to match woocommerce 4.5.2


=4.2=
addressed css and js conflicts to work with changes in WP 5.6
Added additional logging
hanged ticket generation to address issues with payment gateways that do not follow the woocommerce standards
Various changes to code for php 7.4 deprecation.
changed admin menu

=4.2.1.1=                                       

Css errors fix 
Winners date range errors fix for winners 
New wordpress functions  

=4.2.1.2=                                    

Winner Shortcode Fix (Silver Only) 
Js Error on product page (Gold Only) 

=4.2.1.3=                                   

Winners js error fix rolling not working (Gold Only) 
Duplication tickets for pick a number (Platinum Only) 
 
=4.2.1.4=                                  
Custom cron job to check timed out payment method fix and removing pick ticket numbers

=4.3= 				2021/07/05 WP 5.7.2  Woo 5.4.1  

 

Cleaned Up text and menus 

Fixed Random Tickets in platinum 

Product Name on cart and checkout fix (Platinum, Gold, Silver) 

Added Questions and Answers in tickets export (Platinum) 

Progress Bar Dsiplay options (Platinum) 

Show number of tickets as percentage (Platinum) 

Added Plugin Checker on platinum to check GD library installed or not 

Add AAA00099 with leading zeros ticket format (Platinum only) 

Fixed Js error on platinum causing validation error on category settings  

 

=4.3.1= 				
2021/07/05 WP 5.8  Woo 5.5.2 

 

Updated functions for wp 5.8 and woocommerce 5.5.2 

Unencrypt hooks.php to remove false positive virus detection 

Fixed error when using woocommerce blocks 

 

=4.3.1.2=			
2021/09/07 WP 5.8  Woo 5.6.0 

 

Fixed Winners selection and display 

Fixed Winner shortcode code  

=4.5=                             
2021/10/18   WP 5.8.1 and Woo5.8 

 

Added compatibility with latest WooCommerce and Wordpress 

Added Duplication check on all 3 versions gold silver and platinum 

Change duplication check for broad check 

Added Duplication log for generating replacement tickets 

Separated Raffle category setting from ticket formats. 

 

=4.5.01=                            
2021/10/18   WP 5.8.1 and Woo5.8 

Fixed Calendar image in platinum only 

=4.5.01=                             
2021/10/22   WP 5.8.1 and Woo5.8 

Fixed stock not saving in Gold only 

 

=4.5.02=                            
2021/10/29   WP 5.8.1 and Woo5.8 

Fixed succesive issue while saving settings on gold and platinum 

 

=4.5.03=                             
2021/10/29   WP 5.8.1 and Woo5.9 

Fixed undefined constant error and fixed view ticket number reporting 

 

=4.6=                             
2022/01/20   WP 5.8.3 and Woo6.1 

Fixed Undefined error 

Fixed errors in errorlogs,menu error fix for php8 

Updated functions for php8.0 

Added Tool for ticket numbers fix for random and pick a number 

Multisite Fix activate only for single site 

Added log for duplicate checker, added if category settings are not set then customers are not allowed to have wrong answer bypass, 


=4.6.1=                             
2022/02/10   WP 5.9 and Woo6.2

Fixed Error showing "Number of tickets" to non raffle products (Bronze Only) 

=4.7.3=                             
2022/08/12   WP 5.9 and Woo6.2

Compatibility  with woocommerce 6.9.4

=4.7.4=                             
2022/10/17   WP 6.0 and Woo6.2

fixed crtical error for gold and platinum when activating (menu error)
critical error while saving categories in gold and platinum php8
Compatibility  with woocommerce 7.0


=4.7.3.3=                             
2023/10/30   WP 6.3 and Woo8.2
Compatibility  with woocommerce 8.2.1
fixed error on admin while viewing tickets

=5.0=
2023/12/05 WP 6.4.1 and woo 8.3.1
Compatibility  with woocommerce 8.3.1

added new features and updated design in platinum and gold
1. ticket image setting options
2. added shortcodes
3. added manual order (platinum)
4. added sending email to winners on all 3 versions (silver, gold, platinum)
5.added display functions and much more

=5.0.1=
2023/12/05 WP 6.4.1 and woo 8.3.1

Adjust code for conflict with successive and 50/50.  Update saving function for image settings.  Force check for ticket number not set for raffle product. (Platinum GOLD)


=5.1=
2023/12/11  WP 6.4.2 and Woo 8.3.2 

Added again gifting option  (PLT) 

=5.1.1=
2023/12/12   WP 6.4.2 and Woo 8.3.2 

Resend tickets issue resolved from admin order page (PLT GLD) 

=5.1.2=
2024/01/16   WP6.4.2 and Woo8.5.1

Bug fix – fix ticket export for multiple raffles (PLT GLD)

=5.1.3=
2024/01/22   WP6.4.2 and Woo8.5.1 

Bug fix – winners not being added on backend

=5.1.4=
2024/04/16   WP6.4.2 and Woo8.5.1
 
Bug fix – leading zeros conflict with random numbers
Bug fix – Starting Ticket Numbers not changing (SLV) 
Bug fix – Winner Timer not showing on Fusion Pages (GLD)
Bug fix – Non raffle products fatal error fixed on checkout (Bronze)  

=6.0=
2024/06/05   WP6.5.3 and Woo8.9.2
Changed DB Structure for Woo HPOS
Improved Random Ticket Generation when saving
Added additional checks during plugin installation and activation
Improved Tickets Sold progress bar
Added additional DB checks after updating

=6.0.1=    		
2024/06.13  WP6.5.4 and Woo8.9.3 
Subscription renewel fix on gold version. 

=6.0.2=    		
2024/07/08  WP6.5.4 and Woo8.9.3 
Cart function confliction fix on platinum 

=6.0.3=    		
2024/08/9  WP6.5.4 and Woo 9.2.3 
Fixed checkout error on tickets buy (gold) 
Fixed query on product detail page which was slowing product show (platinum) 
Removed flash screen of upgrade plugin from platinum and added relative upgrade links on raffle setting page (gold and platinum) 

 
=6.0.3.1=    		
2024/09/16  WP6.5.4 and Woo 9.2.3 
Fixed email sending to winner from admin (PLT only) 

=6.0.4=		
2024/09/30  WP6.5.4 and Woo 9.2.3 
Fixed ticket printing on view tickets (PLT only) 
Fixed ticket number not showing on view tickets (Export) (PLT only) 

=6.0.4=		
2024/10/29  WP6.6 and Woo 9.3.3 
Export tickets fix (SLV)
Updates for HPOS woocommerce on bronze  

=6.0.4.1=                 
2025/01/23  WP6.7.1and Woo 9.6
Gold, Platinum -Text change on category settings for max number of tickets vs max $amount sold for clarification

=6.0.5=
2025/04/30  WP6.8.1 and Woo 9.8.3 
Gold,Platinum, Silver – Fixed Ending time conflict with different plugins on Shop Page  
Platinum – Fixed Fatal Error while backing up 

=6.0.6= 
2025/10/27 WP6.8.3 and Woo10.3.3
PLT – Recent updates to WP and Woo create a critical error scenerio if non raffle category is assigned to raffle product.  Adjusted code to handle scenario

=6.1= 
2025/11/20  WP6.8.3 and Woo 10.3.3 
Special Characters In Ticket images fix e.g (&,/,*) in email and thank you page 
Also fixed it on View Customer Tickets Section for printing tickets on all version (PLT,SLV,GLD)  

=6.2= 
2026/03/20  WP6.8.3 and Woo 10.6.1 
Large Image Display Issues (PLT) 
Compatubility with WooCommerce 10.6.1