Product Price by Formula for WooCommerce plugin lets you set formula for automatic WooCommerce product price calculation.
Product price formula can be set with standard mathematical operations, e.g.: x*1.5+p1/p2
Examples:
- [math_round] – Rounding shortcode. A number of decimals can be set with precision attribute.
[math_round precision="1"][if_customer_location country="US,CA"]x*1.10[/if_customer_location][if_customer_location not_country="US,CA"]x*1.20[/if_customer_location][/math_round] - [math_ceil] – Rounding up (ceil).
[math_ceil]x*[product_weight][/math_ceil] - [math_floor] – Rounding down (floor).
[math_floor]x*[product_length][/math_floor] - [math_max] – Max value.
[math_max value1="x*p1" value2="{product_total_sales}"] - [product_meta] – Retrieves any meta for the product. Meta key is set by required key attribute.
[product_meta key="_weight"] - [if_customer_location] – Price by customer’s location (by IP).
[if_customer_location country="US,CA"]x*1.10[/if_customer_location][if_customer_location not_country="US,CA"]x*1.20[/if_customer_location]
- Price by product’s meta.
- Price by product’s ID.
- Apply formula to regular product price.
- Apply formula to sale product price.
- etc.