Changeset 3098430
- Timestamp:
- 06/06/2024 08:51:59 AM (21 months ago)
- Location:
- raffle-ticket-generator/trunk
- Files:
-
- 1 deleted
- 6 edited
-
images/winners.jpg (deleted)
-
images/wordpress-raffle-logo-gold.png (modified) (previous)
-
images/wordpress-raffle-logo-platinum.png (modified) (previous)
-
images/wordpress-raffle-logo-silver.png (modified) (previous)
-
images/wordpress-raffle-logo.png (modified) (previous)
-
raffle-ticket-generator.php (modified) (8 diffs)
-
readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
raffle-ticket-generator/trunk/raffle-ticket-generator.php
r3077915 r3098430 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: 5.1.46 Version: 6.0 7 7 Author: The Web Design Ninja 8 8 Author URI: http://TheWebDesignNinja.com … … 46 46 } 47 47 register_activation_hook(__FILE__,'wooraffle_install'); 48 add_action('before_woocommerce_init', function(){ 49 50 51 52 if ( class_exists( \Automattic\WooCommerce\Utilities\FeaturesUtil::class ) ) { 53 54 \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'custom_order_tables', 'raffle-ticket-generator-gold/raffle-ticket-generator-gold.php', true ); 55 56 57 58 } 59 60 61 62 }); 48 63 function wooraffle_uninstall(){ 49 64 global $wpdb; … … 86 101 87 102 function simple_winner_categories(){ 88 echo '<img src="'.plugin_dir_url( __FILE__ ).'/images/wordpress-raffle-logo.png" style="float:left "><div style="clear:both"></div>';103 echo '<img src="'.plugin_dir_url( __FILE__ ).'/images/wordpress-raffle-logo.png" style="float:left; width:200px"><div style="clear:both"></div>'; 89 104 echo '<h1 style="font-size:20px">For Silver and Gold Members Only</h1>'; 90 105 echo '<p>The Bronze version is not a trial version - is it simply a lightweight version that generates 500 unique ticket numbers. … … 244 259 245 260 $customer = get_user_by('id', $ticketsqueryresult->customer_id); 246 247 $billing_first_name = get_post_meta($ticketsqueryresult->order_id, '_billing_first_name', true); 248 249 $billing_last_name = get_post_meta($ticketsqueryresult->order_id, '_billing_last_name', true); 250 251 $billing_company = get_post_meta($ticketsqueryresult->order_id, '_billing_company', true); 252 253 $billing_address = get_post_meta($ticketsqueryresult->order_id, '_billing_address_1', true); 254 255 $billing_address2 = get_post_meta($ticketsqueryresult->order_id, '_billing_address_2', true); 256 257 $billing_city = get_post_meta($ticketsqueryresult->order_id, '_billing_city', true); 258 259 $billing_postcode = get_post_meta($ticketsqueryresult->order_id, '_billing_postcode', true); 260 261 $billing_country = get_post_meta($ticketsqueryresult->order_id, '_billing_country', true); 262 263 $billing_state = get_post_meta($ticketsqueryresult->order_id, '_billing_state', true); 264 265 $billing_email = get_post_meta($ticketsqueryresult->order_id, '_billing_email', true); 266 267 $billing_phone = get_post_meta($ticketsqueryresult->order_id, '_billing_phone', true); 268 269 $billing_paymethod = get_post_meta($ticketsqueryresult->order_id, '_payment_method', true); 261 $order = wc_get_order($ticketsqueryresult->order_id); 262 $billing_first_name = $order->get_billing_first_name(); 263 $billing_last_name = $order->get_billing_last_name(); 264 $billing_company = $order->get_billing_company(); 265 $billing_address = $order->get_billing_address_1(); 266 $billing_address2 = $order->get_billing_address_2(); 267 $billing_city = $order->get_billing_city(); 268 $billing_postcode = $order->get_billing_postcode(); 269 $billing_country = $order->get_billing_country(); 270 $billing_state = $order->get_billing_state(); 271 $billing_email = $order->get_billing_email(); 272 $billing_phone = $order->get_billing_phone(); 273 $billing_paymethod = $order->get_payment_method(); 270 274 271 275 $customer_name = $billing_first_name . ' ' . $billing_last_name; … … 344 348 echo '<td>'; 345 349 346 $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"'); 350 $tickets_query = $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"'); 351 352 if (empty($tickets_query)) { 353 $tickets_query = $wpdb->get_results('select * from ' . $wpdb->prefix . 'wooraffle_tickets_customer_to_tickets t1, ' . $wpdb->prefix . 'wc_orders 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"'); 354 } 347 355 348 356 echo $wpdb->num_rows; … … 352 360 echo '<td>'; 353 361 354 $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'); 362 $tickets_query2 = $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'); 363 if (empty($tickets_query2)) { 364 $tickets_query = $wpdb->get_results('select * from ' . $wpdb->prefix . 'wooraffle_tickets_customer_to_tickets t1, ' . $wpdb->prefix . 'wc_orders 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'); 365 } 355 366 356 367 echo $wpdb->num_rows; … … 426 437 $order_id = explode("_", $key); 427 438 428 $billing_first_name = get_post_meta($order_id[0], '_billing_first_name', true); 429 430 $billing_last_name = get_post_meta($order_id[0], '_billing_last_name', true); 431 432 $billing_company = get_post_meta($order_id[0], '_billing_company', true); 433 434 $billing_address = get_post_meta($order_id[0], '_billing_address_1', true); 435 436 $billing_address2 = get_post_meta($order_id[0], '_billing_address_2', true); 437 438 $billing_city = get_post_meta($order_id[0], '_billing_city', true); 439 440 $billing_postcode = get_post_meta($order_id[0], '_billing_postcode', true); 441 442 $billing_country = get_post_meta($order_id[0], '_billing_country', true); 443 444 $billing_state = get_post_meta($order_id[0], '_billing_state', true); 445 446 $billing_email = get_post_meta($order_id[0], '_billing_email', true); 447 448 $billing_phone = get_post_meta($order_id[0], '_billing_phone', true); 449 450 $billing_paymethod = get_post_meta($order_id[0], '_payment_method', true); 439 $order = wc_get_order($order_id[0]); 440 $billing_first_name = $order->get_billing_first_name(); 441 $billing_last_name = $order->get_billing_last_name(); 442 $billing_company = $order->get_billing_company(); 443 $billing_address = $order->get_billing_address_1(); 444 $billing_address2 = $order->get_billing_address_2(); 445 $billing_city = $order->get_billing_city(); 446 $billing_postcode = $order->get_billing_postcode(); 447 $billing_country = $order->get_billing_country(); 448 $billing_state = $order->get_billing_state(); 449 $billing_email = $order->get_billing_email(); 450 $billing_phone = $order->get_billing_phone(); 451 $billing_paymethod = $order->get_payment_method(); 451 452 452 453 $customer_name = $billing_first_name . ' ' . $billing_last_name; … … 649 650 } 650 651 } 652 651 653 add_action( 'woocommerce_admin_order_data_after_order_details', 'simple_show_ticket_numbers_admin' ); 652 654 ?> -
raffle-ticket-generator/trunk/readme.txt
r3077915 r3098430 357 357 Bug fix – Starting Ticket Numbers not changing (SLV) 358 358 Bug fix – Winner Timer not showing on Fusion Pages (GLD) 359 Bug fix – Non raffle products fatal error fixed on checkout (Bronze) 359 Bug fix – Non raffle products fatal error fixed on checkout (Bronze) 360 361 =6.0= 362 2024/06/05 WP6.5.3 and Woo8.9.2 363 Changed DB Structure for Woo HPOS 364 Improved Random Ticket Generation when saving 365 Added additional checks during plugin installation and activation 366 Improved Tickets Sold progress bar 367 Added additional DB checks after updating
Note: See TracChangeset
for help on using the changeset viewer.