Variable product and range of prices for it’s variations
-
Instead of showing range of price for variable products I use the following code:
add_filter('woocommerce_variable_price_html', 'custom_variation_price', 10, 2); function custom_variation_price( $price, $product ) { $price = ''; $price .= woocommerce_price($product->get_price()/2); return $price; }
For my custom purpose I divide the price by 2, but for two products (product_id) I need to display just $product->get_price() without division.
How can I add 2 product_ids to the code for the exception?
Thanks
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Variable product and range of prices for it’s variations’ is closed to new replies.