|
2 | 2 | SparkPost's WordPress plugin has a number of hooks that can be used to modify how it works and/or inject new functionality around its lifecycle. |
3 | 3 |
|
4 | 4 | ### Convention |
5 | | -Hook names are prefixed with `wpsp_`.There are some hooks that are common across mailers (http and smtp). Unless the hook applies to both mailer, it has either `smtp_` or `smtp_` after the initial prefix (`wpsp_`). |
| 5 | +Hook names are prefixed with `wpsp_`. |
6 | 6 |
|
7 | 7 | ### List of hooks |
8 | 8 |
|
9 | | -| Hook Name | Applicable Mailer | Description (Purpose) | |
10 | | -| ------------- |:----------------:| -----:| |
11 | | -| wpsp_get_settings | Both | Tap into settings objects |
12 | | -| wpsp_init_http_mailer* | HTTP | Modify/replace http mailer instance |
13 | | -| wpsp_http_get_lib | HTTP | Modify/replace http library |
14 | | -| wpsp_http_before_send* | HTTP | |
15 | | -| wpsp_http_after_send* | HTTP | |
16 | | -| wpsp_http_handle_response | HTTP | Custom handler for http response. **Should return boolean to stop further processing.** |
17 | | -| wpsp_http_recipients | HTTP | |
18 | | -| wpsp_open_tracking | Both | |
19 | | -| wpsp_click_tracking | Both | |
20 | | -| wpsp_http_template_id | HTTP | Use a different template ID |
21 | | -| wpsp_substitution_content_tag_name| HTTP | Use a different tag for content substitution |
22 | | -| wpsp_http_body | HTTP | |
23 | | -| wpsp_http_sender_email | Both | |
24 | | -| wpsp_http_sender_name | Both | |
25 | | -| wpsp_http_response_body | HTTP | |
26 | | -| wpsp_http_recipients | HTTP | |
27 | | -| wpsp_api_key | BOTH | Use different API Key/Password |
28 | | -| wpsp_http_request_headers | HTTP | |
29 | | -| wpsp_http_reply_to | HTTP | |
30 | | -| spwp_http_body_headers | HTTP | |
31 | | -| wpsp_smtp_msys_api | SMTP | |
| 9 | +| Hook Name | Description (Purpose) |
| 10 | +| ------------- |:----------------:| |
| 11 | +| wpsp_get_settings | Tap into settings objects |
| 12 | +| wpsp_init_mailer* | Modify/replace http mailer instance |
| 13 | +| wpsp_get_http_lib | Modify/replace http library |
| 14 | +| wpsp_before_send* | |
| 15 | +| wpsp_after_send* | |
| 16 | +| wpsp_handle_response | Custom handler for http response. **Should return boolean to stop further processing.** |
| 17 | +| wpsp_recipients | |
| 18 | +| wpsp_open_tracking | |
| 19 | +| wpsp_click_tracking | |
| 20 | +| wpsp_template_id | Use a different template ID |
| 21 | +| wpsp_substitution_content_tag_name| Use a different tag for content substitution |
| 22 | +| wpsp_sender_email | |
| 23 | +| wpsp_sender_name | |
| 24 | +| wpsp_response_body | |
| 25 | +| wpsp_api_key | Use different API Key/Password |
| 26 | +| wpsp_request_headers | |
| 27 | +| wpsp_reply_to | |
| 28 | +| wpsp_body_headers | |
| 29 | +| wpsp_smtp_msys_api |
32 | 30 |
|
33 | | -\* These are action hooks. So return value is irrelevant. |
| 31 | +\* These are action hooks. So return value is irrelevant. |
0 commit comments