Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Not compatible with Elementor :( #4647

Closed
geofry93 opened this issue Aug 29, 2021 · 1 comment
Closed

Not compatible with Elementor :( #4647

geofry93 opened this issue Aug 29, 2021 · 1 comment

Comments

@geofry93
Copy link

After lots of testing and disabling of plugins and themes, I've discovered that the cause of the error is an incompatibility with elementor and WooCommerce Blocks. I'm using WooCommerce Blocks to display my checkout page and the issue is that after submitting a purchase, I do not get redirected to the order confirmation page. Here is what the error message looks like:

Fatal error: Uncaught Error: Call to undefined method WP_Error::get_data() in /home/customer/www/staging4.harrym7.sg-host.com/public_html/wp-content/plugins/woo-gutenberg-products-block/src/RestApi.php:64 Stack trace: #0 /home/customer/www/staging4.harrym7.sg-host.com/public_html/wp-content/plugins/woo-gutenberg-products-block/src/BlockTypes/AbstractBlock.php(349): Automattic\WooCommerce\Blocks\RestApi->get_routes_from_namespace('wc/store') #12058 /home/customer/www/staging4.harrym7.sg-host.com/public_html/wp-content/plugins/woo-gutenberg-products-block/src/BlockTypes/Checkout.php(99): Automattic\WooCommerce\Blocks\BlockTypes\AbstractBlock->enqueue_data(Array) #2 /home/customer/www/staging4.harrym7.sg-host.com/public_html/wp-content/plugins/woo-gutenberg-products-block/src/BlockTypes/AbstractBlock.php(287): Automattic\WooCommerce\Blocks\BlockTypes\Checkout->enqueue_data(Array) #3 /home/customer/www/staging4.harrym7.sg-host.com/public_html/wp-content/plugins/woo-gutenberg-products-block/src/BlockTypes/Checkout.php(55): Automat in /home/customer/www/staging4.harrym7.sg-host.com/public_html/wp-content/plugins/woo-gutenberg-products-block/src/RestApi.php on line 64
There has been a critical error on this website.

Here's what happens when I complete an order with Elementor enabled (no order summary shows)

Screen Shot 2021-08-28 at 9 12 26 PM

Here is what happens when I disable Elementor (order summary shows!)

Screen Shot 2021-08-28 at 9 12 55 PM

Thanks!

@nerrad
Copy link
Contributor

nerrad commented Sep 3, 2021

Hi @geofry93, thanks for taking time to debug this, determine the conflict with Elementor and then create this issue.

While there is clearly a fatal happening in the call stack within WooCommerce blocks, I suspect the trigger for the fatal likely has something to do with loading order in Elementor because the error is pointing to a low level route getter within the Store REST API.

I've created #4683 to at least improve the error handling here and keep the fatal from happening in these contexts, but even then I don't think fixing it will address the issue with the Order Received page not loading correctly in the Elementor context. Ultimately, this is something for the Elementor team to investigate and troubleshoot.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants