on-internet
← Community

How to add custom text to orders in admin panel order detail page

Stack Overflow ·

I am trying to add a custom row to order table in WooCommerce order page. But the code I have tried is not working. I tried using this woocommerce_admin_order_item_values() hook but it's not working. This is my code add_action('woocommerce_admin_order_item_values', 'replace_quantity_td_content', 99999, 3); function replace_quantity_td_content($product, $item, $item_id) { $quantity = $item->get_quantity(); $meta_data_array = $item->get_meta_data(); foreach ($meta_data_array as $meta) { $meta_value_array = $meta->value; if (isset($meta_value_array['tabNumber'])) { $tab_number = $meta_value_array

Comments

Sign in or sign up to comment and upvote.

No comments yet.