price starting only for specific categories
-
I hope someone can help me! How can I enclose this code only for a specific product category?
/* === Add your own functions below this line ===
* ——————————————– */
add_filter( ‘woocommerce_variable_price_html’, ‘bbloomer_variation_price_format_min’, 9999, 2 );function bbloomer_variation_price_format_min( $price, $product ) {
$prices = $product->get_variation_prices(‘max’);$min_price = ($product->get_variation_price(‘max’))/1000; // Max price
$price = sprintf( __( ‘A partire da: %1$s al gr’, ‘woocommerce’ ), wc_price( $min_price ) );
return $price;
}
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘price starting only for specific categories’ is closed to new replies.