File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -86,16 +86,18 @@ protected function get_request_body()
8686 'transactional ' => (bool ) apply_filters ('wpsp_transactional ' , $ this ->settings ['transactional ' ])
8787 );
8888
89+ $ template_id = apply_filters ('wpsp_template_id ' , $ this ->settings ['template ' ]);
90+
8991 // pass through either stored template or inline content
90- if (!empty ($ this -> settings [ ' template ' ] )) {
92+ if (!empty ($ template_id )) {
9193 // stored template
92- $ body ['content ' ]['template_id ' ] = apply_filters ( ' wpsp_template_id ' , $ this -> settings [ ' template ' ]) ;
94+ $ body ['content ' ]['template_id ' ] = $ template_id ;
9395
9496 // supply substitution data so users can add variables to templates
9597 $ body ['substitution_data ' ]['content ' ] = $ this ->Body ;
9698 $ body ['substitution_data ' ]['subject ' ] = $ this ->Subject ;
9799 $ body ['substitution_data ' ]['from_name ' ] = $ sender ['name ' ];
98- $ body ['substitution_data ' ]['from ' ] = $ sender ['name ' ] . ' < ' . $ sender [ ' email ' ] . ' > ' ;
100+ $ body ['substitution_data ' ]['from ' ] = $ sender ['email ' ];
99101 if ($ replyTo ) {
100102 $ body ['substitution_data ' ]['reply_to ' ] = $ replyTo ;
101103 }
You can’t perform that action at this time.
0 commit comments