Troubleshooting plugins when migrating

Continuing from +3 for ClassicPress:

Before migrating I’ve updated all the plugins to te latest version and checked which were stated as compatible with WP 4.9. Luckily the ones marked as WP 5+ where the ones that have a very good substitution in ClassicPress directory.

PHP Error Log Viewer from Code Potent and Updraft (for a step by step backup) were installed on every site. PHP Error Log Viewer is vey useful even with WSOD. When you resume from a WSOD deactivating all plugins it will show you what was the problem.

What didn’t so well

WooCommerce PDF Invoices Italian Add-on

Woocommerce-dependent plugin have many ways for checking if Woo is active. One is for checking if the plugin is active. Another is to check if the function WC() is there.
Using the first options make the plugin think that Woo is there if CC Compatibility for Woo Addons is active but Classic Commerce is not, so calling WC() will lead to a WSOD. And this is what happened with WooCommerce PDF Invoices Italian Add-on.

To deactivate a plugin during a WSOD the easiest way I’ve found is to rename it’s folder from breaking-plugin to breaking-pluginXXX. I’ve always a SSH console opened when doing such things, but FTP could be used too.

The log showed up Uncaught Error: Call to undefined function WC() in .../plugins/woocommerce-pdf-invoices-italian-add-on so I’ve understood what was breaking things.

It was my fault!

YITH WooCommerce Wishlist

Switched to ClassicPress with plugin latest version and… WSOD!
Call to undefined method WP_Screen::is_block_editor() is clear enough to understand that while declaring WP 4.9 compatibility it is not.
Luckily the Changelog was complete, so I decides to use WP Rollback, and revert to the previous major release (2.2.17) because no security fixes were added.
Some warning from PHP 7.4.
Decided to scan the plugin with
phpcs -p . --standard=PHPCompatibility --runtime-set testVersion 7.4.
Very few thing to fix, so I fixed them and changed the version to 999.2.2.17 (It could be just 999 but in this way you have a reference to the real version used).

What went well

Everything else :slight_smile:
WC addons confirmed to work:

  • Advanced Woo Search v. 2.13
  • woocommerce pdf invoices italian add-on v.
  • Catalog for Woocommerce v. 1.2.0
  • WooCommerce Product Filter v. 6.2.3

Thanks for this @Simone. Very useful.

Regarding the compat plugin, I wonder if we need to prevent it from activating if CC isn’t activated?


It’s really cool that you put this together, @Simone!

Absolutely agree – that is (an example of) what it means to “fail gracefully”. I know that’s a WP mantra, but, one worth keeping for our ecosystem. :+1:


It would be nice! Mine was a silly error and was resolved in a minute, but if anyone without console and error log access does the same mistake it could take a lot of time to get it working.