• I wrote “Size Chart” in Single-product.php file and link with Size chart plugin

    I want if someone comes to my website and select product i.e accessories then “Size-Chart” link hide and if customer selects i.e Shirt or Shoes or Cloth, “Size Chart” gets visible

    Can anyone help me meanwhile ?

    Thank you

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • show your file Single-product.php

    Thread Starter umairriaz2008

    (@umairriaz2008)

    I want to write something here.Hope you have understood my problem
    //******my custom code**//

    add_filter( ‘woocommerce_attribute_label’, ‘custom_attribute_label’, 10, 3 );
    function custom_attribute_label( $label, $name, $product ) {
    $taxonomy = ‘pa_’.$name;

    if( $taxonomy == ‘pa_euro-size’ OR ‘pa_top-size’ )
    $label .= ‘<div class=”custom-label”>’ . __(‘SIZE CHART <i class=”fa fa-chevron-right”></i>‘, ‘woocommerce’) . ‘</div>’;

    return $label;
    }

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Need some help about get_category function’ is closed to new replies.