I need to add custom column for order items and show specific product meta in this column.
I mean something like image below,
I can’t find any action from woocommerce to add this column!
Leave a Reply
You must be logged in to post a comment.
I need to add custom column for order items and show specific product meta in this column.
I mean something like image below,
I can’t find any action from woocommerce to add this column!
You must be logged in to post a comment.
You can use the following code:
I’ve commented it so it should be clear enough, but in a nutshell this code adds a custom column, named “Test Column”, and this column pulls the value from the custom field of the product, called “_custom_field_name”.
Since WooCommerce 3.0 you are not allowed to call the product_id directly. You need to replace this:
This will do the trick and remove all errors and notices.