This topic has 7 replies, 2 voices, and was last updated 2 years ago ago by Rose Tyler
Hi, I am importing product data with help of a plugin, it needs brand meta key so I can import the brand data. Can you please provide me the post meta or meta key that your theme uses to store brands?
Hello,
Thanks for using our theme.
Check there topics – https://www.8theme.com/topic/get-product-brand-in-meta-data-while-exporting/ https://www.8theme.com/topic/where-are-product-brands-stored-no-field-for-brands-exported-in-wc/
we use next code to get brands by product_id =>
wp_get_post_terms( $id, ‘brand’ )
Regards
I am importing products from Shopify and I want to map the brand meta key so the plugin can import product vendors as brands in woocommerce. What is the brand meta key that I need to add?
Screenshot here: https://imgur.com/a/mhEH4Sa
Hello,
Brand it is not post meta of product but it is a term the same as Product categories, Product tags
Documentation of default wp function (which WooCommerce uses for getting product_cat, product_tag) -> https://developer.wordpress.org/reference/functions/get_the_term_list/
The function WooCommerce uses ‘get_the_term_list’ and we use ‘wp_get_post_terms’ are based on one default WP function -> https://developer.wordpress.org/reference/functions/get_the_terms/ where $taxonomy param for getting our brands of specific product is ‘brand’ as we wrote you before.
If you still need assistance please, provide us a screenshot of all possible options you see in this select -> https://imgur.com/a/mhEH4Sa.
There should be something like “Post Term” or if there is no such option then this importer does not provide such options and you may try to use another importer.
Regards
Yes, I need to know the term of the brand field so I can map Shopify vendors to it. I will also contact and share your responses with the import plugin so it might help me understand.
Ok.
1/ brand slug for taxonomy – brand
2/ in order to take product brands use
wp_get_post_terms( $id, ‘brand’ );
where $id – id of product
Regards
You must be logged in to reply to this topic.Log in/Sign up