Fatal error: Uncaught Error: Call to undefined method WP_Error::get_data()
-
[16-Nov-2021 17:43:33 UTC] PHP Fatal error: Uncaught Error: Call to undefined method WP_Error::get_data() in ../wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/RestApi.php:64 Stack trace: #0 ../wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/BlockTypes/AbstractBlock.php(379): Automattic\WooCommerce\Blocks\RestApi->get_routes_from_namespace('wc/store') #1 ../wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/BlockTypes/AbstractBlock.php(317): Automattic\WooCommerce\Blocks\BlockTypes\AbstractBlock->enqueue_data(Array) #2 ../wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/BlockTypes/AbstractBlock.php(85): Automattic\WooCommerce\Blocks\BlockTypes\AbstractBlock->enqueue_assets(Array) #3 ../wp-includes/class-wp-block.php(221): Automattic\WooCommerce\Blocks\BlockTypes\AbstractBlock->render_callback(Array, '', Object(WP_Block)) #4 ../wp-includes/blocks.php(868): WP_Block->render() #5 ../wp-includes/blocks.php(906): render_block(Array) #6 ../wp-includes/class-wp-hook.php(305): do_blocks('<!-- wp:woocomm...') #7 ../wp-includes/plugin.php(189): WP_Hook->apply_filters('<!-- wp:woocomm...', Array) #8 ../wp-includes/widgets/class-wp-widget-block.php(81): apply_filters('widget_block_co...', '<!-- wp:woocomm...', Array, Object(WP_Widget_Block)) #9 ../wp-includes/class-wp-widget.php(393): WP_Widget_Block->widget(Array, Array) #10 ../wp-includes/widgets.php(831): WP_Widget->display_callback(Array, Array) #11 ../wp-content/themes/omens/framework/woocommerce/woocommerce-config.php(723): dynamic_sidebar('sidebar-shop-fi...') #12 ../wp-includes/class-wp-hook.php(303): Omens_WooCommerce_Config->add_toolbar_close('') #13 ../wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters(NULL, Array) #14 ../wp-includes/plugin.php(470): WP_Hook->do_action(Array) #15 ../wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-products.php(646): do_action('woocommerce_bef...') #16 ../wp-content/plugins/woocommerce/includes/shortcodes/class-wc-shortcode-products.php(100): WC_Shortcode_Products->product_loop() #17 ../wp-content/plugins/lastudio-element-kit/includes/modules/woocommerce/classes/base-products-renderer.php(43): WC_Shortcode_Products->get_content() #18 ../wp-content/plugins/lastudio-element-kit/includes/addons/vendor/woo-products.php(1738): LaStudioKitThemeBuilder\Modules\Woocommerce\Classes\Base_Products_Renderer->get_content() #19 ../wp-content/plugins/elementor/includes/base/controls-stack.php(2154): Elementor\LaStudioKit_Woo_Products->render() #20 ../wp-content/plugins/elementor/includes/base/widget-base.php(581): Elementor\Controls_Stack->render_by_mode() #21 ../wp-content/plugins/elementor/includes/base/widget-base.php(722): Elementor\Widget_Base->render_content() #22 ../wp-content/plugins/elementor/includes/base/element-base.php(450): Elementor\Widget_Base->print_content() #23 ../wp-content/plugins/elementor/includes/base/element-base.php(744): Elementor\Element_Base->print_element() #24 ../wp-content/plugins/elementor/includes/base/element-base.php(450): Elementor\Element_Base->print_content() #25 ../wp-content/plugins/elementor/includes/base/element-base.php(744): Elementor\Element_Base->print_element() #26 ../wp-content/plugins/elementor/includes/base/element-base.php(450): Elementor\Element_Base->print_content() #27 ../wp-content/plugins/elementor/core/base/document.php(1516): Elementor\Element_Base->print_element() #28 ../wp-content/plugins/lastudio-element-kit/includes/modules/theme-builder/documents/theme-document.php(401): Elementor\Core\Base\Document->print_elements(Array) #29 ../wp-content/plugins/elementor/includes/frontend.php(1055): LaStudioKitThemeBuilder\Modules\ThemeBuilder\Documents\Theme_Document->print_elements_with_wrapper(Array) #30 ../wp-content/plugins/elementor/core/base/document.php(1038): Elementor\Frontend->get_builder_content(4696, false) #31 ../wp-content/plugins/lastudio-element-kit/includes/modules/theme-builder/documents/theme-document.php(184): Elementor\Core\Base\Document->get_content(false) #32 ../wp-content/plugins/lastudio-element-kit/includes/modules/theme-builder/documents/theme-document.php(197): LaStudioKitThemeBuilder\Modules\ThemeBuilder\Documents\Theme_Document->get_content() #33 ../wp-content/plugins/lastudio-element-kit/includes/modules/theme-builder/classes/locations-manager.php(307): LaStudioKitThemeBuilder\Modules\ThemeBuilder\Documents\Theme_Document->print_content() #34 ../wp-content/plugins/lastudio-element-kit/includes/modules/theme-builder/classes/locations-manager.php(179): LaStudioKitThemeBuilder\Modules\ThemeBuilder\Classes\Locations_Manager->do_location('archive') #35 [internal function]: LaStudioKitThemeBuilder\Modules\ThemeBuilder\Classes\Locations_Manager->LaStudioKitThemeBuilder\Modules\ThemeBuilder\Classes\{closure}() #36 ../wp-content/plugins/elementor/modules/page-templates/module.php(207): call_user_func(Object(Closure)) #37 ../wp-content/plugins/elementor/modules/page-templates/templates/header-footer.php(19): Elementor\Modules\PageTemplates\Module->print_content() #38 ../wp-includes/template-loader.php(106): include('/Volumes/Busine...') #39 ../wp-blog-header.php(19): require_once('/Volumes/Busine...') #40 ../index.php(17): require('/Volumes/Busine...') #41 {main} thrown in ../wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/RestApi.php on line 64Hi guys,
I’ve got this error when calling WP Sidebar inside the Elementor and I checked the source code
../wp-content/plugins/woocommerce/packages/woocommerce-blocks/src/RestApi.phand I found a problem$namespace_index variable may return an error ( WP_ERROR ) and in WP_ERROR class there is no get_data() method, that’s why we get the error above
https://i.ibb.co/N7qNMGX/Screenshot-at-Nov-17-01-08-41.png
Please check it and solve it.
Thanks & Regards,
Jun.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
The topic ‘Fatal error: Uncaught Error: Call to undefined method WP_Error::get_data()’ is closed to new replies.