• Resolved manojrwlsr

    (@manojrwlsr)


    #post_name# is currently returning “Reply To: <Post Name>” in email subject and content where I am using this #post_name# variable. Is there a way so that I can customise #post_name# and remove “Reply To:” out of #post_name# ?

    The page I need help with: [log in to see the link]

Viewing 5 replies - 16 through 20 (of 20 total)
  • Thread Starter manojrwlsr

    (@manojrwlsr)

    No my custom code is perfect. I just needa hook to change #comentorname# from username to user firstname + lastname.

    Any chance we can apply hook to change the #comentorname# ?

    Plugin Author Bunty

    (@bhargavbhandari90)

    You can use the same hook I share previously. Check the hook in the code, you will understand.

    Thread Starter manojrwlsr

    (@manojrwlsr)

    function cmnt_modify_content_tokens( $tokens ) {

    $tokens[1] = str_replace( ‘Reply To: ‘, ”, $tokens[1] );

    return $tokens;

    }

    add_filter( ‘cmt_mtn_replace_email_sub_placeholders’, ‘cmnt_modify_content_tokens’ );

    You have shared above hook. In $tokens[1], I will probably get all the email content along with commentor name, but it will be hard to get what the commentor name is in the email content. Also I can’t print $tokens on frontend as it is used for sending emails.

    Thread Starter manojrwlsr

    (@manojrwlsr)

    if args in cmt_mtn_replace_email_sub_placeholders filter functions returns the current user id, I can achieve this somehow, but I am not sure what exactly it returns except email content.

    Thread Starter manojrwlsr

    (@manojrwlsr)

    Thank you Bunty,

    I think I got the context of tokens now.

    Just setting up $tokens[3] = $full_name; will solve this issue.

    Thank you so much for your help!

Viewing 5 replies - 16 through 20 (of 20 total)
  • You must be logged in to reply to this topic.