MainWP Community

Disable the WooCommerce Admin in version 4.0

Disable the WooCommerce Admin in WooCommerce on child sites.

Snippet Type

Execute on Child Sites

Snippet

add_filter( 'woocommerce_admin_disabled', '__return_false' );
1 Like

@sebastian-moran can you give us an example on when or why you want to disable the WC admin?
PS: you have a typo on the title of the post, May want to fix it for the search functionality :wink:

If you were using an external solution for order reporting and did not want to have the WooCommerce Admin for analytics display.

Glew and Metorik be two examples that do not cause performance issues running reporting on order data.

WooCommerce Admin is a featured plugin and is on track to be merged into WooCommerce core for the upcoming 4.0 release.


WooCommerce Admin plugin has a long track record of causing CPU spikes on sites some of those issues have been fixed in releases of the plugin.

1 Like

More info about the upcoming WooCommerce 4.0 release next month.

1 Like

Thanks @sebastian-moran - I can see where sometime WC took up a lot of CPU but, never really notice it as a big issue but, honestly, we are not running big ecommerce websites. The biggest has less than 100 products. Again, thank you for the details explanation on WC (see your other post!). I learned a lot today.

The CPU spikes where related to the Action Scheduler creating the data to be stored in the custom database tables that the WooCommerce Admin uses. Then that process would cause the MySQL CPU spike and max out the sites server. Just look through the reviews on the WP.org repo.
db tables created

wp_wc_admin_note_actions
wp_wc_admin_notes
wp_wc_category_lookup
wp_wc_customer_lookup
wp_wc_download_log
wp_wc_order_coupon_lookup
wp_wc_order_product_lookup
wp_wc_order_stats
wp_wc_order_tax_lookup

https://wordpress.org/support/plugin/woocommerce-admin/reviews/?filter=1

2 Likes