Help for owners
My WooCommerce payments stopped working after a PHP update
Short answer
After a PHP change, an older payment plugin or theme can fail because code it relies on behaves differently or has been removed. WooCommerce recommends PHP 8.3 or greater and a backup before any update. Ask your host which version you are on now and which you were on before, then have the plugin versions checked on a staging copy.
Does this sound like your situation?
- Card payments fail or the checkout shows a critical error since the host changed PHP.
- The payment option disappeared from the checkout.
- Orders arrive but stay on Pending payment even though customers were charged.
- The site shows a white page or a message about a critical error.
- The host sent a notice saying the PHP version was changed or would be.
Why does this happen?
The payment plugin was written for an older PHP
WooCommerce works with PHP 7.4 and above, and says that version reached end of life, and recommends PHP 8.3 or greater. A payment plugin that has not been updated can use code that newer PHP versions warn about or no longer run.
Confirmed by woocommerce.comTechnical detail: PHP warns that null is passed to a built-in function
Removed or changed PHP functions
Between versions PHP removes old functions and syntax. A plugin or custom snippet that still uses one of them throws a fatal error the moment the checkout or the gateway call runs.
Technical detail: PHP: array and string offset access with curly braces is deprecated
The server side of the connection changed too
A PHP version change can come with different PHP extensions or certificate settings. If a required extension such as cURL is not enabled on the new version, the store cannot talk to the payment provider.
Technical detail: PHP says curl_init() does not exist because an extension is missing
Two plugins now disagree
An update that fixes one plugin can expose a conflict with another. WooCommerce says the way to find it is to test conflicts, ideally on a staging clone so live sales are not affected.
Confirmed by woocommerce.com
The gateway's messages no longer reach the store
Payments may succeed while the notification back to WooCommerce fails. WooCommerce notes that missing order notes often suggest the gateway failed to communicate with the store.
Confirmed by woocommerce.com
What can I do about it today?
- Ask your host two questionsWhich PHP version is the site on now, and which was it on before the change? Keep the answers; they decide the next step.
- Ask whether the old version can be switched backMany hosts let you change PHP version in the control panel. A switch back is a temporary measure, not a fix, and the host knows whether it is safe for your account.
- Check payments against ordersCompare your payment provider's dashboard with WooCommerce orders. Write down every payment that has no order. Do not refund or re-charge them yet.
- Do not update plugins at randomUpdating the payment plugin blindly on the live store can change more than one thing at once. Back up first, as WooCommerce advises before any update.
- Note the exact error textIf the screen shows a critical error or a message, copy it exactly. It usually names the plugin file that failed.
When should I bring someone in?
- Payments are failing right now and the checkout is losing orders.
- The payment plugin is old, abandoned or has no update for the new PHP version.
- The host will not roll back and nobody can tell which plugin is at fault.
How do I handle it?
- Back up, then clone the storeI make a restore point and a staging copy that runs the same PHP version as the live store.
- Read the error logThe server log names the file and line that broke, which is faster and more exact than switching plugins on and off.
- Update or replace the failing partI move the payment plugin and its dependencies to versions that support the PHP version in use, or patch a custom snippet, and test a payment end to end.
- Check the gateway's callbackI confirm that the payment provider's notifications reach the store, so orders move out of Pending payment by themselves.
- Release with a way backThe fix goes live with a rollback ready, and I place test orders on the live store afterwards.
The price depends on what I find, so I quote in writing after a short discovery call. Tell me what is happening and I reply within 24 hours.
What do owners ask about this?
Should I stay on the old PHP version?
Only for a short time. WooCommerce notes that PHP 7.4 reached end of life and recommends PHP 8.3 or greater, so the lasting answer is to bring the plugins up to date.
Did customers lose money?
Possibly not. A payment can succeed at the provider while the order fails to update in the store. Compare the provider's dashboard with your orders before refunding anyone.
Can my host fix it?
A host can change the PHP version and read server logs. Fixing the plugin code or replacing a plugin is usually the site owner's side.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Found a mistake? Tell me.
For your developer: the technical fixes
Deprecated: Passing null to parameter #1 ($string) of type string is deprecatedPHP warns that null is passed to a built-in functionDeprecated: Array and string offset access syntax with curly braces is deprecatedPHP: array and string offset access with curly braces is deprecatedPHP Fatal error: Uncaught Error: Call to undefined function curl_init()PHP says curl_init() does not exist because an extension is missingcURL error 60: SSL certificate problem: unable to get local issuer certificatePHP cURL or Guzzle fails with SSL certificate error 60