I need to change price of variable product that depends of selected options (attributes values) by the user. And I need to do this immediately after user select attribute value on single product page.
I tried to do this using hooks "woocommerce_product_variation_get_price" and "raw_woocommerce_price". And I tried to get attributes values using methods "get_attributes", "get_available_variations" etc. But I getted only list of all attributes with all possible values. But I need to get attributes and their values currently selected by user on the product page.
Right now I don't find any possible solution using woocommerce functions. And if I don't find it - I have a idea to store selected values in session variables (on frontend) and access it from the backend. But I understand that this is not best solution :)
Suggest on any solutions, thanks, best regards.
Cache file /home/queryxchang/questarter.com/apps/frontend/config/../cache/-q-woocommerce-getting-the-selected-attributes-of-the-product-attribute-on-a-single-product-page-9-290941-html could not be written