• Resolved kyarauk

    (@kyarauk)


    I updated to the latest version 1.9.2 but this breaks all payments in the checkout.

    When I try to proceed to pay using PayPal, upon clicking the checkout button there is an error message displayed at the top of the checkout page “Could not retrieve order” – This doesn’t even initiate the PayPal modal that enables login.

    Looking at the logs, there is nothing obvious that tells me what it is, however, the notes on one of the attempted order says the following “plugins/woocommerce-paypal-payments/modules/ppcp-api-client/src/Endpoint/OrderEndpoint.php:459 Order status changed from Pending payment to Failed.”

    It also breaks the form for Stripe, disabling the ability to click on the card fields therefore disabling all payment options I offer.

    I have had to rollback to the previous version as I cannot afford to not get orders through, however this sacrifices some of my page speed given PayPal scripts are being called on the product pages when PayPal buttons aren’t even present which the latest version would fix.

    Can you advise whether this is something you are aware and when there might be a fix for it?

    WordPress version 6.0.1
    WooCommerce version 6.7.0
    WooCommerce Stripe Gateway version 6.5.1
    Divi theme version 4.17.6

Viewing 15 replies - 1 through 15 (of 19 total)
  • Plugin Support Syde Niklas

    (@niklasinpsyde)

    Hi @kyarauk,

    If all else fails, there is a workaround package for the script-loading behavior based on 1.9.1 in the GitHub issue. The package can be downloaded from here.

    But anyway, regarding the error you experience with 1.9.2: There must be something on your site causing an incompatibility with the latest version. Other users reported similar behavior where the Siteground Optimizer plugin was the cause, and we’re looking into improving the compatibility with plugins like it out of the box.
    This article may help find the right setup.

    Kind regards,
    Niklas

    I am having the same problem with this Plugin. How do I roll back to version 1.9.1 until the issue gets fixed?

    nm I loaded the above 1.9.1 scriptfix package and I think this will work.

    1.9.1 scriptfix is okay, now PayPal it’s working but we’ll wait for an official fix *update. I also use the siteground optimizer plugin, I think there is a conflict with this plugin, from what I’ve read so far…

    Hi, I have the same problem, deactivating the siteground plugin, everything works perfect, but how can I download scriptfix?

    Found the problem in the siteground plugin, just go to it and in the Javascript section disable:

    Minify JavaScript files
    RECOMMENDED
    Minify your JavaScript files to reduce size and number of server requests.

    • This reply was modified 1 year, 10 months ago by sseba93.
    Plugin Support Syde Niklas

    (@niklasinpsyde)

    Hi everyone,

    To oversimplify it a bit, some changes in the 1.9.2 update made the button rendering a little bit more complex than before.
    Previously, using certain Frontend Optimization features from the SG Optimizer may not have been a major problem, but in the new version, this may be different.

    We regret hearing if this caused problems for you and are looking into implementing a filter in the next plugin version that automatically prevents the JavaScript files from being minified by the SG Optimizer plugin.

    For now, the scripts mentioned here can be manually whitelisted to make the Frontend Optimizations work with version 1.9.2: https://woocommerce.com/document/woocommerce-paypal-payments/#faq-paypal-smart-buttons-not-loading
    Or the Javascript minification can also be turned off entirely.
    I hope this helps!

    Kind regards,
    Niklas

    Thread Starter kyarauk

    (@kyarauk)

    @niklasinpsyde thanks for the workaround, I will just wait for the new version to be out.

    I rolled back to 1.9.1 for now as I don’t wish to deactivate a plugin that works in all other aspects to “fix” another. How soon do you think you will have the next update?

    How soon do you think you will have the next update?

    Plugin Support Syde Niklas

    (@niklasinpsyde)

    @everyone Considering this thread is marked resolved now, please create a new thread for yourself if any questions remain.

    I will provide a final update here unless @kyarauk has any follow-up questions.
    We regret the trouble caused by the update, but this problem would have been difficult to anticipate. At least unless a user on a SiteGround-hosted website had tried the 1.9.2-rc version from GitHub before the official release.
    The next release candidate is scheduled to be available on GitHub next week, with an official release about a week after, near the end of the month.

    But to explain the problem in a little more detail:
    There is no need to fix PayPal Payments because it doesn’t do anything wrong here. Honestly, I’m more surprised this didn’t occur in earlier plugin versions.
    On SiteGround-hosted websites, the Optimizer plugin can use aggressive methods like uglify to alter your website code. In most cases, this may work fine to improve your page speed without breaking anything.
    But when complex scripts (e.g. PayPal) are involved, this minification feature can actively break PayPal functionality. The PayPal scripts are already minified, and other plugins have no reason to mess with them.

    The only thing the next PayPal Payments update will do differently is implement a filter like this to prevent the Optimizer plugin from modifying the files: https://gist.github.com/InpsydeNiklas/0e44ab66ab39f232591686d048a0e32e
    I can’t tell if this works due to the unavailability of a SiteGround-hosted environment.
    So if anybody wants to give this filter a try, feedback would be appreciated. The code must be added to the (child) theme’s functions.php file.

    Again, if there are any other questions or when you want to provide feedback about the filter, please create a new thread so we can better keep track of your requests.
    Thanks!

    Kind regards,
    Niklas

    I had the same and when deactivating Siteground optimizer all seems to be well.

    This is the second time SG Optimizer has conflicted with another plugin.

    Alan

    To fix the site ground optimizer disable all settings from Front end section of the plugin, it appears some of them are in conflict with the new plugin update. , You can try enabling them 1 by 1 and see which ones in particular are causing the conflict, or keep them disabled and still have the plugin cache functionalities set to On – that way it will still help with the speed and avoid issues with the conflict.

    getting this error quite often, please help

    Could not retrieve order. OrderEndpoint.php:459 Order status changed from Pending payment to Failed.

    Could not retrieve order. OrderEndpoint.php:459 Order status changed from Pending payment to Failed. 1.9.3, 6.9.4, Current version: 6.0.2 — we are getting this alot lately.

Viewing 15 replies - 1 through 15 (of 19 total)
  • The topic ‘Could not retrieve Order error with latest update’ is closed to new replies.