0
votes

i want to create a PHP function to return a brand description on Product Archive Page I tried this code but it didn't work,please help!

function brand_description(){
    $brand_slug = $_GET['filter_brand'];
    $brand_term = get_term_by('slug', '$brand_slug', 'pa_brand');
    $description = $brand_term->description;
    return $description;
}