wooccm_csvall_info

The WooCommerce Checkout Manager wooccm csvall info function.

Description

wooccm_csvall_info( $orderids, (string) $wooname ); 

Parameters (2)

0. $orderids
The orderids.
1. $wooname (string)
The wooname.

Usage

  1. if ( !function_exists( 'wooccm_csvall_info' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-checkout-manager/includes/classes/export.php'; 
  3.  
  4. // The orderids. 
  5. $orderids = null; 
  6.  
  7. // The wooname. 
  8. $wooname = ''; 
  9.  
  10. // NOTICE! Understand what this does before running. 
  11. $result = wooccm_csvall_info($orderids, $wooname); 
  12.  

Defined (1)

The function is defined in the following location(s).

/includes/classes/export.php  
  1. function wooccm_csvall_info($orderids, $wooname) { 
  2. $options = get_option( 'wccs_settings' ); 
  3. $options2 = get_option( 'wccs_settings2' ); 
  4. $options3 = get_option( 'wccs_settings3' ); 
  5.  
  6. foreach( $orderids as $order_id ) { 
  7. $csv_output .= '["'.get_post_meta($order_id, '_billing_first_name', true).' '.get_post_meta($order_id, '_billing_last_name', true).'", '; 
  8.  
  9.  
  10. if( $wooname == 'additional') { 
  11. foreach( $options['buttons'] as $name2 ) { 
  12. $csv_output .= '"'.get_post_meta($order_id, $name2['cow'], true).'", '; 
  13. if( $wooname == 'billing') { 
  14. foreach( $options3['billing_buttons'] as $name2 ) { 
  15. $csv_output .= '"'.get_post_meta($order_id, $name2['cow'], true).'", '; 
  16. if( $wooname == 'shipping') { 
  17. foreach( $options2['shipping_buttons'] as $name2 ) { 
  18. $csv_output .= '"'.get_post_meta($order_id, $name2['cow'], true).'", '; 
  19.  
  20. $csv_output .= '], '; 
  21. return $csv_output;