• I have dating site and i have to disable possibility to sent message for whom who don’t have memberships plan, allow them only read. I already done this by adding the function to he submit button in ‘layotu-new.php & layout-thread.php’ files. But i know this is dirty way, and i wonder if this is the way to do this without loosing my changes, after every update.
    Thank you.

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

    (@wordplus)

    Hi there!

    Specially for you I will release new hooks soon!

    Blocking user to send message (reply)

    add_action('bp_better_messages_before_message_send', function(&$args, &$errors){
       $user_has_plan = false;
       if(!$user_has_plan){
          $errors[] = 'You cant send message';
       }
    }, 10, 2);

    Blocking to start new thread:

    add_action('bp_better_messages_before_new_thread', function(&$args, &$errors){
       $user_has_plan = false;
       if(!$user_has_plan){
          $errors[] = 'You cant send message';
       }
    }, 10, 2);
    • This reply was modified 7 years, 9 months ago by wordplus.
    Thread Starter Karol Szczesny

    (@karolsz)

    Thank You very much ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hook before sent mesage’ is closed to new replies.