I have a wp condition which displays me the price of the products.
if (empty($sales_price)) {
echo '<span class="price"><span class="woocommerce-Price-amount amount">'.$regular_price.' <span class="woocommerce-Price-currencySymbol">zł</span></span> </span>';
} else {
echo '<span class="price"><del><span class="woocommerce-Price-amount amount">'.$regular_price.' <span class="woocommerce-Price-currencySymbol">zł</span></span></del> <ins><span class="woocommerce-Price-amount amount">'.$sales_price.' <span class="woocommerce-Price-currencySymbol">zł</span></span></ins></span>';
}
Each product has several variations and different prices. My problem is that prices do not change when changing options in the select box. I tried to add JS in different ways but nothing wanted to reload my price. How can I solve it?