I want to show the shipping zone name on order overview in WooCommerce.
This shows the order overview
This shows the shipping zone name I want to display
I have read that I can either do it with my own plugin, tried and failed or using a filter in my functions.
I found this filter, to add date to the same orders screen.
How can I adjust this to show shipping zone?
My code so far:
add_action( 'manage_posts_custom_column', 'misha_date_clmn' );
function misha_date_clmn( $column_name ) {
global $post;
if( $column_name == 'order_date' ) {
echo strtotime( $post->post_date ) . '<br />';
}
}
2
Answers
Try this filter and action to add custom column in admin panel
shipping_zone
is not a meta_key by defaultPartly based on Get orders shipping items details in WooCommerce 3
And
WC_Shipping_Zones::get_zone_by()
So try this instead