fbpx
Want To Add Extra Images Per Product Variation For Free? Download Now

Variation price not showing when selecting a variation from product page

Isidore Paulin

Hello,

When selecting a variation the price is not showing, more precisely the placeholder price is disappearing but it isn’t replaced with the variation price.

The issue is visible on this page : https://naturacheval.fr/produit/remineralisant-activ-recup-equin/

It used to be working fine, but woocommece has been updated and some changes has been made to the website recently and now it isn’t working anymore.

Edit: I’ve found the issue, I used to get the value for variation price and display it with this jquery code:

$(document).on(‘found_variation’, ‘form.cart’, function( event, variation ) {
         if(variation.price_html) $(‘.varPrice’).html(variation.price_html);
         $(‘.woocommerce-variation-price’).hide();
      });
But it seems woocommerce formatting for the variation price must have changed and this is not working anymore
Edit 2:

I found the issue , for some reason, price_html value is set to an empty span element i’m using variation.display_price as a fix but that returns the price without the currency symbol unfortunately

Hakik Zaman

Hi Isidore,

Displaying prices is not a feature of our plugin, is a feature of WooCommerce itself.

Could you please temporarily deactivate our Swatches plugin and check if it is working with the default WooCommece dropdown or not?

Thank you