I'm using this piece of code to display the range price of variable product from € - €€€ to Starting From €. I'm taking the max price and divide it by 10 because my max variation is a pack of 10.
add_filter( 'eha_variable_sale_price_html',
'pugliami_variation_price_format_min', 9999, 4 );
function pugliami_variation_price_format_min( $price, $min_price, $maxprices, $regular_price ) {
$maxprices = sprintf( __( 'Starting from %1$s', 'woocommerce' ),
wc_price( $maxprices /10) );
return $maxprices ;
}
But the problem with this code is that if I've a variable product with volume instead of pack this will take the highest price of the volume and divide it by 10 and I don't want it, I want only variable product with packs.
product with pack : https://poppersplanet.com/produit/rush-original-10ml/?lang=en
product without pack : https://poppersplanet.com/produit/lubricant-gel-x-man-silicone/?lang=en
Does there is a way to remove special product for a php code or a way to use this code only for a product category.
Thx in advance for any help :)