You did not write where you put the filter removal code, but I suspect you tried to delete it before it was added. Another important point, you have not given the priority parameter in remove_filter()
.
Quote from the documentation:
remove_filter( $tag, $function_to_remove, $priority );
Important: To remove a hook, the $function_to_remove and $priority arguments must match when the hook was added. This goes for both filters and actions. No warning will be given on removal failure.
Try removing filter when the plugins are already loaded and enter both required parameters – function name and priority.
add_action( 'plugins_loaded', 'se334421_remove_plugin_filter' );
function se334421_remove_plugin_filter() {
remove_filter( 'woocommerce_cart_item_subtotal', 'WC_Subscriptions_Switcher::add_cart_item_switch_direction', 10 );
}
Related Posts:
- Passing a parameter to filter and action functions
- Get a list of all registered actions
- How can I edit post data before it is saved?
- WP Rest API: details of latest post including featured media url in one request?
- How do I exclude plugins from getting automatically updated?
- Where is the best place to use add_filter
- How to only hook on Single.php after content?
- How To Determine If A Filter Is Called In A Sidebar/Widget Context?
- Change Page’s Tag Using functions.php File
- What characters are allowed as a shortcode tag and how should they be sanitized?
- How to disable Gutenberg editor?
- Edit plugin without hooks in functions.php
- WordPress apply_filters() Arguments Missing
- plugin_action_links Filter Hook Deprecated?
- Filter Hook on plugin update
- Using add_filter inside another class
- How can I show drafts in wp_dropdown_pages list?
- How to list the Hooks and order of execution in current loading page? [duplicate]
- Removing user contact methods works from functions.php but not from a plugin
- Hide WordPress Plugin Deactivation Links
- Alter post slug by a filter that is fired just after a post is created
- Use external link in the add sub menu
- Pass A Value From Outside To A Plugin Variable
- Is there any multiple filter/criteria plugin for wordpress? [closed]
- Failed to invoke other hook from the init hook
- Does the ‘nav_menu_css_class’ filter accept 2 or 3 arguments?
- Very stubborn wp_register_script / add_action vs remove
- How to prepend to the_title for admin-side plugin’s use
- do_action and hook methods
- How can I filter blog name?
- Remove action from a plugin class, forced to use global instance
- why does the add_action(‘the_content’) overwrite my page
- ElasticPress how to Include Meta to the mapping?
- remove filter which calls a public static function
- How to filter content post only on save
- Filter or action hook to insert content on admin pages before tag
- There’s some way to add a wrapper around posted images?
- Custom preview_post_link not working for draft post
- plugin_action_links_{$plugin_file} hook not in the main plugin file
- Creating search filter through plugin
- Woocommerce Shipping module available only for type of products [closed]
- Add Fields with Sub-Fields to WP Job Manager
- Determine plugin name from within plugin_action_links filter
- merging an array to an existing array using add_filter
- Edit plugin filter
- Add Filter to get_next_posts_link
- Passing a parameter to filter and action functions
- trying to create simple plugin to filter categories from all authors
- Jetpack Comments Change Placeholder Text
- shortcode which is introduced into entry the blog, and appears in side bar
- How do i get all author posts on custom post type list
- How to filter a a variable in a plugin’s function?
- Retrive images from the_content()
- passing ‘&’ in return function of add_filter
- Filter the HTML content of plugin
- apply_filters to content but ignore shortcodes
- Use of apply_filter in plugin/widget class
- change output location of plugin function using a custom hook
- getpost content with all formatting for admin pages
- Filter for modifying image on upload
- making a glossary with wordpress
- Adding a Filter to Sidbar Login Plugin to Change Login Button Lable
- Strip shortcode from excerpt [duplicate]
- Which filters or actions involve with index page for plugin?
- How to add different CSS for galleries
- County Finder form/plugin?
- Simply Exclude – Category feed exclusion is excluding from category feed instead of just the main feed
- Add a filter to a different custom plugin
- How to change response of admin-ajax request?
- add query string to all pages after user logged in
- How to add a filter conditionally based on page related Conditional Tags
- WP Members additional fields on user profile [closed]
- WordPress plugin add_filter returning a link does not work. What is the correct way?
- Order shipped by which driver[hook for woocoomerce order staus changed and popup in admin panel ] [closed]
- Which action/filter can i use for a Member Plugin [closed]
- Unable to pass arguments from plugin form to filter hook using ajax, the data is transferring via ajax but unable to pass as arguments in filter hooks
- How to Add Extra Text In WordPress Title Before Post Publish
- How often should I execute add_filter and function declaration in Code Snippets?
- How to add product thumbnail on orders list on backend?
- Custom priority with the_content filter based on user input
- filter just a portion of plugin function
- WordPress REST API filter on blank custom ACF
- Selectively override Easy Digital Downloads protection via filter
- Brands Filter Not Working For On Sale Products
- Deactivated a plugin with a filter, but it still enqueues JS files
- FacetWP custom display based on post type [closed]
- Change social icon in twenty twenty three theme
- Removing filters with arguments set in a class
- is_singular() in mu-plugins not working
- Remove wpseo filter from polylang plugin
- WooCommerce Attribute Mapping
- How can we extent core/group or cover block?
- Hide attributes based on previous selection
- Customize WP Filter Hook
- wp_head filter not executed inside custom class
- What is the best way to ignore wordpress administration using add_filter($title) also when Ajax request
- remove filter added by plugin with anonymous function
- How to display title, description etc in block images?
- Possible to overwrite load_template function in plugin using functions.php
- How to customize WP_Error (REST JWT authentication plugin) [closed]