I edited the Order Notes field in the checkout to be:
// Hook in
add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields' );
// Our hooked in function - $fields is passed via the filter!
function custom_override_checkout_fields( $fields ) {
$fields['order']['order_comments']['placeholder'] = 'Enter Purchase Order Number if applicable';
$fields['order']['order_comments']['label'] = 'Purchase Order #';
return $fields;
}
However, the confirmation and notification emails still say "Note" as the field label. I just want to change the label in the emails.
There are a whole different set of filters for the emails that are generated by woocommerce. Changing the label for the checkout field only changes the note in the checkout area! the label isn't passed through to the order emails, or to paypal for that matter.
You'll have to add another filter to override the field name in the email. Something like this:
/**
* 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';
return $keys;
}