Created
April 18, 2015 16:16
-
-
Save craigsimps/98adff30f0ac68247d59 to your computer and use it in GitHub Desktop.
Add custom meta field to WooCommerce order email.
This file contains hidden or 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
add_filter('woocommerce_email_order_meta_fields', 'dog_breed_checkout_field_order_meta_fields', 10, 3 ); | |
function dog_breed_checkout_field_order_meta_fields( $fields, $sent_to_admin, $order ) { | |
$fields['dog_breed_name'] = array( | |
'label' => __( 'Dog Breed' ), | |
'value' => get_post_meta( $order->id, 'dog_breed_name', true ), | |
); | |
return $fields; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment