$this refers to the class “WeDevs_Dokan” most likely.
Replace:
remove_action( 'dokan_new_product_after_product_tags', array( $this, 'add_product_brand_field' ) );
With:
remove_action( 'dokan_new_product_after_product_tags', array( 'WeDevs_Dokan', 'add_product_brand_field' ) );
And see if that works. Sometimes classes are namespaced, so check the file to see if that’s the case and include that before the WeDev_Dokan string.
Related Posts:
- Changing the “Plugin Activated” Message Default
- Hooking in to plugins
- Generate dormant hook references
- Better to fire specific hooks or generic hooks with parameters?
- How to only hook on Single.php after content?
- How to save the values of checkbox to the register setting?
- Can we hook a static method of a class to add_action inside that class?
- What is the ‘admin_action_’ . $_REQUEST[‘action’] hook used for?
- Filter out results from REST API
- How can I remove a hooked action created by a plugin?
- Enqueue style inside shortcode but its loaded at the bottom of page (before footer scripts)
- Good tools for locating hooks in a wordpress page/admin interface/blog post?
- disable active plugins for specific theme
- Twillio How To Send SMS for Custom Post Type
- Hide WordPress Plugin Deactivation Links
- Find out if request is for custom post type archive before query runs
- Pass A Value From Outside To A Plugin Variable
- Does the ‘nav_menu_css_class’ filter accept 2 or 3 arguments?
- do_action and hook methods
- the_posts hook, which set of posts?
- Is it possible to add an action to the currently running action?
- OOP: Display warning and deactivate the plugin if PHP version is less than 5.4
- Over write plugin templates
- Determine plugin name from within plugin_action_links filter
- How to prevent action in ajax request, when in admin side?
- Easy Digital Downloads (EDD) – Purchase Receipt emails couldn’t be logged
- Placement of Code in Plugin for hooking `save_post`
- Can I use a method from an existing plugin as an action hook?
- Reposition Woocommerce Message
- How to initialize something in unit test before the init hook being called?
- Prevent a plugin from being automatically activated
- How get a value from a plugin into another plugin through action/filter
- Any hook for pre-plugin-update -either bulk or single plugin update
- Add custom message to the plugins page of WordPress
- How do I display only the latest post on my home page, while maintaining proper plugin hooks?
- Modifying the comments section through a plugin regardless of theme
- wp_get_post_terms is difference obj model than the one in rest api response
- Get Time Taken By Each Action Hook in WordPress
- Are functions in main plugin file called before function bound to register_activation_hook runs?
- Best place for short bio,image and button [closed]
- password_reset hook is not working
- The Hook registration_errors was not called
- Why do plugins often ask to add in to templates?
- remove_action not removing add_action from constructor
- How to get menu location in wp_update_nav_menu hook
- Flipping Book PHP Code? Any experience?
- Turning on output buffering in a wordpress plugin
- Display Plugin Panels Outside of Admin Areas
- How to use template_include hook with form submission?
- Save user total active time after login in wordpress [closed]
- Advanced WordPress plugin activation detection
- wp_loaded with static Singleton
- wp_trash_post hook – problem with page updating if using wp_die
- How to return the values from a row where a value occurs for the first time among the rows available?
- is it possible to hook every page style?
- Add action to custom Function
- How to hook into action/filter call
- How to automatically activate users after registration without activation email?
- Hooks to run after a core upgrade?
- Plugin Hook When New Author Added
- Adding custom Field To The Posts Listing
- Add hook after content without formatting
- Using Remove Action Hook in Plugin
- Fail on admin_enqueue_scripts when I try it to upload a CSS file to my WordPress Plugin
- admin_post hook not firing function inside class
- update_option_{$option} not working (do function after options are saved)
- Alternative Hook to the_content for Changing Background Color
- Unpublished Pages Failing To Appear On Custom Path
- add a hook of Woocommerce to a plugin but it only shows and doesn’t function properly
- ACF Fields are not showing up on Homepage
- Hooking into the HTML header container
- Hide WordPress Site URL from Source Code
- When/where would want to attach other classes to the base class in a WordPress plugin?
- Plugin function in child theme
- Edit plugin’s HTML output with Hooks
- Display Woocommerce attribute name above product title
- {status}_{post_type} does not run correctly?
- Identify if the_post hook is being called from the admin post list
- Why can’t I shove an instance of a class into a variable from a do_action hook?
- Add a filter to a method in the parent theme
- Creating Custom Hook for my plugin
- Passing a parameter to filter and action functions
- Run only on plug-in activation instead of wp_head
- WordPress hook source
- Manually return false for function_exists
- How to `remove_action` from plugin
- Plugin Hook: Get posts
- Transition Post status not working
- functions.php conditional output for a single plugin
- How to make plugin work in each template in wordpress
- OOP Plugin: Where should I place the action hooks in the class?
- add query string to all pages after user logged in
- Order shipped by which driver[hook for woocoomerce order staus changed and popup in admin panel ] [closed]
- Hook automatic_updates_complete to autoupdate plugin
- Can’t use updated variables in handle function
- Neither update_option nor delete_option fires in deactivation hook
- WordPress : how to create onglet and remove it when only one
- I have to select text from gutenberg editor. Purpose is to store and replace text
- Similar hook to ‘init’ for when plugin page loads
- Which approach for managing automatic updates would be more robust?