Home › Forums › General Issues › Automatic Calculation price per kilo › Reply To: Automatic Calculation price per kilo
Hi Nayrod!
You can do this with the update_field function.
https://www.advancedcustomfields.com/resources/update_field/
update_field($selector, $value, [$post_id]);
$selector is your price/per kilo field name
$value is calculated price
$post_id is current product ID
You can use a function in your function.php file to calculate the price ($value).
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.