Skip Navigation

[Resolved] Custom post type connected to WooCommerce shop_order not loading in relation

This support ticket is created 3 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by Luo Yang 3 years, 1 month ago.

Assisted by: Luo Yang.

Author
Posts
#2536061
Screenshot 2023-01-16 at 11.38.24 PM.png

I am trying to: Use a relationship between custom post type and WooCommerce shop_order

Link to a page where the issue can be seen: hidden link

I expected to see: Able to add new order or connect to existing order

Instead, I got: Can't make the relationship work

#2536103

Hello,

It is expected result, Woocommerce shop_order post type is not a public post type, see their document:
hidden link
line 409:

					'public'              => false,

But Toolset forms works in frontend, and need the post types to be public, so you can not use it in Toolset relationship form,

#2536509

Thank you for the reply. It doesn't work even from the admin dashboard. If a click "create new order" from the relationship meta box that order does show up in the relationship drop menu.
Is there any way to override the the shop_order state to be public or access it through Toolset?
Thanks

#2536789

There isn't such kind of built-in feature within Toolset plugins, Woocommerce setup the order post type not public on purpose, so it is not a good idea to change it public, it might conduct other unexpected results.
As a workaround:
In admin side, you can edit the specific Woocommerce order post, and connect the existing Post.