Skip to content

Commit 69fb05e

Browse files
authored
Merge pull request #76 from SparkPost/remove-confusing-hook
remove hook that may confuse and create difficulties
2 parents f76b531 + 8fca64e commit 69fb05e

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

docs/hooks.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Hook names are prefixed with `wpsp_`.
1818
| wpsp_open_tracking | Filter |
1919
| wpsp_click_tracking | Filter |
2020
| wpsp_template_id | Filter | Use a different template ID
21-
| wpsp_substitution_content_tag_name| Filter | Use a different tag for content substitution. By default you needed to use `content` tag
21+
| wpsp_substitution_content_tag_name| Filter | Use a different tag for content substitution. By default you needed to use `content` tag. **IMPORTANT: DO NOT USE IT. IT'LL BE REMOVED IN NEXT RELEASE**
2222
| wpsp_sender_email | Filter |
2323
| wpsp_sender_name | Filter |
2424
| wpsp_response_body | Filter |
@@ -27,4 +27,4 @@ Hook names are prefixed with `wpsp_`.
2727
| wpsp_reply_to | Filter |
2828
| wpsp_body_headers | Filter |
2929
| wpsp_smtp_msys_api | Filter |
30-
| wpsp_transactional | Filter | Set whether an email is transactional or not.
30+
| wpsp_transactional | Filter | Set whether an email is transactional or not.

mailer.http.class.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,8 +92,7 @@ protected function get_request_body()
9292
$body['content']['template_id'] = apply_filters('wpsp_template_id', $this->settings['template']);
9393

9494
// supply substitution data so users can add variables to templates
95-
$content_substitution_tag_name = apply_filters('wpsp_substitution_content_tag_name', 'content');
96-
$body['substitution_data'][$content_substitution_tag_name] = $this->Body;
95+
$body['substitution_data']['content'] = $this->Body;
9796
$body['substitution_data']['subject'] = $this->Subject;
9897
$body['substitution_data']['from_name'] = $sender['name'];
9998
$body['substitution_data']['from'] = $sender['name'] . ' <' . $sender['email'] . '>';

0 commit comments

Comments
 (0)