I am considering my current shop to one that uses woocommerce and I am having an issue with the product variations. I am selling fabric by the yard in 1/4 yard increments and when I set up the product variation, it shows up on the product page as "From:XX," with "XX" being the lowest priced variation, which in this case is the 1/4 yard increment. I need the one yard increment to show on the product page with text to read "price per yard" rather than "from..." The variations themselves work, but the labeling is wrong. Where in the script can I make changes in to get the correct price selected and the text changed? Thanks in advance.
Tell me more
×
WordPress Answers is a question and answer site for
WordPress developers and administrators. It's 100% free, no registration required.
|
You can use WooCommerce built-in filter/hooks to modify the output for pricing. I believe the filter you want is woocommerce_variation_price_html; you can find the documentation at WooCommerce Docs. It's going to require some PHP coding to do. But a simple solution may be to use simple products using the quantity to determine your total pricing. So in your case set the price per 1/4 yard and allow the customer to indicate the number of '1/4 yards' they would like to purchase. WooCommerce would then show the price per 1/4 yard and you could do away with the overhead of variations. |
|||||
|