get('settings.data.general'); assert($general_settings instanceof GeneralSettings); if ($general_settings->reset_installation_path('plugin_uninstall')) { $general_settings->save(); } /** * Allows a full reset of the plugin data. * * By default, this is false, preserving plugin settings in the DB during uninstallation. * This filter has no toggle in the UI yet and can only be set using custom code. */ $should_reset_db = apply_filters('woocommerce_paypal_payments_uninstall_full_reset', \false); if ($should_reset_db) { $clear_db = $app_container->get('uninstall.clear-db'); assert($clear_db instanceof ClearDatabase); $clear_db->clean_up(); } })($root_dir);