acf-get
acf-get copied to clipboard
Empty Relation field returns an empty STRING
Here is the fix.
<?php
function acf_fix_relationship_empty_value($value)
{
return ('' === $value) ? [] : $value;
}
add_filter('acf/format_value/type=relationship', 'acf_fix_relationship_empty_value', 999, 1);