Support

Account

Home Forums General Issues 25.654628 to 25.65 Decimal Update Reply To: 25.654628 to 25.65 Decimal Update

  • I think something like that should work:

    
    function my_acf_format_value( $value, $post_id, $field ) {
    	$value = round($value, 2);
    	echo $value;
    }
    
    // Apply to fields named "my_field_name".
    add_filter('acf/format_value/name=my_field_name', 'my_acf_format_value', 10, 3);
    

    The filter “acf/format_value” give the ability to modify the value of a specific field (here by field’s name).

    https://www.advancedcustomfields.com/resources/acf-format_value/

    Hope this helps 😉