Non Hierarchy taxonomy not saving
-
Good day all.
I know this is a bit unconventional. but ill explain as far as i can.
I have created a non hierarchy custom taxonomy for users.
I want to dynamically populate it.
My code is as follows:
global $current_user;
get_currentuserinfo();
$nowuser = $current_user->user_login;
wp_set_object_terms( $product_id, $nowuser, ‘mystore’, true );So my problem is that its creating the term, but not linking it to the post(product)
We are using woocommerse and the Dokan theme to run an Etsy style store.
Our search function works great with taxonomies. And we expect only about 30 sellers on the site, so would like to use a taxonomy just to keep everything the same.
It is to search for all the products by store.
Hope I made enough sense.
Kind regards.
- The topic ‘Non Hierarchy taxonomy not saving’ is closed to new replies.