Hi
after upgrading to wordpress 5.8 and acf pro 5.9.9 I get a new error when calling get_current_screen() in a function called when a field is loaded.
I use acf/load_field to call a function and get this error:
Fatal error: Uncaught Error: Call to undefined function get_current_screen() in /home/alfanova/fairfestival.dk/wp-content/plugins/udstillerguide/funktioner/acf_funktioner/acf_load.php:102
Stack trace:
#0 /home/alfanova/fairfestival.dk/wp-includes/class-wp-hook.php(303): udstillinger_modul(Array)
#1 /home/alfanova/fairfestival.dk/wp-includes/plugin.php(233): WP_Hook->apply_filters(Array, Array)
#2 /home/alfanova/fairfestival.dk/wp-content/plugins/advanced-custom-fields-pro/includes/acf-hook-functions.php(101): apply_filters_ref_array(‘acf/load_field/…’, Array)
#3 /home/alfanova/fairfestival.dk/wp-includes/class-wp-hook.php(303): _acf_apply_hook_variations(Array)
#4 /home/alfanova/fairfestival.dk/wp-includes/plugin.php(189): WP_Hook->apply_filters(Array, Array)
#5 /home/alfanova/fairfestival.dk/wp-content/plugins/advanced-custom-fields-pro/includes/acf-field-functions.php(58): apply_filters(‘acf/load_field’, Array)
#6 /home/alfanova/fairfestival.dk/wp-content/plugins/advanced-custom-fields-pro/includes/acf-field-functions in /home/alfanova/fairfestival.dk/wp-content/plugins/udstillerguide/funktioner/acf_funktioner/acf_load.php on line 102
I cant see if it is wordpress 5.8 or acf pro 5.9.9 that is causing the problem. Anyone else seeing this error?
Never mind. It was an update for WP Import all that caused the problem.