Title: problem by remove action
Last modified: February 10, 2020

---

# problem by remove action

 *  Resolved [Hassan Hossinie](https://wordpress.org/support/users/onlinerir/)
 * (@onlinerir)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/problem-by-remove-action/)
 * Hi, In the previous versions, I would disable the actions here:
 * `remove_action('dokan_dashboard_right_widgets', array(Dokan_Template_Dashboard::
   init(), 'get_sales_report_chart_widget'), 10 );`
 * But in version 3.0 this code is error
    Because of changes in the core
 * > Fatal error
   >  : Uncaught Error: Call to undefined method Dokan_Template_Dashboard::
   > init() in F:\xampp\htdocs\newkala44\wp-content\plugins\dokan-plus-plus\classes\
   > class-dashboard.php:57 Stack trace: #0 F:\xampp\htdocs\newkala44\wp-includes\
   > class-wp-hook.php(288): SHH_DOKAN_PLUS_PLUS_Dashboard->remove_widgets_dashboard(”)#
   > 1 F:\xampp\htdocs\newkala44\wp-includes\class-wp-hook.php(312): WP_Hook->apply_filters(”,
   > Array) #2 F:\xampp\htdocs\newkala44\wp-includes\plugin.php(478): WP_Hook->do_action(
   > Array) #3 F:\xampp\htdocs\newkala44\wp-content\plugins\dokan-lite\templates\
   > dashboard\dashboard.php(24): do_action(‘dokan_dashboard…’) #4 F:\xampp\htdocs\
   > newkala44\wp-content\plugins\dokan-lite\includes\functions.php(893): include(‘
   > F:\\xampp\\htdocs…’) #5 F:\xampp\htdocs\newkala44\wp-content\plugins\dokan-
   > lite\includes\Shortcodes\Dashboard.php(84): dokan_get_template_part(‘dashboard/
   > dashb…’) #6 F:\xampp\htdocs\newkala44\wp-includes\shortcodes.php(325): WeDevs\
   > Dokan\Shortcodes\Dashboard->render_shortcode(”, ”, ‘dokan-dashboard’)

Viewing 10 replies - 1 through 10 (of 10 total)

 *  [roshni07](https://wordpress.org/support/users/roshni07/)
 * (@roshni07)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/problem-by-remove-action/#post-12420005)
 * Hello [@onlinerir](https://wordpress.org/support/users/onlinerir/),
 * I am really sorry for the trouble you are having. Dokan version 3.0.0 is released
   with a refactored coding structure, this new version will make your experience
   with Dokan smoother than before. Unfortunately, we have deprecated some class
   on the code. So any changes using the class may affect the site.
 * You can use simple CSS to hide options to get the issue resolved. If there is
   any modification on the child theme using class, we suggest you revert the change
   and check. The plugin should work fine. Please rever the changes and let us know
   if the issue remains with the default code of the plugin.
 * Best Regards.
 *  [uili](https://wordpress.org/support/users/uili/)
 * (@uili)
 * [6 years, 1 month ago](https://wordpress.org/support/topic/problem-by-remove-action/#post-12647765)
 * I get the same problem, and would like to use remove_action, how can we do this
   for that same example:
    `remove_action('dokan_dashboard_right_widgets', array(
   Dokan_Template_Dashboard::init(), 'get_sales_report_chart_widget'), 10 );`
 *  [saeedf436](https://wordpress.org/support/users/saeedf436/)
 * (@saeedf436)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/problem-by-remove-action/#post-13040475)
 * I get the same problem, and would like to use remove_action, how can we do this
   for that same example:
    `remove_action('dokan_dashboard_left_widgets', array(
   Dokan_Template_Dashboard::init(), 'get_big_counter_widgets'), 10 );` how can 
   we do this .
 * **ANSWER FAST PLS.**
 *  [Rashed Ripon (a11n)](https://wordpress.org/support/users/rur165/)
 * (@rur165)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/problem-by-remove-action/#post-13044460)
 * Hello [@saeedf436](https://wordpress.org/support/users/saeedf436/) ,
 * Due to the changes in our core files, the way of accessing the class and objects
   has also changed. You can use this piece of code to remove that widget –
 *     ```
       add_action('init', function() {
           remove_action( 'dokan_dashboard_left_widgets', array( dokan()->dashboard->templates->dashboard, 'get_big_counter_widgets'));
       });
       ```
   
 * Thank you.
 *  [rigal-patel](https://wordpress.org/support/users/rigal-patel/)
 * (@rigal-patel)
 * [5 years, 9 months ago](https://wordpress.org/support/topic/problem-by-remove-action/#post-13348512)
 * Hello [@rur165](https://wordpress.org/support/users/rur165/),
 * There is still an issue in removing action hooks. I am trying to remove settings
   action hooks but it’s not working
 *     ```
       add_action('init', 'remove_my_action');
       function remove_my_action()
       {
          remove_action('dokan_settings_content_area_header', array(dokan()->dashboard->templates->settings, 'render_settings_help'), 99);
          remove_action('dokan_settings_content_area_header', array(dokan()->dashboard->templates->settings, 'render_settings_load_progressbar'), 99);
       }
       ```
   
 * Would you please check it?
 * Thanks
    -  This reply was modified 5 years, 9 months ago by [rigal-patel](https://wordpress.org/support/users/rigal-patel/).
    -  This reply was modified 5 years, 9 months ago by [rigal-patel](https://wordpress.org/support/users/rigal-patel/).
 *  [Rashed Ripon (a11n)](https://wordpress.org/support/users/rur165/)
 * (@rur165)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/problem-by-remove-action/#post-13374312)
 * Hello [@rigal-patel](https://wordpress.org/support/users/rigal-patel/) ,
 * Our developers suggest that you have to use the hooks like this from now:
 *     ```
       /**
        * Remove some hooks from Dokan dashboard settings page
        */
       function dokan_remove_settins_content_header_some_methods() {
           dokan_remove_hook_for_anonymous_class( 'dokan_settings_content_area_header', \WeDevs\Dokan\Dashboard\Templates\Settings::class, 'render_settings_help', 15 ); 
           dokan_remove_hook_for_anonymous_class( 'dokan_settings_content_area_header', \WeDevs\Dokan\Dashboard\Templates\Settings::class, 'render_settings_load_progressbar', 20 ); 
       }
       add_action( 'init', 'dokan_remove_settins_content_header_some_methods', 99 );
       ```
   
 * Thank you.
 *  Thread Starter [Hassan Hossinie](https://wordpress.org/support/users/onlinerir/)
 * (@onlinerir)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/problem-by-remove-action/#post-13386807)
 * Thank you very much everyone
 *  [Caridor](https://wordpress.org/support/users/shaar7/)
 * (@shaar7)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/problem-by-remove-action/#post-13389319)
 * Hi [@onlinerir](https://wordpress.org/support/users/onlinerir/)
 * Sorry for interrupting. I just saw ur topic, Kindly I have a small query: Remove
   action u are using it for what exactly? to remove the widget?
 *  [rigal-patel](https://wordpress.org/support/users/rigal-patel/)
 * (@rigal-patel)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/problem-by-remove-action/#post-13516320)
 * Hello [@rur165](https://wordpress.org/support/users/rur165/) ,
 * Still, It’s not working. I added remove action in child theme function.php but
   getting a fatal error.
 *     ```
       /**
        * Remove store setting hooks
        */
   
       function dokan_remove_settins_content_header_some_methods() {
         dokan_remove_hook_for_anonymous_class( 'dokan_settings_form_bottom', \WeDevs\DokanPro\Modules\StoreSupport::Module, 'add_support_btn_title_input', 13 ); 
       }
       add_action( 'init', 'dokan_remove_settins_content_header_some_methods', 99 );
       ```
   
 * Error:
 * Uncaught Error: Class ‘WeDevs\DokanPro\Modules\StoreSupport’ not found in /var/
   www/html/thecloset/wp-content/themes/yozi-child/functions.php
 * Would you please check it and let me know how to fix this issue?
 *  [Rashed Ripon (a11n)](https://wordpress.org/support/users/rur165/)
 * (@rur165)
 * [5 years, 7 months ago](https://wordpress.org/support/topic/problem-by-remove-action/#post-13518287)
 * Hello [@rigal-patel](https://wordpress.org/support/users/rigal-patel/) ,
 * This hook is from Dokan Pro. Please contact through the support channel for any
   queries related to Dokan Pro. We will try our best to suggest a solution according
   to our support policy.
 * WordPress.org forum rules do not allow us to make discussion on paid features.
   I hope this is understandable.
 * Thank you 🙂

Viewing 10 replies - 1 through 10 (of 10 total)

The topic ‘problem by remove action’ is closed to new replies.

 * ![](https://ps.w.org/dokan-lite/assets/icon-256x256.gif?rev=3239229)
 * [Dokan: AI Powered WooCommerce Multivendor Marketplace Solution – Build Your Own Amazon, eBay, Etsy](https://wordpress.org/plugins/dokan-lite/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/dokan-lite/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/dokan-lite/)
 * [Active Topics](https://wordpress.org/support/plugin/dokan-lite/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/dokan-lite/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/dokan-lite/reviews/)

## Tags

 * [dokan](https://wordpress.org/support/topic-tag/dokan/)
 * [remove_action](https://wordpress.org/support/topic-tag/remove_action/)

 * 10 replies
 * 7 participants
 * Last reply from: [Rashed Ripon (a11n)](https://wordpress.org/support/users/rur165/)
 * Last activity: [5 years, 7 months ago](https://wordpress.org/support/topic/problem-by-remove-action/#post-13518287)
 * Status: resolved