How could i hide "Media" menu for store vendor at capability option?

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!

Multi Vendor Marketplace Plugin | WCFM Marketplace Forums WCFM – Marketplace (WooCommerce Multivendor Marketplace) How could i hide "Media" menu for store vendor at capability option?

  • This topic has 2 replies, 2 voices, and was last updated 6 years ago by MOHO.
Viewing 2 reply threads
  • Author
    Posts
    • #36277
      MOHO
      Participant

      I want to hide “Media” page for store vendor, shop manager, shop staff.

      How could i disable option at capability?

      thanks.

      Attachments:
      You must be logged in to view attached files.
    • #36333
      WCFM Forum
      Member

      Hi,

      Kindly add this code for the purpose –

      add_filter( 'wcfm_is_allow_media', function( $is_allow ) {
        if( !current_user_can( 'administrator' ) ) $is_allow = false;
      	return $is_allow;
      });

      Thank you

    • #36401
      MOHO
      Participant

      Thanks it work now.

      Please close it.

Viewing 2 reply threads
  • The topic ‘How could i hide "Media" menu for store vendor at capability option?’ is closed to new replies.