Commented out FedEx sections from functions.php per customer request.
authorChuck Scott <cscott@gaslightmedia.com>
Tue, 20 Dec 2016 19:36:44 +0000 (14:36 -0500)
committerChuck Scott <cscott@gaslightmedia.com>
Tue, 20 Dec 2016 19:36:44 +0000 (14:36 -0500)
functions.php

index ab24780..d128a13 100755 (executable)
@@ -155,6 +155,7 @@ function tm_added_checkout_fields( $checkout ) {
 
     echo '</div>';
 
+/*
     echo '<div id="tm_fedex_shipping"><h3>' . __('FedEx Shipping') . '</h3>';
 
     woocommerce_form_field( 'tm_fedex_shipping', array(
@@ -165,6 +166,7 @@ function tm_added_checkout_fields( $checkout ) {
         ), $checkout->get_value( 'tm_fedex_shipping' ));
 
     echo '</div>';
+*/
 
 }
 
@@ -178,9 +180,12 @@ function tm_added_checkout_fields_order_meta( $order_id ) {
         update_post_meta( $order_id, 'Gift Message', sanitize_text_field( $_POST['tm_gift_message'] ) );
     }
 
+/*
     if ( ! empty( $_POST['tm_fedex_shipping'] ) ) {
         update_post_meta( $order_id, 'FedEx Shipping', sanitize_text_field( $_POST['tm_fedex_shipping'] ) );
     }
+*/
+
 
 }
 
@@ -188,7 +193,7 @@ function tm_added_checkout_fields_order_meta( $order_id ) {
 add_filter('woocommerce_email_order_meta_keys', 'tm_added_checkout_fields_email');
 function tm_added_checkout_fields_email( $keys ) {
         $keys[] = 'Gift Message';
-        $keys[] = 'FedEx Shipping';
+//        $keys[] = 'FedEx Shipping';
         return $keys;
 }
 
@@ -201,12 +206,15 @@ function add_custom_fields_to_order_printout( $fields, $order ) {
             'value' => get_post_meta( $order->id, 'Gift Message', true )
         );
     }
+/*
     if( get_post_meta( $order->id, 'FedEx Shipping', true ) ) {
         $new_fields['FedEx Shipping'] = array(
             'label' => 'FedEx Shipping',
             'value' => get_post_meta( $order->id, 'FedEx Shipping', true )
         );
     }
+*/
+
     return array_merge( $fields, $new_fields );
 }
 add_filter( 'wcdn_order_info_fields', 'add_custom_fields_to_order_printout', 10, 2 );