Human friendly WordPress Automation
All functions in Calculated Fields for ACF take exactly one argument. This works out well in most situations, but for rounding functions, this might become a limitation. For instance, when the resulting number represents a price, it might be convenient to round to a precision of 2 decimals.
The best way to overcome this is to use a little math trick. First multiply the function argument with a multiple of 10 and then divide the result with the same multiplier of 10. Examples:
Note that this trick works well with the other rounding functions, ceil() and floor()
Powered by BetterDocs
Your email address will not be published. Required fields are marked *
Yes, sign me up for informational and marketing emails from wundermatics.com
Save my name, email, and website in this browser for the next time I comment.