Plugin Directory

Changeset 2146994


Ignore:
Timestamp:
08/28/2019 10:30:40 AM (7 years ago)
Author:
teoleonard
Message:

update 3.5.3

Location:
raffle-ticket-generator/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • raffle-ticket-generator/trunk/raffle-ticket-generator.php

    r1970329 r2146994  
    44Plugin URI: http://wpraffle.com
    55Description: Raffle Ticket Generator.  Generate numbered raffle tickets and email virtual tickets via WooCommerce order system
    6 Version: 3.5
     6Version: 3.5.3
    77Author: The Web Design Ninja
    88Author URI: http://TheWebDesignNinja.com
    99
    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
     15Copyright 2014-2019 Teo Leonard and The Web Design Ninja.
    1416
    1517This program is free software; you can redistribute it and/or
     
    205207global $wpdb;
    206208
    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
    208216
    209217
     
    235243
    236244
    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
    241248        echo '<form method="post">
    242249
    243      <input type="hidden" name="cat_name" value="' . $cat->ID . '">
     250     <input type="hidden" name="cat_name" value="' . get_the_ID() . '">
    244251
    245252     <tr class="export-content">
    246253
    247      <td>' . $cat->post_title . '</td>';
     254     <td>' . get_the_title() . '</td>';
    248255
    249256        echo '<td>';
    250257
    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"');
    252259
    253260        echo $wpdb->num_rows;
     
    257264        echo '<td>';
    258265
    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');
    260267
    261268        echo $wpdb->num_rows;
     
    317324                           
    318325
    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"');
    320327
    321328        $array_ticket_numbers = array();
     
    419426
    420427   
    421   }
    422 
    423 
    424 }   
     428 
     429
     430
     431endwhile;
     432
     433    wp_reset_query();
    425434
    426435 echo '  </table>';
  • raffle-ticket-generator/trunk/readme.txt

    r1970337 r2146994  
    44Tags: woocommerce, raffle
    55Requires at least: 3.0.1
    6 Tested up to: 5.0
    7 Stable tag: 5.0
     6Tested up to: 5.2.2
     7Stable tag: 5.2.2
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    7171= 3.0 =
    7272
     73<<<<<<< .mine
    7374Compatibilty with 4.7 and Speed Issues
    7475
     
    8384Compatibility with woo commerce version 3.4
    8485
    85 = 3.5 =
    86 Increased number of tickets to 500 and added export ticket functionality
     86= 3.5.3 =
     87
     88GOLD VERSION
     89
     90Add pagination on customer tickets page to reduce CPU usage
     91Add custom import tickets function
     92Resolved error after refund order and cancelled order put raffle ticket back to stock in successive ticket numbers.
     93Changed messages in backup tools page
     94Resolved error of same ticket numbers applied to 1 ticket packages
     95Changed SQL methods to better secure plugin
     96
     97SILVER VERSION
     98
     99Add pagination on customer tickets page
     100Add pagination on customer tickets page to reduce CPU usage
     101Resolved error after refund order and cancelled order with ticket removed from database
     102Changed SQL methods to better secure plugin
     103
     104BRONZE VERSION
     105
     106Changed SQL methods to better secure plugin
Note: See TracChangeset for help on using the changeset viewer.