Skip to content

Commit

Permalink
Merge pull request #379 from mailjet/plugin-fixes
Browse files Browse the repository at this point in the history
Fix for the possible error in scope of multisites
  • Loading branch information
oleksandr-mykhailenko authored Oct 1, 2024
2 parents fd06989 + 92c3456 commit 4dc9627
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 9 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
## Changelog

##### 6.1.2
- Fix possible error when code switch websites and could leave website in a broken state

##### 6.1.1
- Fix PHP Fatal error: Uncaught Error: Class 'MailjetWp\\MailjetPlugin\\Front\\Mailjet

Expand Down
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: 6.6.1
- Stable tag: 6.1.1
- Tested up to: 6.6.2
- Stable tag: 6.1.2
- Requires PHP: 7.4
- License: GPLv2 or later
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -162,6 +162,9 @@ find vendor/ -type d -name ".git" -exec rm -rf {} \;

## Changelog

##### 6.1.2
- Fix possible error when code switch websites and could leave website in a broken state

##### 6.1
- Added support Multisite settings across all sites. Now, you can use plugin settings from the main site on all your subdomains.

Expand Down
7 changes: 5 additions & 2 deletions readme.txt
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: 6.6.1
- Stable tag: 6.1.1
- Tested up to: 6.6.2
- Stable tag: 6.1.2
- Requires PHP: 7.4
- License: GPLv2 or later
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -152,6 +152,9 @@ find vendor/ -type d -name ".git" -exec rm -rf {} \;

== Changelog ==

= 6.1.2 =
- Fix possible error when code switch websites and could leave website in a broken state

= 6.0.1 =
* Removed old widget filter function `mailjet_subscription_widget_email_params`. It was deprecated and unsupported since we have Form Builder widget

Expand Down
6 changes: 4 additions & 2 deletions src/includes/Mailjet.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public function __construct()
if (\defined('MAILJET_VERSION')) {
$this->version = MAILJET_VERSION;
} else {
$this->version = '6.1.1';
$this->version = '6.1.2';
}
$this->plugin_name = 'mailjet';
$this->load_dependencies();
Expand Down Expand Up @@ -300,7 +300,9 @@ public static function getOption(string $key)

//If main site has multisite support enabled, we should use the main site options
if (get_option('mailjet_multisite_support') === 'on') {
return get_option($key);
$optionValue = get_option($key);
restore_current_blog();
return $optionValue;
}
//If main site has multisite support disabled, we should use the current site options
restore_current_blog();
Expand Down
6 changes: 3 additions & 3 deletions wp-mailjet.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* Plugin Name: Mailjet for WordPress
* Plugin URI: https://www.mailjet.com/partners/wordpress/
* Description: The Best WordPress Plugin For Email Newsletters.
* Version: 6.1.1
* Tested up to: 6.6.1
* Version: 6.1.2
* Tested up to: 6.6.2
* Author: Mailjet SAS
* Author URI: http://mailjet.com
* License: GPL-2.0+
Expand Down Expand Up @@ -56,7 +56,7 @@
/**
* Mailjet plugin version.
*/
define('MAILJET_VERSION', '6.1.1');
define('MAILJET_VERSION', '6.1.2');

/**
* Mailjet Plugid dir.
Expand Down

0 comments on commit 4dc9627

Please sign in to comment.