Thanks for asking the right questions. I looked deeper and was trying get_field first and then if that returned nothing trying get_sub_field. This output must have been updated within the update so have updated it to account for this.
Thanks for your help!
Sure, have condensed:
$disclaimers = get_field(‘disclaimers’);
if( !empty($disclaimers) ) {
foreach( $disclaimers as $disclaimer ) {
$disclaim_type = $disclaimer['disclaimer'];
#then looping through to generate a string
}
}
This get_field gives an empty array as above in first post. So the foreach loop fails.
If I do like this I can see the data as expected:
if( have_rows('disclaimers') ) {
while( have_rows('disclaimers') ) {
the_row();
// vars
$disclaimer = get_sub_field('disclaimer');
print_r($disclaimer);
}
}
I rolled back to version 5.10.2 and the first foreach snippet worked again.