WooCommerce Variable Product Price is not showing

I am using variable products on my WooCommerce 2.6.4 shop, I have added different prices for two different variations of the same product. When choosing one of the two variations, no price is displayed at all. The following div is just empty:

<div class="woocommerce-variation single_variation"></div>

I would like the pre-selected variation price to be displayed as default, while the non pre-selected variation price should be dynamically replaced when selected. Almost like this demo, except from a pre-selected item and price should be displayed as default.

Solutions

Add this code to your function.php curent theme.

add_filter( 'woocommerce_show_variation_price', '__return_true' );

Similar questions

WooCommerce: Display product total price in cart/minicart instead of product price
I am using WooCommerce on my Wordpress site and I want to display the total price per product in my cart/minicart (e.g.: 'Product Quantity' x 'Product Price' = 'Product Total Price'). The code I am using right now is working, but there are rounding errors. Expected: Displayed: Here is the code I am using: Is there a simple way to fix this or maybe ...
Display the total price on the WooCommerce single product page with the original product price * minimum quantity
I'm looking to create a PHP code snippet that display the total price on the WooCommerce single product page with the original product price * minimum quantity Based on WooCommerce - auto update total price when quantity changed answer code, this is what i have so far: The problem is that it shows the price for the quantity of one product when view...
Woocommerce - Variable product loads default product image before loading actual Variable product image
I have woocommerce and i am adding variable products with images. When i wish to open the variable product first it loads the default image/ featured image of product before loading variable products image. In other way it loads feature image of product and after that it loads image of that variation.
Woocommerce: Show variable price instead of "From" price
I have been searching for this for quite a while now and i can't find any solutions. I am looking for a way to display the products variation prices inside the "From:" price field, in order to have only 1 price shown on the product page. I have tried this: But it doesn't work for me, The price should change dynamicaly when a different product varia...
How to exclude a variable price from the WooCommerce price filter?
I need to remove one specific variable price from the price filter and for the WooCommerce order by price. I have 4 variable product, and I don't want to show one variable attribute that contains the price $495 for all products in the price filter. I just want to hide this specific attribute so it will not be counted in the price filter as well as ...
WooCommerce Cart - Dynamic Price variable pass into custom price hook
I am getting the dynamic custom price in a variable that I want to pass to the hooked function in woocommerce_before_calculate_totals hook in cart. But it isn't working. This is my code: How can I achieve this? Thanks

Also ask

We use cookies to deliver the best possible experience on our website. By continuing to use this site, accepting or closing this box, you consent to our use of cookies. To learn more, visit our privacy policy .