Pretty simple what I am trying to do here, I’m just stuck since WooCommerce is new to me, and I’m still learning PHP as we speak.
I’m using the latest version of WooCommerce and WordPress with a custom theme. In one of the themes templates I want to output the price of a product.
The issue is, this product has variations, so instead of outputting the price as “$154–$592” (which is the standard WooCommerce price output for products with variations) I would rather output it as “Starts at: $154“.
In other words, I only want to echo the low price, with the words “Starts at:” preceding it,
Does this make sense?
Solve this one myself! Here’s how you do it:
Add this code below to your themes function.php file…
Now add this code to your template where you want to display the price…
Works like a charm for me!