Hide from Store Manager dashboard

We're shifting our Forum based support to a more dedicated support system!

We'll be closing our Forum support from 10th June, 2020 and move to Email Support assistance.

  • If you are a WCFM premium add-ons user, contact us- here
  • Want to know more before buying our add-ons? Send Pre sale queries- here
  • If you are a WCFM free user, please open a support ticket at WordPress.org
  • For WCFM App related queries, reach us- here
From now the forum will be read-only!

Viewing 5 reply threads
  • Author
    Posts
    • #122519
      contact8732
      Participant

      Hi, please could you give me code snippet to not display the follow panels on Store Manager dashboard? “Notifications” and “Inquiries” and “Sales by Product”. It is something like this: add_filter( ‘wcfm_is_allow_dashboard_latest_topics’, ‘__return_false’ ); Thanks

    • #122540
      Sushobhan
      Keymaster

      Hello,
      Kindly provide a snapshot marking the section/fields that you want to hide/disable.
      Thanks!

    • #122629
      contact8732
      Participant

      Thank you

      Attachments:
      You must be logged in to view attached files.
    • #122799
      Sushobhan
      Keymaster

      Hello,
      Please use the following snippet-

      add_action( 'begin_wcfm_dashboard', function() {
          global $WCFM;
          if ( wcfm_is_vendor() ) {
              remove_action( 'after_wcfm_dashboard_product_stats', array( $WCFM->wcfm_notification, 'wcfm_dashboard_notification_list' ) );
              remove_action( 'after_wcfm_dashboard_zone_analytics', array( $WCFM->wcfm_enquiry, 'wcfm_dashboard_enquiry_list' ) );
          }
      } );
      add_action( 'after_wcfm_dashboard_left_col', function () {
          if ( wcfm_is_vendor() ) {
              add_filter( 'wcfm_is_allow_reports', 'disallow_vendor_report_viewing' );
          }
      } );
      
      add_action( 'after_wcfm_dashboard_zone_analytics', function() {
          if ( wcfm_is_vendor() ) {
              remove_filter( 'wcfm_is_allow_reports', 'disallow_vendor_report_viewing' );
          }
      } );
      
      function disallow_vendor_report_viewing($is_allowed) {
          return false;
      }

      Add this code to your child theme’s functions.php
      In case you do not have child theme then add code using this plugin – https://wordpress.org/plugins/code-snippets/
      Let me know how this goes.
      Thanks!

    • #122852
      contact8732
      Participant
      This reply has been marked as private.
      • #122862
        Sushobhan
        Keymaster
        This reply has been marked as private.
    • #122870
      contact8732
      Participant
      This reply has been marked as private.
Viewing 5 reply threads
  • You must be logged in to reply to this topic.