R
R
ROinfo2021-06-15 14:46:44
WordPress
ROinfo, 2021-06-15 14:46:44

How to display the price of a product greater than 0 in variations?

This is WordPress Woocommerce
Faced this problem: How to display the price of a variation product greater than 0? For example, there are 3 variations, one has a price of 0, the second has a price of 100, and the third has a price of 200. There is such a function: $product->get_variation_price() which takes only 2 min or max parameters. If there is min, then it will output 0, and if max, then it will output 200. How can I get around this? So that it displays the minimum price greater than 0?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lander, 2021-06-15
@usdglander

$product->get_variation_price(1, 200);
Doesn't fit?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question