• Resolved daymobrew

    (@daymobrew)


    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 in wp_wc_orders/wp_wc_orders_meta.

    My code, which works on normal WooCommerce, adds the metabox for order_types of shop_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?

    • This topic was modified 1 year, 3 months ago by daymobrew. Reason: Add link to blog post for full code
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How do I show metabox on WooCommerce Order page for HPOS setup’ is closed to new replies.