- This topic has 2 replies, 2 voices, and was last updated 11 months, 3 weeks ago by .
-
Topic
-
Hi !
I’m facing a fatal error :
Fatal error: Uncaught Error: Call to undefined function get_current_screen() in .../wp-admin/includes/template.php:1379 Stack trace: #0 .../vendor/meta-box/meta-box/inc/fields/taxonomy.php(359): remove_meta_box('thematiquediv', NULL, 'side') #1 .../vendor/meta-box/meta-box/inc/fields/taxonomy.php(345): RWMB_Taxonomy_Field::remove_default_meta_box(Array) #2 .../vendor/meta-box/meta-box/inc/field.php(587): RWMB_Taxonomy_Field::admin_enqueue_scripts(Array) #3 .../vendor/meta-box/meta-box/inc/meta-box.php(166): RWMB_Field::call(Array, 'admin_enqueue_s...') #4 .../vendor/meta-box/mb-frontend-submission/src/Form.php(65): RW_Meta_Box->enqueue() #5 .../vendor/meta-box/mb-frontend-submissio in .../wp-admin/includes/template.php on line 1379
The frontend shortcode is on a custom woocommerce endpoint.
Since the “My account” page has been modified with Elementor it generate this fatal error. Before it was working smoothly.My code is in a plugin with metabox has a composer dependency.
I “fixed” it by adding a check before calling the shortcode but it’s not pretty 😉 :
if (! function_exists('get_current_screen')) { function get_current_screen() { return null; } }
Thanks in advanced for your time !
Johann
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.