Tuesday, March 22, 2022
The Great Tit
Updated: 20. 9. 2022, Added: 22. 3. 2022

Display WooCommerce variation price as main price in Oxygen Builder

Javascript

(function($) {
$(document).ready(function() {
var originePrice = $(".oxy-product-price .price").html();
$('.variations_form').on('woocommerce_variation_has_changed', function() {
if ($(".variations_form select").val() == '') {
$(".oxy-product-price .price").html(originePrice);
} else if ($(".woocommerce-variation-price .woocommerce-Price-amount").length) {
var variationPrice = $(".woocommerce-variation-price .woocommerce-Price-amount").html();
$(".oxy-product-price .price").html(variationPrice);
}
});
});
})(jQuery);

Css

CSS:
.woocommerce-variation-price .price {
display: none;
}
Did I help you? Fuel our WordPress journey
Beep this article to your friends!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

2 comments on “Display WooCommerce variation price as main price in Oxygen Builder”

linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram