Hi guys,
the 5.5.14 update resolved the problem.
With or wihtout
function my_setup() {
if(function_exists('get_field')) {
....
}
}
add_action('after_setup_theme','my_setup');
I don’t get the error anymore
Here is a reduced version of mine:
global $tab_prix;
$tab_prix = tab_prix(get_current_user_role());
function tab_prix($user_role) {
$args = array(
'posts_per_page' => -1,
'offset' => 0,
'post_type' => 'confiserie',
'post_status' => array('publish', 'private'),
'suppress_filters' => true
);
$confiseries = get_posts( $args );
foreach($confiseries as $confiserie) {
$reference = get_field('reference', $confiserie->ID);
$refs = get_field('reference_secondaire', $confiserie->ID);
}
}
When i comment out the lines with getfield no error at all and on 5.5.12 still no error but on 5.5.13 I get the same error as I said on my post.
I know it doesn’t make sense but well i’m stuck at 5.5.12 at the moment.
reference is text or string (got the admin in french) type