I’m using WooCommerce on a WordPress site that I’m building and I need to be able to display a specific product’s price throughout the site. Normally that wouldn’t be an issue, but in this instance it’s a product which has 2 variations, so I need to show both of them (e.g. £4.99 – £9.99). How can I retrieve these values and echo them out?
Leave a Reply
You must be logged in to post a comment.
Put the following in your theme’s
functions.php
file:When you want to use it:
returns: