Could not retrieve order. Checkout Error
-
When completing checkout (Paypal is selected as only payment option), after clicking ‘place order’ I get the error ‘Could not retrieve order.’
WordPress – 6.0.1
Astra Theme
Paypal Plugin – 1.9.2Thanks in advance
-
UPDATE:
I noticed a similar thread and installed:
PCP-681-woocommerce-paypal-payments-couldnotretrieve
This appears to have fixed the problem. Are there plans for a fix within future plugin updates?
We having this issue also
Hi @studio36digital,
The change from the package you mentioned was merged for the 1.9.0 version.
Can you tell us more about how you can reproduce this error?
Do you initiate the payment process with the buttons from the non-Checkout pages, and then the error occurs after confirming the order on the Checkout page with the “Place order” button?For a normal checkout, there shouldn’t be a “Place order” button on the Checkout page but instead, the PayPal smart buttons: https://woocommerce.com/document/woocommerce-paypal-payments/#paypal-on-checkout-page
Could you provide a link to your website so we can look into the reported behavior?
Thanks!Kind regards,
NiklasI have 2 websites and both have the same Issue. This is weird because some weeks ago I could process an order on one of my sites. I made it for testing my checkout page. Now, I noticed that when I choose Paypal as a payment option, the button “Place Order” remains there. Before, when I chose the Paypal option, instead of “Place Order” appeared something like “Continue with Paypal”
Today, I installed Paypal on my new website, and the same occurs.
Please review and fix the plugin, I think it is a bug. There are many people in different online forums complaining about this issue. I don’t think this is a casuality.`
We’re having this same issue. On the checkout page of our site, there’s no form to enter credit card info, but there’s a functioning Place Order button. When that’s clicked, an error message pops up and the order status is “Failed” in our WooCommerce orders page. In the order notes, there’s a note that says, “Could not retrieve order” followed by a path to the OrderEndpoint.php file.
According to the note, it’s either getting a 404 response code or an empty response when returning the order, which throws the error that we’re seeing on the checkout page.
Here’s our setup:
WordPress: 6.0.1
Theme: Astra Pro (3.9.1)
WooCommerce: 6.8.0
WooCommerce PayPal Payments: 1.9.2Please advise, thanks!
- This reply was modified 2 years, 3 months ago by haydendurand.
Same issue on my site, rhinestonecrowns.com
Plug in worked fine for months, after the update yesterday all my smartboxes are gone, giving our customers error message of order not able to be retreived and failing on the backend. Paypal standard is now activated, when I toggle it off there is only a button to “place order” then nothing happens.
Hi everyone,
There is not supposed to be a “Place order” button on the Checkout page for the PayPal gateway (unless you initiate the express checkout flow from e.g. the cart page).
If this regular button is visible for some reason, it will not work and cause a Failed order when clicked.In the site mentioned by @awcrowns, this behavior is the likely resulting from JavaScript minification from the Siteground Optimizer plugin. The “optimization” prevents the button from being replaced with the PayPal smart buttons:
This essentially breaks the PayPal Payments plugin, so I suggest disabling minification for PayPal Payments scripts in your optimizer pluginas mentioned here:
https://woocommerce.com/document/woocommerce-paypal-payments/#faq-paypal-smart-buttons-not-loadingThe error may be the same for everyone here, but it is merely a symptom and does not necessarily have the same cause. That’s part of why we want to encourage everyone to create their own thread.
The latest version 1.9.2 reworked the way smart buttons are rendered in preparation for the next update, and looking at these reports, there may be a compatibility issue with a third-party plugin.
Everyone who is experiencing this issue could first of all attempt a downgrade to the previous plugin version 1.9.1.
Alternatively, to isolate the cause, we suggest performing a full conflict test to rule out eventual issues with the theme or a different plugin.
Our recommendation is temporarily activating the default theme Storefront and disabling all other plugins except for?WooCommerce and?PayPal Payments to see if the behavior persists.Here’s a guide that explains the steps in more detail:
How to test for conflicts
Read more about plugin and theme conflicts in the WooCommerce Self-Service Guide.
Please let us know how this works out for you.Also, seeing some mentions of Astra in this thread, it may be worth noting that a different user reported an issue with the new “Modern Checkout” from the Astra 3.9 update. You may want to hold out using the new WooCommerce features from Astra with PayPal Payments 1.9.2 while the Astra team is also investigating.
Kind regards,
NiklasThanks for the help, Niklas! The article you provided was exactly what was needed to mitigate this issue.
Rolling back to 1.9.1 should solve this problem.
This is my 3rd time rolling back woocommerce paypal. Never enable auto-update for this plugin and always have the WP Rollback plugin ready.
@niklasinpsyde You are right!
I also have the SiteGround Optimizer, and in Frontend Optimization – Javascript option, I exclude from JavaScript Minification the script /plugins/woocommerce-paypal-payments/modules/ppcp-button/assets/js/button.js
Once I did this, everything was normal!This works, thanks @niklasinpsyde
Just wanted to chime in and say I had this issue too. Downgrading the plugin worked fine. So did switching to the simple paypal checkout in woocommerce.
I’ve noted the bit above about excluding the javascript minification as i also have SG optimizer but I haven’t tried that yet – just needed to get it back up and running!
We aim to include a filter in the next update that excludes the PayPal scripts in the SiteGround Optimizer plugin without you having to do anything.
The Optimizer plugin can perform rather intrusive modifications likeuglify
only on SiteGround-hosted websites. As a result, it’s difficult for us to reproduce this problem and verify the proposed solution.So feedback would be highly appreciated if anyone with a SiteGround-hosted site could give it a try with the latest PayPal Payments version 1.9.2 and this filter added to the (child) theme’s functions.php file: https://gist.github.com/InpsydeNiklas/0e44ab66ab39f232591686d048a0e32e
Thanks!Kind regards,
Niklas@niklasinpsyde the filter is working, I just updated the plugin to 1.9.2, added the code in the function.php and it’s working. I confirm.
@niklasinpsyde back to 1.9.1 scriptfix, the filter is not working after some tests.
Thanks for the feedback @producerspot.
The filter was updated (same URL) and should be working now.On Monday, a new release candidate version 1.9.3-rc2 (with the filter) will be available here on GitHub: https://github.com/woocommerce/woocommerce-paypal-payments/releases
The official release is expected about a week later and depends on whether or not any edge-case issues are encountered.
Until then, you could also give it a try with this test package as it implements the filter already.
With these versions, there’s no need to manually add the filter or exclude any scripts as it happens automatically.
I hope this helps!Kind regards,
Niklas
- The topic ‘Could not retrieve order. Checkout Error’ is closed to new replies.