I use the following snippet to display extra text after the price in WooCommerce:
add_filter( 'woocommerce_get_price_html', 'custom_price_message' );
function custom_price_message( $price ) {
$new_price = $price . ' <span class="price-text">' . __('with shipping').'</span>';
return $new_price;
}
But now it shows on every product page. Is it possible to exclude a certain product category from this? Not all products include shipping. So I thought I'd make a new category named "Pick up only", place all the products that don't have shipping in there and exclude that category from the above snippet. However, I don't know how to do this... Can anyone point me in the right direction?
Much appreciated!
Regards, Stefan