Fatal error: Uncaught Error: Call to undefined function get_current_screen()

Installed Groups & Groups Restrict Categories and everything works as it should with respect to WooCommerce Product Catgeories.

But when I want to go to Appearance -> Customise I get the following error:

Fatal error: Uncaught Error: Call to undefined function get_current_screen() in /home/bsuragen/public_html/uatprincessbutler/wp-content/plugins/groups-restrict-categories/lib/admin/class-groups-restrict-categories-taxonomy-admin.php:367 Stack trace: #0 /home/bsuragen/public_html/uatprincessbutler/wp-includes/class-wp-hook.php(298): Groups_Restrict_Categories_Taxonomy_Admin::get_terms_args(Array, Array) #1 /home/bsuragen/public_html/uatprincessbutler/wp-includes/plugin.php(203): WP_Hook->apply_filters(Array, Array) #2 /home/bsuragen/public_html/uatprincessbutler/wp-includes/class-wp-term-query.php(361): apply_filters('get_terms_args', Array, Array) #3 /home/bsuragen/public_html/uatprincessbutler/wp-includes/class-wp-term-query.php(291): WP_Term_Query->get_terms() #4 /home/bsuragen/public_html/uatprincessbutler/wp-includes/taxonomy.php(1119): WP_Term_Query->query(Array) #5 /home/bsuragen/public_html/uatprincessbutler/wp-includes/nav-menu.php(557): get_terms(Array, Array) #6 /home/bsuragen/public_html/uatprincessbutler/wp-in in /home/bsuragen/public_html/uatprincessbutler/wp-content/plugins/groups-restrict-categories/lib/admin/class-groups-restrict-categories-taxonomy-admin.php on line 367

When I de-activate the Groups Restrict Categories plugin everything works normally again.

P.S. Disabling Legacy settings in Options did't help.

Regards,

Lennert


Comments

3 responses to “Fatal error: Uncaught Error: Call to undefined function get_current_screen()”

  1. The Group Restrict Categories 2.0.1 plugin update fixed the issue.

    Thanks!

    Lennert

    1. Perfect !!

  2. Hi Lennert,
    Please check if you have installed the last Groups Rectrict Categories and Groups version.
    If you have the last and the problem persists, please let me know.
    Kind Regards,
    Antonio B.

Share