Created
August 14, 2015 23:21
-
-
Save ScottDeLuzio/e568ae375beefa6126cc to your computer and use it in GitHub Desktop.
Add custom field to order emails
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add the field to order emails | |
**/ | |
add_filter( 'woocommerce_email_order_meta_keys', 'some_order_meta_keys' ); | |
function some_order_meta_keys() { | |
if (get_post_meta( get_the_ID(), 'Some Field')) { | |
echo 'This is the custom information you entered in Some Field: ' . get_post_meta( get_the_ID(), 'Some Field', true) . '<br />'; | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment