Support » Plugin: BP Better Messages » Attachment only for premium

  • Is there a hook for how to enable sending attachments in messages only for Premium users? I am using buddypress.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author wordplus

    (@wordplus)

    Yes!

    add_filter('bp_better_messages_user_can_upload_files', function( $can_upload, $user_id, $thread_id ){
     
    return $can_upload;
    }, 10, 3);
    Thread Starter veshop

    (@veshop)

    Thanks a lot so far 🙂 I am a layperson, so: can I just insert this into the child theme? Is this compatible with any membership plugin or do I have to adapt?

    Plugin Author wordplus

    (@wordplus)

    You can insert this to child theme, but this code is not complete.

    You need to add your logic still based on membership plugin functions you are using and return false when you want to disable files for the user.

    Thread Starter veshop

    (@veshop)

    oK, so I cannot do it by myself :-/ But Thanks anyway.

Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.