Skip to content
Advertisement

Change product variation prices via a hook in WooCommerce 3.3

I´m using hooks for customizing variable product prices.

However, this answer does not seem to be working for Woocommerce 3.3.5.

I use following (from the previous post) on my functions.php file:

JavaScript

On product page the price range for product variations shows correct prices (original price*3) but when I select options, price shown for variation is unfiltered. Am I missing something here?


EDIT: I had a slightly different price calculation for simple products and for product variations. I ended up with 3 functions:

JavaScript

Advertisement

Answer

The linked code still work for Woocommerce 3.3.x, see this related recent accepted working answer tested on Woocommerce 3.3.x … Your code is just uncompleted…

You need to use:

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement