• Resolved nimas

    (@nimas-1)


    Hi, there is a metabox that is shown in the Gutenberg Block Editor that is named: “Permissions”. It states:
    “To protect this block by paid membership or centrally with a content protection rule, upgrade to MemberPress” Then has a button “Upgrade to Memberpress”
    How can we have this metabox removed? The reason I need to have it removed is because the site is a LearnDash LMS and the user dashboard shows this (not just the admin). We obviously don’t need this to show to our users.
    Appreciate the help!
    Nima

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Caseproof

    (@caseproof)

    Hi @nimas-1

    I’m afraid we don’t provide any filter hook for this section at the moment so the only way to remove it would be to directly modify /addons/members-block-permissions/src/Editor.php file where this section is populated.

    To the OP, ran into a similar situation.
    This is what I used, while I try to figure out why other solutions didnt’work.
    Add the following to your functions.php file or your snippets plugin:

    ?>
    <style>
    #mepr_unauthorized_message.postbox {display:none !important;}
    </style>
    <?php

    The snippet contained in this link was suggested but it didn’t work for me:
    https://gist.github.com/DumahX/b199158ba53037a60e1c62f92e2fa01f

    Actually that trick had some serious side-effects. This is what Memberpress kindly gave me instead:

    function admin_move_meta_box() {
      foreach ( get_post_types() as $post_type ) {
        remove_meta_box( 'mepr_unauthorized_message', $post_type, 'normal' );
        remove_meta_box( 'mepr_unauthorized_message', $post_type, 'side' );
        remove_meta_box( 'mepr_unauthorized_message', $post_type, 'advanced' );
      }
    }
    
    add_action( 'admin_head', 'admin_move_meta_box' );
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to remove metabox of permissions in Gutenberg Editor?’ is closed to new replies.