I am adding a price suffix on the WooCommerce single product page (and only there, not in the loop!).
I use the following:
add_filter( 'woocommerce_get_price_html', 'custom_price_suffix', 100, 2 );
function custom_price_suffix( $price, $product ) {
if( is_product() ) {
$price = $price . ' <small>incl. tax</small>';
}
return apply_filters( 'woocommerce_get_price', $price );
}
However, this also adds the price suffix to the Up-Sells on the product page (I am not talking about the related products, but the Up-Sells).
How can I exclude the price suffix for the Up-Sells?
I tried:
if( is_product() && !$woocommerce_loop['name'] == 'up-sells' )
But the suffix is still displayed for the Up-Sells.