WPPizza – A Restaurant Plugin for WordPress › Support › General Support › EMail Subject
- AuthorPosts
- 17 July, 2014 at 12:52 pm #4430
Hi Olly,
how can I change the email subject. I need a command for my printer in subject at start.(cmd: print lp1)
Thanks for your kind help17 July, 2014 at 4:36 pm #4431stupidly (or to be precise: mainly because no-one has asked for it before i think) it’s not as simple as it should be really .
give me a few hours and i’ll add a filter to the plugin that will let you do that much more easily than hacking around or extending classes etc etc.
i’ll post code here ….
17 July, 2014 at 7:48 pm #4432I know the value of your help. It is so nice of you. Thanks very much.
19 July, 2014 at 11:38 pm #4449Hi,
as I want to add some more things to the next update it might take a few days more to make this available.
in the meantime you can do the followingin wppizza/classes/wppizza.send-order-emails.inc.php AFTER
$this->subjectSuffix = ''.$this->orderTimestamp.'';
(at approx line 30) ADD the following
/**make subject filterable**/ $this->subjectPrefix = apply_filters('wppizza_filter_email_subject_prefix', $this->subjectPrefix); $this->subject = apply_filters('wppizza_filter_email_subject', $this->subject); $this->subjectSuffix = apply_filters('wppizza_filter_email_subject_suffix', $this->subjectSuffix);
then in your themes function.php file you can do this to add ‘cmd: print lp1’ before the whole subject line.
/**filter the prefix**/ add_filter('wppizza_filter_email_subject_prefix', 'my_custom_email_subject_prefix'); function my_custom_email_subject_prefix($subjectPrefix) { /**by default this equals get_bloginfo()**/ $subjectPrefix='(cmd: print lp1)'.$subjectPrefix; return $subjectPrefix; }
hope that helps for the time being
21 July, 2014 at 5:07 pm #4453Thanks very much SIR
- AuthorPosts
- The topic ‘EMail Subject’ is closed to new replies.