Home WooCommerce getting the selected attributes of the product attribute on a single product page
Reply: 0

WooCommerce getting the selected attributes of the product attribute on a single product page

Dmitriy Olhovsky
1#
Dmitriy Olhovsky Published in 2018-01-12 22:40:34Z

I need to change price of variable product that depends of selected and manually input 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 cookies 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.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.300184 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO