Skip to content

Instantly share code, notes, and snippets.

@woogist
Created May 8, 2015 12:43
Show Gist options
  • Select an option

  • Save woogist/2e89c92a3f7a75b98dd1 to your computer and use it in GitHub Desktop.

Select an option

Save woogist/2e89c92a3f7a75b98dd1 to your computer and use it in GitHub Desktop.
/**
* Add the field to order emails
**/
add_filter('woocommerce_email_order_meta_keys', 'my_custom_checkout_field_order_meta_keys');
function my_custom_checkout_field_order_meta_keys( $keys ) {
$keys[‘My Field 1′] = ‘_my_field_1;
$keys[‘My Field 2′] = ‘_my_field_2′;
return $keys;
}
@prescottt
Copy link

Got a feeling this needs tweaking slightly guys, there's some odd quote characters in there that are messed up under the raw view

@thriveweb
Copy link

@NecroTechno
Copy link

Thank you!

@Obka
Copy link

Obka commented Aug 14, 2015

hi every body
i can't use this code
after i user this code in function.php i receive an FATAL ERROR
how can i fix this problem ?
thank

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment