Skip to content

Instantly share code, notes, and snippets.

@xadapter
Last active July 4, 2017 11:21
Show Gist options
  • Select an option

  • Save xadapter/883ca81591691c64883ea006e413abc3 to your computer and use it in GitHub Desktop.

Select an option

Save xadapter/883ca81591691c64883ea006e413abc3 to your computer and use it in GitHub Desktop.
WooCommerce - Add new Custom Fields to Emails
add_filter('woocommerce_email_order_meta_keys', 'xa_email_custom_order_meta_keys');
function xa_email_custom_order_meta_keys( $field_keys ) {
// Please make sure the Custom Field 'tracking_code' is added to the Checkout Field.
$field_keys[] = 'tracking_code';
return $field_keys;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment