Maaz Zindani

Loading the index…

↑↓ move↵ openesc close4072 pages

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.

  • Written for business owners
  • Updated
  • By Maaz Zindani, Senior Software Engineer

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?

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

What can I do about it today?

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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?

  1. Back up, then clone the storeI make a restore point and a staging copy that runs the same PHP version as the live store.
  2. 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.
  3. 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.
  4. Check the gateway's callbackI confirm that the payment provider's notifications reach the store, so orders move out of Pending payment by themselves.
  5. 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

Next step

Want this off your desk?

Send me a few lines on where things stand. I reply within 24 hours.