Forum Replies Created

Viewing 1 replies (of 1 total)
  • Thread Starter newhappyrabbit

    (@newhappyrabbit)

    I was on the right path, will explain solution below:

    <?php
    // THE IF IS OPTIONAL!! It checks if the url contains 'wp-admin'
    //if true, it doesn't run the code, because while using Elementor, if the code is ran it throws errors and doesn't let me inside the editor
    if (strpos($_SERVER['REQUEST_URI'],'wp-admin') === false) {
        global $product;
        $product_brand = get_the_terms( $product->get_id() , 'yith_product_brand');
        echo $product_brand[0]->description; //had to use [0], because get_the_terms returns an array
    }
    ?>
Viewing 1 replies (of 1 total)