Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot delete plugin after being activated without installing & activating WooCommerce. #2417

Closed
melek opened this issue Apr 26, 2021 · 0 comments · Fixed by #2418
Closed
Assignees

Comments

@melek
Copy link

melek commented Apr 26, 2021

Describe the bug
I cannot delete the WooCommerce Shipping & Tax plugin while WooCommerce is not activated. The problem initially seemed to be related to Jetpack and WooCommerce Shipping and Tax having been active at the same time, but occurs even when only Shipping and Tax is installed and activated.

This bug was highlighted by @jacoblf on the WordPress.org public support forum:
https://wordpress.org/support/topic/cant-even-remove-this-piece-of-x/#post-14363262

To Reproduce
Steps to reproduce the behavior (on a fresh WordPress installation):

  1. In the Plugins area, install and activate WooCommerce Shipping & Tax. No need to set it up.
  2. Deactivate WooCommerce Shipping & Tax.
  3. Click 'Delete'.
  4. See error, 'Deleting...' text appears stuck and an error is shown. With Debugging enabled, the full error is as follows:
Deletion failed: WordPress database error: [Table `local.wp_woocommerce_shipping_zone_methods` doesn't exist]
SELECT * FROM wp_woocommerce_shipping_zone_methods 
( ! ) Fatal error: Uncaught Error: Class 'WC_Data_Store' not found in ...\wp-content\plugins\woocommerce-services\woocommerce-services.php on line 229 
( ! ) Error: Class 'WC_Data_Store' not found in ...\wp-content\plugins\woocommerce-services\woocommerce-services.php on line 229 Call Stack 
#TimeMemoryFunctionLocation 
10.0002421280{main}( )...\admin-ajax.php:0 
20.08053387360do_action( )...\admin-ajax.php:187 
30.08053387736WP_Hook->do_action( )...\plugin.php:484 
40.08053387736WP_Hook->apply_filters( )...\class-wp-hook.php:316 
50.08063388864wp_ajax_delete_plugin( )...\class-wp-hook.php:292 
60.08393412304delete_plugins( )...\ajax-actions.php:4581 
70.08643414456uninstall_plugin( )...\plugin.php:967 
80.10463488480do_action( )...\plugin.php:1286 
90.10463488856WP_Hook->do_action( )...\plugin.php:484 
100.10463488856WP_Hook->apply\_filters( )...\class-wp-hook.php:316 
110.10463489984WC_Connect_Loader::plugin_uninstall( )...\class-wp-hook.php:292 
120.11273516592WC_Connect_Loader::delete_notices( )...\woocommerce-services.php:210 
130.11273516592WC_Connect_Loader::can_add\_wc\_admin_notice( )...\woocommerce-services.php:217 
There has been a critical error on this website. Learn more about troubleshooting WordPress.

To Workaround

  1. Install & activate WooCommerce.
  2. Delete WooCommerce Shipping & Tax.
  3. See successful deletion.

Expected behavior
It should delete as normal.

Screenshots
Screenshot
If you do not see the image, please click here.

Additional context

  • I reproduced on both Local and a shared hosting account.
  • From the error it looks like an uninstall hook set up by WooCommerce Shipping & Tax depends on WooCommerce tables and classes to complete.
@frosso frosso self-assigned this May 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants