[Gelöst] Can multiple CPTs share a woocommerce product taxonomy?
This support ticket is created vor 7 Jahre. 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.
No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.
We are building a site for a machine broker and we are using Woocommerce as the catalog for showing machines. We are creating a CPT 'Contact' who needs to be categorized with the same taxonomy as the machines. Contacts can own machines or just express an interest in a machine category. We want to use the Woocommerce product categories for the CPT contacts. Can we do that?
Hi. Using the code you provided (changing the slug to pm-contact), it worked great! The machine taxonomy is available on the contact CPT.
I changed the code to use another CPT (the slug is pm-company) and I got a php error that says I can't redeclare the taxonomy. Is it possible to use the woo product taxonomy on more than one CPT created in Toolset?
I checked with two different custom post types created using types and assign the same taxonomy product_cat to both custom post types and its working fine.
Hi. That worked great! Thank you. So now I have one more question, please. I've created two CPTs with WP-Types and they use the woo product taxonomy. One CPT (Company) is the parent and another CPT (Contact) is the child in terms of their relationship.
I need to tie the woo product (a CPT) to the Company (another CPT). How can i make the Woo product a parent and the company a child? Each machine is owned by a company; the contacts are people in the company. By making the product the parent and the company the child, I can illustrate machine ownership.
Great - glad to know that you get it working and the solution I shared help you to resolve your issue.
As your original issue is resolved - as per our support policy we entertain only one question per ticket, this will help other users searching on the forum. I kindly request you to open a new ticket with your each new question.
This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.