Skip to content

Instantly share code, notes, and snippets.

@nadeem-khan
Forked from mikejolley/gist:2263203
Last active August 29, 2015 14:05
Show Gist options
  • Save nadeem-khan/63bcbfbfa558ffcae40b to your computer and use it in GitHub Desktop.
Save nadeem-khan/63bcbfbfa558ffcae40b to your computer and use it in GitHub Desktop.
Add custom fields to Order email of Woocommerce

Add the field to order emails:

 add_filter('woocommerce_email_order_meta_keys', 'my_woocommerce_email_order_meta_keys');

 function my_woocommerce_email_order_meta_keys( $keys ) {
$keys['How did you hear about us?'] = 'hear_about_us';
return $keys;
 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment