Add to Cart Form does not display variant prices, if they are all the same [SOLVED]

Hey Themeco,

as far as I know your Add to Cart Form element ist the only way to use product variants, since the variants do not work with loopers.

Unfortunately it seems to have a bug, if all variant prices are the same. Then the price does not get displayed. If I alter at least one of the variant prices, the price shows up in the form. See the screenshots. Using Pro 6.4.16.

Price is not displayed – all variant prices are the same:

Price is displayed after I changed one of the prices:

Hi @raye,

Thanks for reaching out.
It seems that you are having a similar issue described in the following thread.

Hope it helps.
Thanks

@tristup

Oh, ok, thank you for the helpful information. Strange behavior by WooCommerce then.
I will try to work around it with the information of the post you posted above.

You are most welcome @raye

In case anyone stumbles about this topic. I just found out there is a WooCommerce hook, to control this behavior. If you always want to display prices for variations, even if all prices are the same, you can add this filter:

add_filter( 'woocommerce_show_variation_price', function() { return TRUE;} );

In my opinion, this should be default by WooCommerce (just to clarify again: this is not a Themeco decision, this is a WooCommerce decision).

Hey @raye,

We are glad you have found the resolution to the issue. And thank you for sharing this information.

Cheers.

Thanks for this! Just ran across the same issue… function worked perfectly

You are most welcome @uxmediahouse

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.