Hello Saravana Kumar K,
I am having this same issue. I have added an admin field similar to the sku field and it displays as would be expected to the admin user on the inventory tab and on the single product page which i dont need it to but it was the only way I could get the order meta option to appear in the settings and the label and read only field but I would like it to be printed to the backend order page and the admin new order email but it’s not doing it. I have tried adding this which i found here but. no luck either. Can you help?
function add_fields_on_order_email($_fields = array(), $_sent_to_admin, $_order) {
if ($_sent_to_admin) {
$_fields["Formula:"] = get_post_meta($_order->get_id(), "_custom_{wccaf_formula}", true);
}
return $_fields;
}
add_filter("woocommerce_email_order_meta_fields", "add_fields_on_order_email", 10, 3);
Sincerely,
Paul
-
This reply was modified 2 years, 7 months ago by modiphier.