Need to know brands meta key Need urgent response.

This topic has 7 replies, 2 voices, and was last updated 2 years, 1 months ago ago by Rose Tyler

  • Avatar: Umer
    Umer
    Participant
    November 21, 2022 at 16:39

    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?

    6 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    November 21, 2022 at 17:00

    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

    Avatar: Umer
    Umer
    Participant
    November 21, 2022 at 17:54

    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

    Avatar: Umer
    Umer
    Participant
    November 21, 2022 at 17:55

    Screenshot here: https://imgur.com/a/mhEH4Sa

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    November 22, 2022 at 08:43

    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

    Avatar: Umer
    Umer
    Participant
    November 22, 2022 at 11:59

    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.

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    November 22, 2022 at 14:20

    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

  • Viewing 7 results - 1 through 7 (of 7 total)

You must be logged in to reply to this topic.Log in/Sign up

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.