Skip to content

Commit

Permalink
Translation file / string not working. Mailjet - Wordpress plugin
Browse files Browse the repository at this point in the history
## Description
 - Some code did not respect the `domain` for transactions and instead of using file with plugin translation it took it from `default` domain
  • Loading branch information
oleksandr-mykhailenko committed Jun 7, 2022
1 parent d809fd7 commit d24f368
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 17 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
- Contributors: Mailjet
- Tags: email, marketing, signup, newsletter, widget, smtp, woocommerce, contact form 7
- Requires at least: 4.4
- Tested up to: 5.7.2
- Stable tag: 5.2.17
- Tested up to: 6.0
- Stable tag: 5.2.18
- Requires PHP: 5.6
- License: GPLv2 or later
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -206,6 +206,9 @@ find vendor/ -type d -name ".git" -exec rm -rf {} \;

## Changelog

##### 5.2.18
* Fixed issue with not translated string. Some code did not respect the domain of translations

##### 5.2.16
* Fixed issue with sending subscribed contact to selected mail list

Expand Down
5 changes: 4 additions & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Contributors: Mailjet
Tags: email, marketing, signup, newsletter, widget, smtp, woocommerce, contact form 7
Requires at least: 4.4
Tested up to: 6.0
Stable tag: 5.2.16
Stable tag: 5.2.18
Requires PHP: 5.6
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -196,6 +196,9 @@ find vendor/ -type d -name ".git" -exec rm -rf {} \;
7. Configure abandoned cart notifications for WooCommerce

== Upgrade notice ==
= 5.2.18 =
* Fixed issue with not translated string. Some code did not respect the domain of translations

= 5.2.16 =
* Fixed issue with sending subscribed contact to selected mail list

Expand Down
2 changes: 1 addition & 1 deletion src/includes/Mailjet.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public function __construct()
if (defined('MAILJET_VERSION')) {
$this->version = MAILJET_VERSION;
} else {
$this->version = '5.2.17';
$this->version = '5.2.18';
}
$this->plugin_name = 'mailjet';

Expand Down
22 changes: 11 additions & 11 deletions src/includes/SettingsPages/WooCommerceSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ public function woo_change_order_received_text($str, $order)
if (!$contactAlreadySubscribedToList) {
$subscribe = get_post_meta($order->get_id(), 'mailjet_woo_subscribe_ok', true);
if ((int)$subscribe === 1) {
$str .= ' <br /><br /><i><b>' . __('We have sent the newsletter subscription confirmation link to you: ') . '<b>' . $order->get_billing_email() . '</b>. ' . __('To confirm your subscription you have to click on the provided link.') . '</i></b>';
$str .= ' <br /><br /><i><b>' . __('We have sent the newsletter subscription confirmation link to you: ', 'mailjet-for-wordpress') . '<b>' . $order->get_billing_email() . '</b>. ' . __('To confirm your subscription you have to click on the provided link.', 'mailjet-for-wordpress') . '</i></b>';
} elseif (get_option('mailjet_woo_banner_checkbox') === '1') {
$str .= $this->addThankYouSubscription($order);
}
Expand Down Expand Up @@ -358,7 +358,7 @@ public function activateWoocommerce($data)
if (get_option('mailjet_woo_edata_sync') !== '1') {
if ($this->all_customers_edata_sync() === false) {
$result['success'] = false;
$result['message'] = __('An error occured during e-commerce data sync! Please try again later.');
$result['message'] = __('An error occured during e-commerce data sync! Please try again later.', 'mailjet-for-wordpress');
return $result;
}
}
Expand Down Expand Up @@ -388,7 +388,7 @@ public function activateWoocommerce($data)
if ($activate) {
if ($this->createTemplates() === false) {
$result['success'] = false;
$result['message'] = __('An error occured during templates creation! Please try again later.');
$result['message'] = __('An error occured during templates creation! Please try again later.', 'mailjet-for-wordpress');
return $result;
}

Expand Down Expand Up @@ -1091,8 +1091,8 @@ private function ajaxSubscription($email, $fName, $lName)
}

if ($this->mailjet_subscribe_confirmation_from_woo_form(1, $email, $fName, $lName)){
$message = __('We have sent the newsletter subscription confirmation link to you: ') . $email . '. '
. __('To confirm your subscription you have to click on the provided link.');
$message = __('We have sent the newsletter subscription confirmation link to you: ', 'mailjet-for-wordpress') . $email . '. '
. __('To confirm your subscription you have to click on the provided link.', 'mailjet-for-wordpress');
return ['success' => true, 'message' => $message];
}

Expand Down Expand Up @@ -1206,27 +1206,27 @@ public function init_edata() {
$newSegments = array(
'Newcomers' => array(
'expr' => '(IsInPreviousDays(' . self::WOO_PROP_ACCOUNT_CREATION_DATE . ',30))',
'description' => __('Customers who have created an account in the past 30 days')
'description' => __('Customers who have created an account in the past 30 days', 'mailjet-for-wordpress')
),
'Potential customers' => array(
'expr' => '(' . self::WOO_PROP_TOTAL_ORDERS . '<1)',
'description' => __('Contacts that don\'t have any orders')
'description' => __('Contacts that don\'t have any orders', 'mailjet-for-wordpress')
),
'First time customers' => array(
'expr' => '(' . self::WOO_PROP_TOTAL_ORDERS . '=1) and (IsInPreviousDays(' . self::WOO_PROP_LAST_ORDER_DATE . ',30))',
'description' => __('Customers who have made their first purchase in the past 30 days')
'description' => __('Customers who have made their first purchase in the past 30 days', 'mailjet-for-wordpress')
),
'Recent customers' => array(
'expr' => '(IsInPreviousDays(' . self::WOO_PROP_LAST_ORDER_DATE . ',30))',
'description' => __('Customers who have purchased in the past 30 days')
'description' => __('Customers who have purchased in the past 30 days', 'mailjet-for-wordpress')
),
'Repeat customers' => array(
'expr' => '(' . self::WOO_PROP_TOTAL_ORDERS . '>1)',
'description' => __('Customers who have purchased more than once')
'description' => __('Customers who have purchased more than once', 'mailjet-for-wordpress')
),
'Lapsed customers' => array(
'expr' => '(not IsInPreviousDays(' . self::WOO_PROP_LAST_ORDER_DATE . ',180))',
'description' => __('Customers who haven\'t purchased in the past 6 months')
'description' => __('Customers who haven\'t purchased in the past 6 months', 'mailjet-for-wordpress')
)
);
foreach ($segments as $seg) {
Expand Down
4 changes: 2 additions & 2 deletions wp-mailjet.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* Plugin Name: Mailjet for WordPress
* Plugin URI: https://www.mailjet.com/partners/wordpress/
* Description: The Best WordPress Plugin For Email Newsletters.
* Version: 5.2.17
* Version: 5.2.18
* Author: Mailjet SAS
* Author URI: http://mailjet.com
* License: GPL-2.0+
Expand Down Expand Up @@ -54,7 +54,7 @@
/**
* Mailjet plugin version.
*/
define('MAILJET_VERSION', '5.2.17');
define('MAILJET_VERSION', '5.2.18');

/**
* Mailjet Plugid dir.
Expand Down

0 comments on commit d24f368

Please sign in to comment.