Show Price Range

Here’s a function which you can stick in your functions.php file to show the price range for a product. The function looks through all the variations for a particular product and checks for high and low prices. When it finishes, it spits out a string like “$15.00 – $19.00”. You can comment out the foxyshop_price() in foxyshop-product-loop.php and put echo my_high_low_price($product); in its place. Download the code here.

Posted in: Helpful Code Snippets