HUSKY - WooCommerce Products Filter Professional

woof_disable_filter

Purpose: Disable WOOF plugin on specific pages or conditions.

This hook allows you to completely disable WOOF plugin functionality on certain pages, post types, or custom conditions. When this filter returns true, WOOF will not initialize on that page.

add_filter('woof_disable_filter', function($disable) {
    if (is_page(array(123, 456))) {
        return true; // Disable on pages 123 and 456
    }
    return $disable;
});

Disable on checkout and cart:

add_filter('woof_disable_filter', function($disable) {
    if (current_user_can('administrator')) {
        return true; // Disable for admins
    }
    return $disable;
});

Disable on custom post types:

add_filter('woof_disable_filter', function($disable) {
    if (is_singular('custom_post_type')) {
        return true;
    }
    return $disable;
});

 


Troubles? Ask for Support!