From 7c69c26fbd4b9bf4227a08894074abdaff485ffd Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Tue, 20 Dec 2016 14:36:44 -0500 Subject: [PATCH] Commented out FedEx sections from functions.php per customer request. --- functions.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/functions.php b/functions.php index ab24780..d128a13 100755 --- a/functions.php +++ b/functions.php @@ -155,6 +155,7 @@ function tm_added_checkout_fields( $checkout ) { echo ''; +/* echo '

' . __('FedEx Shipping') . '

'; woocommerce_form_field( 'tm_fedex_shipping', array( @@ -165,6 +166,7 @@ function tm_added_checkout_fields( $checkout ) { ), $checkout->get_value( 'tm_fedex_shipping' )); echo '
'; +*/ } @@ -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 ); -- 2.17.1