delta_wccs_custom_checkout_details_pro_billing

The WooCommerce Checkout Manager delta wccs custom checkout details pro billing function.

Description

delta_wccs_custom_checkout_details_pro_billing( $order ); 

Parameters (1)

0. $order
The order.

Usage

  1. if ( !function_exists( 'delta_wccs_custom_checkout_details_pro_billing' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce-checkout-manager/includes/classes/main.php'; 
  3.  
  4. // The order. 
  5. $order = null; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = delta_wccs_custom_checkout_details_pro_billing($order); 
  9.  

Defined (1)

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

/includes/classes/main.php  
  1. function delta_wccs_custom_checkout_details_pro_billing( $order ) { 
  2. global $post; 
  3.  
  4. ?> <style type="text/css">#order_data .order_data_column strong { display: block; }</style> <?php 
  5.  
  6. $options = get_option( 'wccs_settings3' ); 
  7.  
  8. $billing = array( 'country', 'first_name', 'last_name', 'company', 'address_1', 'address_2', 'city', 'state', 'postcode', 'email', 'phone' ); 
  9.  
  10. foreach ( $options['billing_buttons'] as $btn ) : 
  11.  
  12. if ( !in_array( $btn['cow'], $billing )) { 
  13. if ( (''.get_post_meta( $order->id , '_billing_'.$btn['cow'].'', true).'' !== '') && !empty( $btn['label'] ) && ($btn['type'] !== 'heading') && ($btn['type'] !== 'multiselect') && $btn['type'] !== 'wooccmupload' && ($btn['type'] !== 'multicheckbox') ) { 
  14. echo '<p><strong>'.wpml_string_wccm_pro($btn['label']).':</strong> '.nl2br(get_post_meta( $order->id , '_billing_'.$btn['cow'].'', true)).'</p>'; 
  15.  
  16. } elseif ( !empty( $btn['label'] ) && $btn['type'] !== 'wooccmupload' && ($btn['type'] == 'heading') && ($btn['type'] !== 'multiselect') && ($btn['type'] !== 'multicheckbox') ) { 
  17. echo '<h4>' .wpml_string_wccm_pro($btn['label']). '</h4>'; 
  18.  
  19. } elseif ( (''.get_post_meta( $order->id , '_billing_'.$btn['cow'].'', true).'' !== '') && !empty( $btn['label'] ) && ($btn['type'] !== 'heading') && $btn['type'] !== 'wooccmupload' && (($btn['type'] == 'multiselect') || ($btn['type'] == 'multicheckbox')) ) { 
  20.  
  21. $strings = unserialize(get_post_meta( $order->id , '_billing_'.$btn['cow'].'', true)); 
  22. $iww = 0; 
  23. $len = count($strings); 
  24.  
  25. echo '<p><strong>'.wpml_string_wccm_pro($btn['label']).':</strong> '; 
  26. foreach($strings as $key ) { 
  27. if ($iww == $len - 1) { 
  28. echo ''.wpml_string_wccm_pro($key).''; 
  29. } else { 
  30. echo ''.wpml_string_wccm_pro($key).', '; 
  31. $iww++; 
  32. echo '</p>'; 
  33. }elseif( $btn['type'] == 'wooccmupload' ) { 
  34. $info = explode("||", get_post_meta( $order->id , 'billing_'.$btn['cow'].'', true)); 
  35. echo '<p><strong>'.wpml_string_wccm_pro($btn['force_title2']).':</strong> '.$info[0].'</p>'; 
  36. endforeach;