wordpress-sdk
wordpress-sdk copied to clipboard
Deactivating parent plugin of Addon crashes site
🐞 bug report
Behavior:
-
What is the issue? (*)
So I had a weird one today as I was testing our Pro version as an Addon:
Fatal error: Call to a member function is_migration() on a non-object in C:!WP\InstantWP_4.5\iwpserver\htdocs\wordpress\wp-content\plugins\radio-station-pro\freemius\includes\class-freemius.php on line 13449
which is: $this->get_parent_instance()->is_migration();
where get_parent_instance() = self::get_instance_by_id( $this->_plugin->parent_plugin_id );
So specifying a parent ID in an Addon Freemius instance, when you deactivate the parent plugin, the Freemius instance doesn't exist for it, so it is a non-object and causes a crash.
-
What is the expected behavior?Freemius should fail gracefully, not crash in this instance, which prevents admin access until the Addon is deactivated.
Versions: (*)
-
Freemius SDK Version:2.4.3 -
WordPress Version:5.9.2 -
PHP Version:7.4