More fixes

WooCommerce PayPal not working: no button, an error, or orders stuck

The PayPal button is missing from checkout, or customers click it and get Something went wrong, or they pay and the order sits on Pending payment while the money is in your PayPal account. Each of these has a short list of causes. Two checks tell you whether PayPal ever saw the payment, and whether it was able to tell your shop afterwards.

Customer sees

What the checks found


  

Check 1: did PayPal see the payment?

Log in to your PayPal business account and open Activity. Look for the customer's name or amount at the time they tried. If the payment is there and completed, the money arrived and only the shop was not told: go to Check 2. If nothing is there, the problem is on the checkout page itself. Open checkout in a private window, press F12, and look at the Console tab while the page loads and when you click the PayPal button. A red error mentioning paypal.com/sdk means the PayPal script was blocked or delayed. Also check you are not in sandbox mode with live customers, or live mode with sandbox test logins.

Check 2: can PayPal reach your shop?

With the official WooCommerce PayPal Payments plugin, go to WooCommerce > Settings > Payments > PayPal and open the connection or webhooks section. It shows whether webhooks are subscribed; if not, use the button there to resubscribe. Webhooks are the messages PayPal sends back to say a payment completed. They are refused when the site is behind a maintenance mode, a password, a firewall that blocks PayPal, or a security plugin that blocks wp-json. Then open WooCommerce > Status > Logs and read the newest PayPal log for an error line at the time of the failed order.

What each answer means

What you seeCauseFix
No PayPal button at allA speed plugin delays or combines JavaScript, or the shop currency or country is one PayPal does not offer that button forExclude the PayPal script and the checkout page from the speed plugin's delay and combine options; check the shop currency is supported
Button shows, then "Something went wrong"Live and sandbox mixed up, an expired connection after a PayPal password or account change, or a theme that changes the checkout fieldsDisconnect and reconnect PayPal in the plugin settings in the right mode; test with a default theme
Paid in PayPal, order stuck on Pending paymentWebhooks not subscribed, or blocked by a firewall, maintenance mode or security pluginResubscribe webhooks, allow PayPal through, then mark the stuck orders as Processing after matching each to the PayPal payment
Orders stuck, shop still on the old "PayPal Standard"The old gateway relies on IPN messages, which many hosts and firewalls now dropMove to WooCommerce PayPal Payments and turn off PayPal Standard
Card fields missing, only the yellow buttonYour PayPal account has not been approved for the advanced card fields, or that option is switched offCheck eligibility in the plugin's settings; the standard button still takes cards through PayPal's own window
Works for you, fails for some customersA cached checkout page serving an old payment token, or a country PayPal declines for your accountExclude cart and checkout from every cache; read the reason in PayPal Activity for those attempts
Two PayPal buttons, or both plugins activeTwo PayPal plugins fighting over the same checkoutKeep one PayPal plugin, deactivate the other

Check it worked

In a private window, put a cheap product in the cart and pay with PayPal. If you want to test without real money, switch the plugin to sandbox mode and use a PayPal sandbox buyer login, then switch back to live before you open the shop again. The order should move to Processing on its own within a minute, and the PayPal log should show the webhook arriving. Clear the site and host cache afterwards.

What not to do

If you would rather someone else finds why PayPal fails and fixes it, that is what the box below is for. Related: orders stuck on pending payment, Stripe payment failed, no payment methods at checkout.