• Resolved simonem

    (@simonem)


    Hi, i’m using your plugin for RSVP on events.
    I really need to add custom text on the bottom of the confirmation mail and would also like to edit the mail subject. I’m familiar with PHP, html and js.
    Which method would you recommend to reach my goal?

    I’m getting a good result by adding the following code on line 715 of wp-content/plugins/event-tickets/src/Tribe/RSVP.php, but I’d rather not modify your plugin directly.

    $content = $content."MY CUSTOM CONTENT"
    $subject = "MY CUSTOM SUBJECT";

    Thanks in advance,
    Simone.

    • This topic was modified 6 years, 4 months ago by simonem.
    • This topic was modified 6 years, 4 months ago by simonem.
    • This topic was modified 6 years, 4 months ago by simonem.
    • This topic was modified 6 years, 4 months ago by simonem.
    • This topic was modified 6 years, 4 months ago by simonem.
    • This topic was modified 6 years, 4 months ago by simonem.
Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter simonem

    (@simonem)

    UPDATE:
    I correctly edited the body of the mail following this guide for /wp-content/plugins/event-tickets/src/views/tickets/email.php.
    But using this method, I still have problems about changing subject of the mail. Where should I edit this?

    Thanks.

    Hey there !

    Thanks for reaching out — that’s a great question, I can help with that ??

    Give this a shot in your functions.php file →

    /**
    * Event Tickets - Change Ticket Email Subject
    */
    add_filter( 'tribe_rsvp_email_subject', 'tribe_change_rsvp_subject' );
    function tribe_change_rsvp_subject( $subject ) {
    
    	$subject = sprintf( __( 'New Your tickets from %s', 'event-tickets' ), get_bloginfo( 'name' ) );
    
    	return $subject;
    }

    Hope that helps!

    Thread Starter simonem

    (@simonem)

    Great, it works perfectly.
    I didn’t notice that filter in your plugin docs. Where could I find it?

    Thanks for your help!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom Email Content and Subject’ is closed to new replies.