Filter for subject in outgoing email | Enhancement Suggestions | Support Forum

A A A

Please consider registering
guest

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed Topic RSS sp_TopicIcon
Filter for subject in outgoing email
January 30, 2017
9:57 am
Curiosity
Member
Members
Forum Posts: 25
Member Since:
January 24, 2017
sp_UserOfflineSmall Offline

Would suggest a filter for the subject line in includes/helpers/email.php in send() method of AWPCP_Email for outgoing email to be able to e.g. prepend a string to the subject like get_bloginfo( ‘name’ ) or similar, e.g. like this:

$this->subject = apply_filters( ‘awpcp_admin_email_subject’, $this->subject );

Currently some subject lines can be configured in backend, but not all of them.

To prepend the blog name to any outgoing email, we currently use the above added line in email.php in combination with this filter in functions.php of theme (which checks first if the blogname has already been prepended in backend):

function my_awpcp_admin_email_subject( $subject ) {
    $prepend = ‘[‘ . get_bloginfo( ‘name’ ) . ‘] ‘;
    if ( strpos( $subject, $prepend ) !== 0 ) {
        $subject = $prepend . $subject;
    }
    return $subject;
}
add_filter( ‘awpcp_admin_email_subject’, ‘my_awpcp_admin_email_subject’);

Thanks for considering a similar solution.

February 1, 2017
10:01 pm
AWPCP Support
Moderator
Members

Moderators
Forum Posts: 4388
Member Since:
September 4, 2013
sp_UserOfflineSmall Offline

Hi Curiosity,

Thank you for your wonderful suggestion. We will look into it when working on a future release.

February 25, 2017
12:06 pm
Curiosity
Member
Members
Forum Posts: 25
Member Since:
January 24, 2017
sp_UserOfflineSmall Offline

For interested readers, this is not yet added in 3.7.4 release.

Thanks for considering.

Forum Timezone: America/Denver

Most Users Ever Online: 163

Currently Online:
20 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

Johnny B: 140

godie: 120

laburke: 94

NAIN KHAN: 93

salvig67: 84

kerdezo: 80

rude: 72

purplepaula: 72

WAYTOBAYWTB52: 71

gery: 71

Member Stats:

Guest Posters: 27

Members: 36528

Moderators: 2

Admins: 2

Forum Stats:

Groups: 1

Forums: 4

Topics: 6443

Posts: 29135

Newest Members:

Nelle Valliere, Ashish, Octavia Wilfred, Alex, sahai office, Morg, Mike Russ, Sarah, Ariel, Gérald

Moderators: awpcp: 7530, AWPCP Support: 4388

Administrators: wpengine: 0, awpcp: 297

Skip to toolbar