Skip to content

Commit 12cd79b

Browse files
committed
Merge pull request #30 from SparkPost/fix-422
Fix mailer issue with WP v4.2x
2 parents 65afc83 + 5853dca commit 12cd79b

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

admin.widget.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function wpsp_admin_page()
104104
</form>
105105
<hr/>
106106
<div>
107-
<h2>Test Email</h2>
107+
<h3>Test Email</h3>
108108
<?php
109109
if (isset($_POST['sp_test_email'])) {
110110
$this->test_email_sending($_POST['to_email'], !empty($_POST['enable_debugging']));

mailer.http.class.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ function __construct($exceptions = false)
1818
parent::__construct($exceptions);
1919
}
2020

21+
function mailSend($header, $body) { /** TODO check if need to use $header, $body */
22+
return $this->sparkpostSend();
23+
}
24+
2125
function sparkpostSend()
2226
{
2327
$this->edebug('Preparing request data');
@@ -147,8 +151,8 @@ protected function handle_response($response)
147151
return false;
148152
}
149153

150-
$this->edebug('Response headers: ' . print_r($result['headers'], true));
151-
$this->edebug('Response body: ' . print_r($result['body'], true));
154+
$this->edebug('Response headers: ' . print_r($response['headers'], true));
155+
$this->edebug('Response body: ' . print_r($response['body'], true));
152156

153157
$body = json_decode($response['body']);
154158
if (property_exists($body, 'errors')) {

readme.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Contributors: sparkpost, rajuru
33
Tags: sparkpost, smtp, wp_mail, mail, email
44
Requires at least: 4.0
55
Tested up to: 4.4.2
6-
Stable tag: 2.2.0
6+
Stable tag: 2.2.1
77
License: GPLv2 or later
88

99
Send all your email from Wordpress through SparkPost, the most advanced email delivery service.
@@ -47,6 +47,9 @@ Visit our [support site](https://support.sparkpost.com/) for help.
4747

4848
== Changelog ==
4949

50+
= 2.2.1 =
51+
- Fix issue for previous version of WordPress
52+
5053
= 2.2.0 =
5154
- Add template field for selecting a SparkPost template when using HTTP API
5255
- Allow substituion of Subject, From name in HTTP API

wordpress-sparkpost.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Plugin Name: SparkPost
77
Plugin URI: http://sparkpost.com/
88
Description: Send all your email from Wordpress through SparkPost, the world's most advanced email delivery service.
9-
Version: 2.2.0
9+
Version: 2.2.1
1010
Author: SparkPost
1111
Author URI: http://sparkpost.com
1212
License: GPLv2 or later

0 commit comments

Comments
 (0)