Change Admin Notification of New Event Subject?

Home Forums Calendar Products Community Events Change Admin Notification of New Event Subject?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1018723
    Mad Dog
    Participant

    I’ve added a couple of fields to the email template but the client would like to change the Subject Line. A forum post from a year ago says it can’t be done. Is that still the case or has something changed so I can do that?

    Thanks,
    MD

    #1018881
    George
    Participant

    Hey @Mad Dog,

    Unfortunately it is a bit tricky to change subject lines – it’s not impossible though.

    While you cannot do it from within our template system, which is safe and persists across updates, you can customize subject lines if you really need to. Please note that this will require editing core plugin code, which means that ever plugin update will overwrite these changes so that you have to re-add the customizations after each update.

    But essentially, head into your Community Events plugin files and head to this file:

    src/Tribe/Main.php

    Once here, head to line 1220 or so. You should be looking for code like this:


    if ( is_array( $this->emailAlertsList ) ) {
    foreach ( $this->emailAlertsList as $email ) {
    wp_mail( trim( $email ), $subject, $message, $h );
    }
    }

    That $subject variable is what you’d need to change to change the subject line of emails. You’ll see it defined a few lines up above the code I highlighted above; alter this to your needs an it should work well.

    I hope this helps! Sorry that this is what’s required to make this change at this time πŸ™ In the future we can hopefully make this filterable or otherwise easier to change.

    Cheers,
    George

    #1018905
    Mad Dog
    Participant

    Thanks, George. I knew it could be changed in the core files if necessary and you anticipated my next question by telling me where to find it. I’ll see if the client wants it “temporarily” changed until the next update.

    Thanks again!

    #1018958
    George
    Participant

    Sounds good @Mad Dog, apologies again for this level of customization being required for this right now πŸ™

    Cheers!
    George

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Change Admin Notification of New Event Subject?’ is closed to new replies.