Advertisement
mbcreation

Quick Export : remove columns

Jun 18th, 2014
327
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.18 KB | None | 0 0
  1. // functions.php
  2.  
  3. function my_custom_csv($keys)
  4. {
  5.     $keys = array_diff($keys, array(
  6.         'billing_first_name',
  7.         'billing_last_name' //, etc
  8.     ));
  9.  
  10.    
  11.     /* etc...
  12.     Here are the keys you may remove this way :
  13.    
  14.    
  15.     //general
  16.     'id', 'status', 'order_date',
  17.    
  18.     //billing infos
  19.     'billing_first_name', 'billing_last_name',
  20.     'billing_company', 'billing_address_1', 'billing_address_2','billing_city',  
  21.     'billing_postcode', 'billing_country', 'billing_state', 'billing_email',
  22.     'billing_phone',
  23.    
  24.     //shipping infos
  25.     'shipping_first_name', 'shipping_last_name',
  26.     'shipping_company', 'shipping_address_1', 'shipping_address_2',
  27.     'shipping_city', 'shipping_postcode', 'shipping_state', 'shipping_country',
  28.    
  29.     //note
  30.     'customer_note',
  31.    
  32.     //payment, shipping and total
  33.     'shipping_method_title', 'payment_method_title', 'order_discount',
  34.     'cart_discount', 'order_tax', 'order_shipping', 'order_shipping_tax',
  35.     'order_total', 'order_tax_detail', 'completed_date',
  36.    
  37.     //others
  38.     'number_of_different_items',
  39.     'total_number_of_items',
  40.     'used_coupons',
  41.     'coupon_name',
  42.     'coupon_discount'
  43.    
  44.     */
  45.  
  46.     return $keys;
  47. }
  48.  
  49. add_filter( 'wqep_included_order_keys_filter', 'my_custom_csv' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement