Support

Account

Home Forums General Issues acf/load_value php error Reply To: acf/load_value php error

  • You cannot alter the default value of a field in the load value filter. You can only alter the value.

    Explanation: When using filters in WP only the first argument passed to the filter can be returned and it needs to be the correct format for that argument that the calling function expects. In this case $value is likely a string value and you are attempting to return a field object (array) and this is likely the cause of your error.

    Try using an acf/prepare_field filter instead if you want to alter the field’s default value.