• Resolved Pawel

    (@bobowo)


    Hi,

    I have variables from WPSSO (_wpsso_product_gtin13) and YITH WooCommerce Brands (yith_product_brand) plugins, which unfortunately are not in the selection list. Is there any function that will retrieve these variables to create a Google Merchant Center xml file?

    Thanks in advance for any answer!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support pistachio6321

    (@pistachio6321)

    Thanks for using our plugin!

    Please check – these meta fields should be available in the selection lists since the version 5.15.0 of the plugin.

    Thread Starter Pawel

    (@bobowo)

    I didn’t expect such a quick fix! I am very grateful!

    GTIN is retrieved without any problem, but the brand from YITH WooCommerce Brands Add-On plugin is still not available in the list.

    Plugin Support pistachio6321

    (@pistachio6321)

    No worries! Thanks for checking the new version.

    Can you please tell us what is exactly the meta field name for YITH WooCommerce Brands? Is it ‘yith_product_brand’ or ‘_yith_product_brand’? It would be great if you could check it in your database.

    Thread Starter Pawel

    (@bobowo)

    Thank you for your reply! I got to the point, to extract the brand name, such a function is needed:

    global $product;
    $id = $product->get_id();
    $taxonomy = 'yith_product_brand';
    $brand_names = wp_get_post_terms( $id, $taxonomy, array( 'fields' => 'names' ) );
    
    // Get the brand name
    if(!empty($brand_names)){
       $brand_name = reset( $brand_names );
    }else {
       return;
    }
    
    echo $brand_name;

    Best regards!

    Thread Starter Pawel

    (@bobowo)

    After upgrading to version 5.16.0, the option to select a brand from the YITH plugin appeared and it WORKS GREAT – THANK YOU VERY much!

    Best regards,
    Pawel

    Plugin Support pistachio6321

    (@pistachio6321)

    Thanks for the confirmation!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Brand, GTIN – YITH WooCommerce Brands and WPSSO’ is closed to new replies.