Added Gift Message and FedEx Shipping fields to E-Mail messages for WooCommerce
authorChuck Scott <cscott@gaslightmedia.com>
Wed, 8 Jul 2015 18:31:02 +0000 (14:31 -0400)
committerChuck Scott <cscott@gaslightmedia.com>
Wed, 8 Jul 2015 18:31:02 +0000 (14:31 -0400)
functions.php

index e61d6af..4d43837 100755 (executable)
@@ -184,6 +184,14 @@ function tm_added_checkout_fields_order_meta( $order_id ) {
 
 }
 
+// Add custom fields to order E-Mail messages
+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';
+        return $keys;
+}
+
 // Add a $1.00 handling fee to all orders.
 add_action( 'woocommerce_cart_calculate_fees','endo_handling_fee' );
 function endo_handling_fee() {