Changeset 2146994
- Timestamp:
- 08/28/2019 10:30:40 AM (7 years ago)
- Location:
- raffle-ticket-generator/trunk
- Files:
-
- 2 edited
-
raffle-ticket-generator.php (modified) (6 diffs)
-
readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
raffle-ticket-generator/trunk/raffle-ticket-generator.php
r1970329 r2146994 4 4 Plugin URI: http://wpraffle.com 5 5 Description: Raffle Ticket Generator. Generate numbered raffle tickets and email virtual tickets via WooCommerce order system 6 Version: 3.5 6 Version: 3.5.3 7 7 Author: The Web Design Ninja 8 8 Author URI: http://TheWebDesignNinja.com 9 9 10 * WC requires at least: 2.2 11 * WC tested up to: 3.5.1 12 13 Copyright 2014-2018 Teo Leonard and The Web Design Ninja. 10 * WC requires at least: 2.2 11 12 13 * WC tested up to: 3.7.0 14 15 Copyright 2014-2019 Teo Leonard and The Web Design Ninja. 14 16 15 17 This program is free software; you can redistribute it and/or … … 205 207 global $wpdb; 206 208 207 $categories = get_posts(array('post_type' => 'product', 'order_by' => 'name')); 209 $args = array( 210 'post_type' => 'product', 211 'posts_per_page' => -1, 212 ); 213 214 $loop = new WP_Query( $args ); 215 208 216 209 217 … … 235 243 236 244 237 foreach ($categories as $cat) { 238 239 $wpdb->get_results('select * from ' . $wpdb->prefix . 'wooraffle_tickets_customer_to_tickets t1, ' . $wpdb->prefix . 'posts t2 where t1.products_id = "' . $cat->ID . '" and t2.ID = t1.order_id and t2.post_status != "wc-refunded" and t2.post_status != "wc-cancelled" and t2.post_status != "trash"'); 240 if ($wpdb->num_rows > 0 ) { 245 while ( $loop->have_posts() ) : $loop->the_post(); 246 247 241 248 echo '<form method="post"> 242 249 243 <input type="hidden" name="cat_name" value="' . $cat->ID. '">250 <input type="hidden" name="cat_name" value="' . get_the_ID() . '"> 244 251 245 252 <tr class="export-content"> 246 253 247 <td>' . $cat->post_title. '</td>';254 <td>' . get_the_title() . '</td>'; 248 255 249 256 echo '<td>'; 250 257 251 $wpdb->get_results('select * from ' . $wpdb->prefix . 'wooraffle_tickets_customer_to_tickets t1, ' . $wpdb->prefix . 'posts t2 where t1.products_id = "' . $cat->ID. '" and t2.ID = t1.order_id and t2.post_status != "wc-refunded" and t2.post_status != "wc-cancelled" and t2.post_status != "trash"');258 $wpdb->get_results('select * from ' . $wpdb->prefix . 'wooraffle_tickets_customer_to_tickets t1, ' . $wpdb->prefix . 'posts t2 where t1.products_id = "' . get_the_ID() . '" and t2.ID = t1.order_id and t2.post_status != "wc-refunded" and t2.post_status != "wc-cancelled" and t2.post_status != "trash"'); 252 259 253 260 echo $wpdb->num_rows; … … 257 264 echo '<td>'; 258 265 259 $wpdb->get_results('select * from ' . $wpdb->prefix . 'wooraffle_tickets_customer_to_tickets t1, ' . $wpdb->prefix . 'posts t2 where t1.products_id = "' . $cat->ID. '" and t2.ID = t1.order_id and t2.post_status != "wc-refunded" and t2.post_status != "wc-cancelled" and t2.post_status != "trash" group by order_id');266 $wpdb->get_results('select * from ' . $wpdb->prefix . 'wooraffle_tickets_customer_to_tickets t1, ' . $wpdb->prefix . 'posts t2 where t1.products_id = "' . get_the_ID() . '" and t2.ID = t1.order_id and t2.post_status != "wc-refunded" and t2.post_status != "wc-cancelled" and t2.post_status != "trash" group by order_id'); 260 267 261 268 echo $wpdb->num_rows; … … 317 324 318 325 319 $ticketsquery = $wpdb->get_results('select * from ' . $wpdb->prefix . 'wooraffle_tickets_customer_to_tickets t1, ' . $wpdb->prefix . 'posts t2 where t1.products_id = "' . $cat->ID. '" and t2.ID = t1.order_id and t2.post_status != "wc-refunded" and t2.post_status != "wc-cancelled" and t2.post_status != "trash"');326 $ticketsquery = $wpdb->get_results('select * from ' . $wpdb->prefix . 'wooraffle_tickets_customer_to_tickets t1, ' . $wpdb->prefix . 'posts t2 where t1.products_id = "' . get_the_ID() . '" and t2.ID = t1.order_id and t2.post_status != "wc-refunded" and t2.post_status != "wc-cancelled" and t2.post_status != "trash"'); 320 327 321 328 $array_ticket_numbers = array(); … … 419 426 420 427 421 } 422 423 424 } 428 429 430 431 endwhile; 432 433 wp_reset_query(); 425 434 426 435 echo ' </table>'; -
raffle-ticket-generator/trunk/readme.txt
r1970337 r2146994 4 4 Tags: woocommerce, raffle 5 5 Requires at least: 3.0.1 6 Tested up to: 5. 07 Stable tag: 5. 06 Tested up to: 5.2.2 7 Stable tag: 5.2.2 8 8 License: GPLv2 or later 9 9 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 71 71 = 3.0 = 72 72 73 <<<<<<< .mine 73 74 Compatibilty with 4.7 and Speed Issues 74 75 … … 83 84 Compatibility with woo commerce version 3.4 84 85 85 = 3.5 = 86 Increased number of tickets to 500 and added export ticket functionality 86 = 3.5.3 = 87 88 GOLD VERSION 89 90 Add pagination on customer tickets page to reduce CPU usage 91 Add custom import tickets function 92 Resolved error after refund order and cancelled order put raffle ticket back to stock in successive ticket numbers. 93 Changed messages in backup tools page 94 Resolved error of same ticket numbers applied to 1 ticket packages 95 Changed SQL methods to better secure plugin 96 97 SILVER VERSION 98 99 Add pagination on customer tickets page 100 Add pagination on customer tickets page to reduce CPU usage 101 Resolved error after refund order and cancelled order with ticket removed from database 102 Changed SQL methods to better secure plugin 103 104 BRONZE VERSION 105 106 Changed SQL methods to better secure plugin
Note: See TracChangeset
for help on using the changeset viewer.