[SOLVED] Order status has changed from pending payment to failed. Please retry.

Order status has changed from pending payment to failed. Please retry.

In short, this translates to a BIG headache for every online shop owner. You cannot process the orders anymore, losing clients and money. In this article, I will try to find a solution for this WooCommerce issue. In one of my client’s cases, the solution I found was pretty easy to check & repair: Through one of her site performance plugins, she disabled the “jquery-blockui,” so everything went crazy.

[SOLVED] You cannot add another product to your cart WooCommerce. Payment processing failed. Please retry
Order status has changed from pending payment to failed. Please retry.
I checked what plugins she have installed and found a known script manager plugin, which I also use on some of my sites (Perfmatters). I checked the WooCommerce area, and I found she disabled all the necessary WooCommerce scripts on the entire site, even on the product, cart, and checkout pages. Big mistake! It is ok to disable this script where you do not need them, but you should not do this on these pages.

Disable All WooCommerce Styles and Scripts Except Shop Pages

The main idea behind disabling “jquery-blockui” is to gain more website speed. As you may be aware, the WooCommerce scripts are loading on every page, even when it is not needed. The right thing to dodo is to disable this script and other WooCommerce scripts (cart fragments, price slider, single product script, etc.) on blog pages, pages, and anywhere else where you do not plan to sell something (or adequately use the WooCommerce plugin). For example, if your site has 100 articles and you sell 1 product, the CSS and JS scripts will load 101 times (if the articles are accessed simultaneously). Even if no one lands on the product page, the WooCommerce scripts will load, slowing your website.

Can you post the WooCommerce scripts?

Yes. To make a better idea of how many useless scripts are loaded, take a look below:

CSS scripts:

/wp-content/plugins/woocommerce/assets/css/woocommerce-layout.css?ver=5.9.2 
/wp-content/plugins/woocommerce/assets/css/woocommerce-smallscreen.css?ver=5.9.2
/wp-content/plugins/woocommerce/assets/css/your-theme.css?ver=5.9.2

JS scripts:

/wp-content/plugins/woocommerce/assets/js/frontend/add-to-cart.min.js?ver=5.9.2
/wp-content/plugins/woocommerce/assets/js/frontend/cart-fragments.min.js?ver=5.9.2
/wp-content/plugins/woocommerce/assets/js/js-cookie/js.cookie.min.js?ver=2.1.4-wc.5.9.2
/wp-content/plugins/woocommerce/packages/woocommerce-blocks/build/wc-blocks-style.css?ver=5.9.2
/wp-content/plugins/woocommerce/packages/woocommerce-blocks/build/wc-blocks-vendors-style.css?ver=5.9.2

Many useless resources will be loaded if you do not pay attention, which translates into a slow website. If you also have a ton of plugins installed, an outdated or (even worse) a bloated theme, uncompressed images, and (the cherry on top of the cache) a slow hosting, be happy if your site speed score will pass 15% – 20%.

If you plan to speed up your WooCommerce site, be aware of these things and pay attention to everything you do there (“measure seven times, cut once”).

Order status has changed from pending payment to failed. Please retry.

The “jquery-blockui” is a solution for the case above. However, what if you have not touched the scripts, and everything was suddenly broken?

In this case, you have to look at what was recently installed on your site (or auto-updated, if you have this feature on). You should also look at the WooCommerce Status (admin Dashboard > selecting WooCommerce > Status.). Anything marked with the red color is a WooCommerce error, so you must get rid of it.

You should also check if your gateway account (Stripe, PayPal, etc.) is in good shape. If the account is blocked for different reasons (require validation, the keys and webhooks need to be updated, etc.), talk with the support team, and they will help you solve the issue.

Related articles:

WooCommerce Frequently Questions and Answers

[SOLVED] Your Cart Is Currently Empty Error – WooCommerce

[SOLVED] WooCommerce Mini Cart Not Update

[SOLVED] How To Change WooCommerce Button Text

 

Previous Post
WooCommerce Frequently Questions and Answers
Next Post
WordPress Excerpts: The Definitive Guide
Menu