How do I show metabox on WooCommerce Order page for HPOS setup
-
I am testing one of my plugins on a WooCommerce installation with HPOS enabled. This means that orders are no longer stored in
wp_posts/postmeta
but inwp_wc_orders/wp_wc_orders_meta
.My code, which works on normal WooCommerce, adds the metabox for
order_types
ofshop_order
. It is from my post: https://www.damiencarbery.com/2020/01/add-tracking-info-to-woocommerce-order/'object_types' => array( 'shop_order', )
This object type doesn’t work now. Query Monitor does report that the post_type=shop_order in its Admin Screen tab/get_current_screen() section.
I did try adding ‘
wc-orders
‘ to object_types but no change.The order edit page url is like:
/wp-admin/admin.php?page=wc-orders&action=edit&id=47
Do you have any suggestions?
- The topic ‘How do I show metabox on WooCommerce Order page for HPOS setup’ is closed to new replies.