Changeset 1979975
- Timestamp:
- 11/24/2018 07:31:22 PM (7 years ago)
- Location:
- woocommerce-export-orders/trunk
- Files:
-
- 2 edited
-
readme.txt (modified) (3 diffs)
-
woocommerce-export-orders.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
woocommerce-export-orders/trunk/readme.txt
r1978276 r1979975 2 2 Contributors: ImagiSol, dhruvin 3 3 Donate link: https://paypal.me/DhruvinS?_ga=1.134259249.1705473128.1507170477 4 Tags: woocommerce, export orders, csv, pdf 4 Tags: woocommerce, export orders, csv, pdf, export emails, export items 5 5 Requires at least: 3.0.1 6 6 Tested up to: 4.9.8 … … 13 13 14 14 == Description == 15 16 **What's new** 17 With version 1.1.0 export Customer Billing Email and Phone along with the other information. 15 18 16 19 **[Woocommerce Export Orders](https://imaginate-solutions.com/downloads/woocommerce-export-orders/)** enables store managers to export the itemized list of the products for all the orders. … … 54 57 == Changelog == 55 58 59 = 1.1.0 = 60 * Added Customer Email and Phone to be exported with the other information. 61 * Performance improvement in getting the order details. Now the plugin uses wc_get_orders instead of custom queries. 62 56 63 = 1.0 = 57 64 * Bug Fixes related to new WooCommerce Functions -
woocommerce-export-orders/trunk/woocommerce-export-orders.php
r1978276 r1979975 4 4 Plugin URI: https://imaginate-solutions.com/ 5 5 Description: This plugin lets store owners to export orders 6 Version: 1. 0.06 Version: 1.1.0 7 7 Author: Dhruvin Shah 8 8 Author URI: https://imaginate-solutions.com/ … … 91 91 function woo_export_orders_menu(){ 92 92 93 add_menu_page( 'Export Orders','Export Orders','manage_woocommerce', 'export_orders_page'); 93 add_menu_page( 94 'Export Orders', 95 'Export Orders', 96 'manage_woocommerce', 97 'export_orders_page', 98 '', 99 'dashicons-media-spreadsheet', 100 '55.7' 101 ); 94 102 add_submenu_page('export_orders_page.php', __( 'Export Orders Settings', 'woo-export-order' ), __( 'Export Orders Settings', 'woo-export-order' ), 'manage_woocommerce', 'export_orders_page', array(&$this, 'export_orders_page' )); 95 103 //remove_submenu_page('export_settings','exports_settings'); … … 108 116 109 117 <?php 110 $query_order = "SELECT ID as 'order_id' FROM `" . $wpdb->prefix . "posts` where post_type='shop_order' "; 111 $order_results = $wpdb->get_results( $query_order ); 112 118 $args = array( 119 'limit' => -1, 120 ); 121 $orders = wc_get_orders( $args ); 113 122 $var = $today_checkin_var = $today_checkout_var = $booking_time = ""; 114 foreach ( $order _results as $id_key => $id_value) {115 116 $order = wc_get_order( $id_value->order_id );123 foreach ( $orders as $id_key => $order ) { 124 125 //$order = wc_get_order( $id_value->order_id ); 117 126 118 127 //if ( $order->get_status() === 'completed' ) { 119 128 $order_items = $order->get_items(); 120 129 121 $my_order_meta = get_post_custom( $ id_value->order_id);130 $my_order_meta = get_post_custom( $order->get_id() ); 122 131 123 132 $c = 0; 124 133 foreach ($order_items as $items_key => $items_value ) { 125 134 $var .= "<tr> 126 <td>".$ id_value->order_id."</td>135 <td>".$order->get_id()."</td> 127 136 <td>".$this->order_status[$order->get_status()]."</td> 128 137 <td>".$my_order_meta['_billing_first_name'][0]." ".$my_order_meta['_billing_last_name'][0]."</td> 138 <td>".$my_order_meta['_billing_email'][0]."</td> 139 <td>".$my_order_meta['_billing_phone'][0]."</td> 129 140 <td>".$items_value['name']."</td> 130 141 <td>".$items_value['line_total']."</td> 131 <td>".$order->get_date_created( 'view')."</td>132 <td><a href=\"post.php?post=". $ id_value->order_id."&action=edit\">View Order</a></td>142 <td>".$order->get_date_created()."</td> 143 <td><a href=\"post.php?post=". $order->get_id()."&action=edit\">View Order</a></td> 133 144 </tr>"; 134 145 … … 199 210 <th><?php _e( 'Order Status', 'woo-export-order' ); ?></th> 200 211 <th><?php _e( 'Customer Name' , 'woo-export-order' ); ?></th> 212 <th><?php _e( 'Customer Email', 'woo-export-order' ); ?></th> 213 <th><?php _e( 'Customer Phone', 'woo-export-order' ); ?></th> 201 214 <th><?php _e( 'Product Name' , 'woo-export-order' ); ?></th> 202 215 <th><?php _e( 'Amount' , 'woo-export-order' ); ?></th>
Note: See TracChangeset
for help on using the changeset viewer.