• Resolved thegreen

    (@thegreen)


    When a blocked user go to a message sent from the blocking user and tried to reply, he will see a message at the bottom of the reply form that reads,

    You do not have permission to send reply to this message!

    I want to change it to

    This user does not want to receive messages!

    so I found these 2 files from the template

    form-reply.php
    reply_form.php

    then change the message from
    “You do not have permission to send reply to this message!”
    to
    “This user does not want to receive messages!”

    But for some reason, the message still remained
    “You do not have permission to send reply to this message!”
    on the reply form.

    Am I changing the wrong files? But I looked through all the template files and these 2 files seemed to be the right ones. Can anyone help me on this please.

    Also I’m using a child theme so if you can help me with the codes to add to the functions.php, I’d really appreciate.

    Thank you.

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

    (@shamim51)

    You can add following code in your child theme’s functions.php

    add_filter('gettext', function( $translated_text, $untranslated_text, $domain ){
        if( 'front-end-pm' == $domain && 'You do not have permission to send reply to this message!' == $untranslated_text ){
            $translated_text = 'This user does not want to receive messages!';
        }
    
        return $translated_text;
    }, 10, 3);
    
    Thread Starter thegreen

    (@thegreen)

    Thanks a lot. Have a nice day ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change the message shown on a blocked user’s reply form’ is closed to new replies.