Skip to content

Commit e7c4114

Browse files
author
GITUSER
committed
Merge branch 'release/1.9.9.6.2'
2 parents 5f3abf7 + 03de0cd commit e7c4114

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

core/mailer/classes/class.mailer.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public static function load_static_vars() {
5656
self::$table_name = $wpdb->prefix . "inbound_email_queue";
5757

5858
/* Get now timestamp */
59-
self::$timestamp = gmdate("Y-m-d\\TG:i:s\\Z");
59+
self::$timestamp = date_i18n('Y-m-d G:i');
6060

6161
/* Check if there is an error flag in db from previous processing run */
6262
self::$error_mode = Inbound_Options_API::get_option('inbound-email', 'errors-detected', false);
@@ -213,7 +213,7 @@ public static function send_automated_emails() {
213213
case "sparkpost-eu":
214214
Inbound_Mailer_SparkPost::send_email( true ); /* send immediately */
215215
break;
216-
case "wpmail":
216+
case "wp_mail":
217217
Inbound_Mailer_WPMail::send_email( true ); /* send immediately */
218218
break;
219219
}
@@ -424,7 +424,6 @@ public static function send_solo_email($args) {
424424
*/
425425
public static function delete_from_queue() {
426426
global $wpdb;
427-
428427
$query = "delete from " . self::$table_name . " where `id` = '" . self::$row->id . "'";
429428
$wpdb->query($query);
430429

core/mailer/classes/class.scheduling.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ public static function schedule_email($email_id , $tokens = array() , $action =
9494

9595
/* Prepare Schedule time */
9696
$timestamp = Inbound_Mailer_Scheduling::get_timestamp();
97+
$store_time = new DateTime($timestamp);
9798

9899
/* prepare rule and action id if none are set */
99100
if (!isset($action['rule_id'])) {
@@ -117,7 +118,7 @@ public static function schedule_email($email_id , $tokens = array() , $action =
117118
$query_prefix .= "VALUES";
118119

119120
foreach ($leads as $ID) {
120-
$query_values_array[] = "( {$email_id} , {$vid} , {$ID} , '" . Inbound_Mailer_Scheduling::$settings['email_type'] . "' , '".$tokens_encoded."' ,'waiting' , '{$timestamp}' , '{$action['rule_id']}' , '{$action['job_id']}', '".json_encode(Inbound_Mailer_Scheduling::$recipients)."' , '".$post_id."')";
121+
$query_values_array[] = "( {$email_id} , {$vid} , {$ID} , '" . Inbound_Mailer_Scheduling::$settings['email_type'] . "' , '".$tokens_encoded."' ,'waiting' , '{$store_time->format('Y-m-d G:i:s')}' , '{$action['rule_id']}' , '{$action['job_id']}', '".json_encode(Inbound_Mailer_Scheduling::$recipients)."' , '".$post_id."')";
121122
}
122123

123124
$value_batches = array_chunk($query_values_array, 500);
@@ -135,6 +136,7 @@ public static function schedule_email($email_id , $tokens = array() , $action =
135136
if ($email_service == "wp_mail" ) {
136137
$current_date_obj = new DateTime(date_i18n('Y-m-d G:i:s'));
137138
$scheduled_date_obj = new DateTime($timestamp);
139+
138140
if ($scheduled_date_obj > $current_date_obj) {
139141
wp_update_post(array(
140142
'ID' => $email_id,
@@ -170,7 +172,7 @@ public static function get_timestamp() {
170172
$settings = Inbound_Mailer_Scheduling::$settings;
171173

172174
if ($settings['email_type'] == 'automated') {
173-
return gmdate("Y-m-d\\TG:i:s\\Z");
175+
return date_i18n('Y-m-d G:i:s');
174176
}
175177

176178
if (isset($settings['timezone'])) {
@@ -181,7 +183,7 @@ public static function get_timestamp() {
181183

182184
/* add date if does not exist */
183185
if (!$settings['send_datetime']) {
184-
$settings['send_datetime'] = date_i18n('Y-m-d G:i');
186+
$settings['send_datetime'] = date_i18n('Y-m-d G:i:s');
185187
}
186188

187189
/* add time if does not exist */
@@ -215,7 +217,7 @@ public static function get_timestamp() {
215217
$timestamp = $schedule_date->format('Y-m-d\\TG:i:s\\Z');
216218
break;
217219
case "wp_mail":
218-
$timestamp = $schedule_date->format('Y-m-d\\TG:i:s\\Z');
220+
$timestamp = $schedule_date->format('Y-m-d G:i:s');
219221
break;
220222
}
221223

inbound-pro.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Plugin URI: http://www.inboundnow.com/
55
Description: Professional Inbound Marketing Suite for WordPress
66
Author: InboundWP LLC
7-
Version: 1.9.9.6.1
7+
Version: 1.9.9.6.2
88
Author URI: http://www.inboundnow.com/
99
Text Domain: inbound-pro
1010
*/
@@ -95,7 +95,7 @@ public function __construct() {
9595
*/
9696
private static function define_constants() {
9797

98-
define('INBOUND_PRO_CURRENT_VERSION', '1.9.9.6.1' );
98+
define('INBOUND_PRO_CURRENT_VERSION', '1.9.9.6.2' );
9999
define('INBOUND_PRO_STABLE_VERSION', '1.9.9.5' );
100100
define('INBOUND_PRO_TRANSLATIONS_VERSION', '1.30.22' );
101101
define('INBOUND_PRO_URLPATH', plugin_dir_url( __FILE__ ));

0 commit comments

Comments
 (0)