How to calculate product price based on product category
I am using Product Price by Formula for WooCommerce plugin to calculate product price. This is my formula
([product_weight] * p1) +p2 +p3
Here p1 is common value for each product category. eg. For category gold, it is gold rate and for category silver, it is silver rate. To add gold rate and silver rate I am using custom meta tag in product category. How can I use this field instead of p1 for products in each category?
I need the above formula like for products in category gold, it should be
([product_weight] * gold rate) +p2 +p3
for products in category silver, it should be
([product_weight] * silver rate) +p2 +p3