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

    (@chris15326)

    Found the solution!

    function custom_price_suffix( $price, $product ) {
        global $woocommerce_loop;
    
        if( is_product() && !$woocommerce_loop['name'] == 'related' ) {
            $price = $price . ' <span class="make-me-small"> Inclusive of all taxes</span>';
        }
        //return $price;
        return apply_filters( 'woocommerce_get_price', $price );
    }
    add_filter( 'woocommerce_get_price_html', 'custom_price_suffix', 100, 2 );
Viewing 1 replies (of 1 total)
  • The topic ‘Restricting php snippet to product pages’ is closed to new replies.