a8cteam51 / safety-net

Scrub options, deactivate denylisted plugins, and delete user data on development sites.
17 stars 1 forks source link

PHP Fatal error when activating on a site with WooCommerce #120

Closed verytwisty closed 5 months ago

verytwisty commented 5 months ago

When Activating Safety Net on a site with WooCommerce installed and activated, there is a fatal error when activating the safety net plugin.

Uncaught Error: Call to undefined function SafetyNet\ScrubOptions\wc_get_webhooks() in wp-content/plugins/safety-net/includes/scrub-options.php:79

Steps to reproduce:

  1. New WP install with 2024 theme
  2. Install and activate WooCommerce
  3. Install and activate Safety Net.

I am also seeing an error in the terminal after I do wp safety-net scrub-options in the terminal with WooCommerce installed but deactivated.

Error: There has been a critical error on this website.Learn more about troubleshooting WordPress. There has been a critical error on this website.

PHP Fatal error: Uncaught Error: Call to undefined function SafetyNet\DeactivatePlugins\scrub_options() in wp-content/plugins/safety-net/includes/classes/cli/class-safetynet-cli.php:35

WordPress 6.5.2 WooCommerce 8.7.0 Safety Net 1.4.16 Twenty Twenty-Four 1.1 php 8.1.23

NickGreen commented 5 months ago

Thanks for the report! These should be fixed here: https://github.com/a8cteam51/safety-net/pull/121

New release here: https://github.com/a8cteam51/safety-net/releases

verytwisty commented 4 months ago

@NickGreen thank you!