Product regular price calculation based on 2 custom fields in Woocommerce 3
问题 In Woocommerce I have set 2 custom fields in the admin in the pricing section under Woocommerce default prices fields: Margin rate and Purchase price. I am trying to figure out how can I auto update the product price (regular price field) based on the calculation below: $product_price = $rate_margin * $purchase_price; Any help is appreciated. 回答1: You should add alway add the code that is used for your additional pricing fields in your question. The code below is: displaying and saving 2