WordPress filter hook
woocommerce_admin_disabled
Defined by WooCommerce and fired by 9 plugins in total, running on 8.8M+ sites between them.
“Filter whether to disable admin tracking.”
How to use woocommerce_admin_disabled
It's a filter: your callback receives the value, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'woocommerce_admin_disabled', function( $value ) {
// Change $value here.
return $value;
}, 10, 1 );Argument names come from WooCommerce's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
9 plugins that fire woocommerce_admin_disabled
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
WooCommerce7+ million installs
apply_filters( 'woocommerce_admin_disabled', false )includes/class-wc-tracker.php:361 -
Google for WooCommerce800,000+ installs
apply_filters( 'woocommerce_admin_disabled', false )src/Internal/Requirements/WCAdminValidator.php:38 -
WooPayments: Integrated WooCommerce Payments800,000+ installs
apply_filters( 'woocommerce_admin_disabled', false )includes/class-wc-payments-dependency-service.php:144 -
Pinterest for WooCommerce200,000+ installs
apply_filters( 'woocommerce_admin_disabled', false )class-pinterest-for-woocommerce.php:515 -
BrikPanel: WooCommerce Dashboard & Analytics, Abandoned Cart Recovery, Order Export, Inventory Management & Bulk Editor1,000+ installs
apply_filters( 'woocommerce_admin_disabled', false )includes/brikpanel-wc-compat.php:448 -
CoCart900+ installs
apply_filters( 'woocommerce_admin_disabled', false )includes/classes/class-cocart-helpers.php:1024 -
Sync orders with Xero from WooCommerce100+ installs
apply_filters( 'woocommerce_admin_disabled', false )inc/classes/class-wp-xelation-dependency-service.php:170 -
Hakeemify DebloaterFewer than 10 installs
apply_filters( 'woocommerce_admin_disabled', false )src/Scan/Scanners/WooCommerceScanner.php:333 -
ReSpek NatureFewer than 10 installs
apply_filters( 'woocommerce_admin_disabled', false )respek_nature.php:235
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.