Skip to content

Commit f09df61

Browse files
committed
Merge branch 'develop'
2 parents 8ae03f8 + f52bf02 commit f09df61

12 files changed

+45
-51
lines changed

.github/workflows/e2e.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
matrix:
2525
core:
2626
- {name: 'WP latest', version: 'latest'}
27-
- {name: 'WP minimum', version: 'WordPress/WordPress#6.1'}
27+
- {name: 'WP minimum', version: 'WordPress/WordPress#6.3'}
2828
- {name: 'WP trunk', version: 'WordPress/WordPress#master'}
2929

3030
steps:

CHANGELOG.md

+14
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,19 @@ All notable changes to this project will be documented in this file, per [the Ke
44

55
## [Unreleased] - TBD
66

7+
## [1.6.2] - 2024-11-12
8+
**Note that this release bumps the WordPress minimum version from 6.1 to 6.3.**
9+
10+
### Changed
11+
- Bump WordPress "tested up to" version 6.7 (props [@qasumitbagthariya](https://github.com/qasumitbagthariya), [@vikrampm1](https://github.com/vikrampm1), [@dkotter](https://github.com/dkotter) via [#71](https://github.com/mailchimp/wordpress/pull/71)).
12+
- Bump WordPress minimum supported version from 6.1 to 6.3 (props [@qasumitbagthariya](https://github.com/qasumitbagthariya), [@vikrampm1](https://github.com/vikrampm1), [@dkotter](https://github.com/dkotter) via [#71](https://github.com/mailchimp/wordpress/pull/71)).
13+
14+
### Fixed
15+
- Ensure the field name is properly added to the error message when the email address is blank (props [@iamdharmesh](https://github.com/iamdharmesh), [@jerclarke](https://github.com/jerclarke), [@dkotter](https://github.com/dkotter) via [#74](https://github.com/mailchimp/wordpress/pull/74)).
16+
17+
### Developer
18+
- Remove the Advanced Section from our readme files (props [@iamdharmesh](https://github.com/iamdharmesh), [@dkotter](https://github.com/dkotter) via [#77](https://github.com/mailchimp/wordpress/pull/77)).
19+
720
## [1.6.1] - 2024-10-14
821
### Changed
922
- Improved migration flow from API Key to OAuth authentication for a better user experience (props [@iamdharmesh](https://github.com/iamdharmesh), [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter), [@qasumitbagthariya](https://github.com/qasumitbagthariya) via [#67](https://github.com/mailchimp/wordpress/pull/67)).
@@ -179,5 +192,6 @@ All notable changes to this project will be documented in this file, per [the Ke
179192
- Security and various other improvements
180193

181194
[Unreleased]: https://github.com/mailchimp/wordpress/compare/main...develop
195+
[1.6.2]: https://github.com/mailchimp/wordpress/compare/1.6.1...1.6.2
182196
[1.6.1]: https://github.com/mailchimp/wordpress/compare/1.6.0...1.6.1
183197
[1.6.0]: https://github.com/mailchimp/wordpress/tree/1.6.0

CREDITS.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ The following individuals are responsible for curating the list of issues, respo
1212

1313
Thank you to all the people who have already contributed to this repository via bug reports, code, design, ideas, project management, translation, testing, etc.
1414

15-
[Mailchimp (@mailchimp)](https://github.com/mailchimp), [Crowd Favorite (@crowdfavorite)](https://github.com/crowdfavorite), [Matthew Richmond (@bigdawggi)](https://github.com/bigdawggi), [Devin Reams (@devinreams)](https://github.com/devinreams), [Alex King (@alexkingorg)](https://github.com/alexkingorg), [Jesse (@jessedp)](https://github.com/jessedp), [Andrew Ellis]([email protected]), [Evan Anderson (@ejdanderson)](https://github.com/ejdanderson), [Webb Henderson (@emerywebster)](https://github.com/emerywebster), [Steven Mathias (@ssmathias)](https://github.com/ssmathias), [Jonathan D. Johnson (@jondavidjohn)](https://github.com/jondavidjohn), [Ross Tweedie (@digitales)](https://github.com/digitales), [(@mcwill)](https://github.com/mcwill), [Andrew Austin (@andrewjaustin)](https://github.com/andrewjaustin), [Marc Queralt i Bassa (@MarcQueralt)](https://github.com/MarcQueralt), [Chris Mospaw (@mospaw)](https://github.com/mospaw), [Jonas Stensved (@jstensved)](https://github.com/jstensved), [netboy]([email protected]), [Lenin]([email protected]), [Bauke Zwaan (@baukezwaan)](https://github.com/baukezwaan), [Jascha Ehrenreich (@jaeh)](https://github.com/jaeh), [Chris Wilcoxson (@slushman)](https://github.com/slushman), [Luke Watts (@thisislawatts)](https://github.com/thisislawatts), [Glenn Ansley (@glennansley)](https://github.com/glennansley), [SiteGround](http://www.siteground.com/wordpress-hosting.htm), [Peter Kahoun](http://kahi.cz/), [Jan Lund](), [Michael Jaekel](), [Ιωάννης Δημοφέρλιας (John Dimoferlias)](), [Tomás Nader](), [Claudia Mansilla](http://cricava.com/), [Helen Urbanik](http://www.motomaania.ee/), [Maxime Toulliou](http://www.maximetoulliou.com/), [שגיב בית](http://www.sagive.co.il), [Okostobi](), [Stefan Des](http://www.stefandes.com), [백선기 (SK Baek)](), [Alexander Roterud aka Defrag](http://www.tigerpews.com), [Filip Stas](http://suddenelfilio.net/), [Maria Manoela Porto](), [Tiago Faria](http://xroot.org), [Alexandru Armin Roșu](), [Илья](http://fatcow.com), [Sebastian Johnsson](http://www.agiley.se/), [Hakan E.](http://kazancexpert.com/), [Josh Grosser (@jgrosser-intuit)](https://github.com/jgrosser-intuit), [10up (@10up)](https://github.com/10up), [Nate Conley (@nateconley)](https://github.com/nateconley), [Darin Kotter (@dkotter)](https://github.com/dkotter), [Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul), [Eddie Shrake (@eddieshrake)](https://github.com/eddieshrake), [Sumit Bagthariya (@qasumitbagthariya)](https://github.com/qasumitbagthariya), [Vikram Moparthy (@vikrampm1)](https://github.com/vikrampm1), [Dharmesh Patel (@iamdharmesh)](https://github.com/iamdharmesh), [GitHub Dependabot (@dependabot)](https://github.com/apps/dependabot).
15+
[Mailchimp (@mailchimp)](https://github.com/mailchimp), [Crowd Favorite (@crowdfavorite)](https://github.com/crowdfavorite), [Matthew Richmond (@bigdawggi)](https://github.com/bigdawggi), [Devin Reams (@devinreams)](https://github.com/devinreams), [Alex King (@alexkingorg)](https://github.com/alexkingorg), [Jesse (@jessedp)](https://github.com/jessedp), [Andrew Ellis]([email protected]), [Evan Anderson (@ejdanderson)](https://github.com/ejdanderson), [Webb Henderson (@emerywebster)](https://github.com/emerywebster), [Steven Mathias (@ssmathias)](https://github.com/ssmathias), [Jonathan D. Johnson (@jondavidjohn)](https://github.com/jondavidjohn), [Ross Tweedie (@digitales)](https://github.com/digitales), [(@mcwill)](https://github.com/mcwill), [Andrew Austin (@andrewjaustin)](https://github.com/andrewjaustin), [Marc Queralt i Bassa (@MarcQueralt)](https://github.com/MarcQueralt), [Chris Mospaw (@mospaw)](https://github.com/mospaw), [Jonas Stensved (@jstensved)](https://github.com/jstensved), [netboy]([email protected]), [Lenin]([email protected]), [Bauke Zwaan (@baukezwaan)](https://github.com/baukezwaan), [Jascha Ehrenreich (@jaeh)](https://github.com/jaeh), [Chris Wilcoxson (@slushman)](https://github.com/slushman), [Luke Watts (@thisislawatts)](https://github.com/thisislawatts), [Glenn Ansley (@glennansley)](https://github.com/glennansley), [SiteGround](http://www.siteground.com/wordpress-hosting.htm), [Peter Kahoun](http://kahi.cz/), [Jan Lund](), [Michael Jaekel](), [Ιωάννης Δημοφέρλιας (John Dimoferlias)](), [Tomás Nader](), [Claudia Mansilla](http://cricava.com/), [Helen Urbanik](http://www.motomaania.ee/), [Maxime Toulliou](http://www.maximetoulliou.com/), [שגיב בית](http://www.sagive.co.il), [Okostobi](), [Stefan Des](http://www.stefandes.com), [백선기 (SK Baek)](), [Alexander Roterud aka Defrag](http://www.tigerpews.com), [Filip Stas](http://suddenelfilio.net/), [Maria Manoela Porto](), [Tiago Faria](http://xroot.org), [Alexandru Armin Roșu](), [Илья](http://fatcow.com), [Sebastian Johnsson](http://www.agiley.se/), [Hakan E.](http://kazancexpert.com/), [Josh Grosser (@jgrosser-intuit)](https://github.com/jgrosser-intuit), [10up (@10up)](https://github.com/10up), [Nate Conley (@nateconley)](https://github.com/nateconley), [Darin Kotter (@dkotter)](https://github.com/dkotter), [Jeffrey Paul (@jeffpaul)](https://github.com/jeffpaul), [Eddie Shrake (@eddieshrake)](https://github.com/eddieshrake), [Sumit Bagthariya (@qasumitbagthariya)](https://github.com/qasumitbagthariya), [Vikram Moparthy (@vikrampm1)](https://github.com/vikrampm1), [Dharmesh Patel (@iamdharmesh)](https://github.com/iamdharmesh), [GitHub Dependabot (@dependabot)](https://github.com/apps/dependabot), [Jer Clarke (@jerclarke)](https://github.com/jerclarke).
1616

1717
## Libraries
1818

README.md

+1-18
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ After installation, if you already have a Mailchimp account, you'll log in with
1616

1717
If you don't have an account, you can create one directly in the plugin. After entering in all your personal details, you'll need to activate your account via an email that will be sent to you. Once done, you'll proceed to configure settings.
1818

19-
On the settings screen, you'll select your Mailchimp list, choose merge fields and groups, and configure other options. Once done, you can now add the block, widget, or shortcode to your site. Typically, installation and setup will take about 5-10 minutes, and absolutely everything can be done via the WordPress Setting GUI, with no file editing at all.
19+
On the settings screen, you'll select your Mailchimp list, choose merge fields and groups, and configure other options. Once done, you can now add the block, widget, or shortcode (`[mailchimpsf_form]`) to your site. Typically, installation and setup will take about 5-10 minutes, and absolutely everything can be done via the WordPress Setting GUI, with no file editing at all.
2020

2121
![Mailchimp List Subscribe Form block previewing sign up form headers, fields, and button.](https://github.com/mailchimp/wordpress/blob/develop/.wordpress-org/screenshot-3.jpg?raw=true)
2222

@@ -73,23 +73,6 @@ If you are upgrading to version 1.2.1 and you used the widget in your sidebar pr
7373

7474
If you are upgrading to version 1.6.0, you will need to updated any references to display function `mailchimpSF_signup_form` to `mailchimp_sf_signup_form`.
7575

76-
## Advanced Usage
77-
78-
If you have a custom-coded sidebar or something that prevent enabling widgets through the WordPress GUI, complete these steps instead.
79-
80-
WordPress v2.8 or higher:
81-
` [mailchimpsf_form] `
82-
83-
If you are adding it inside a php code block, add this:
84-
85-
` mailchimp_sf_signup_form(); `
86-
87-
Or, if you are adding it within HTML, use this:
88-
89-
`<?php mailchimp_sf_signup_form(); ?>`
90-
91-
Where ever you want it to show up.
92-
9376
## Frequently Asked Questions
9477

9578
### Can I have multiple forms on one page?

lib/mailchimp/mailchimp.php

+5-1
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,15 @@ public function post( $endpoint, $body, $method = 'POST' ) {
190190
// Email address doesn't come back from the API, so if something's wrong, it's that.
191191
$field_name = esc_html__( 'Email Address', 'mailchimp' );
192192
$body['errors'][0]['message'] = esc_html__( 'Please fill out a valid email address.', 'mailchimp' );
193+
} elseif ( ! empty( $body['errors'] ) && isset( $body['errors'][0]['field'] ) && 'email_address' === $body['errors'][0]['field'] ) {
194+
$field_name = esc_html__( 'Email Address', 'mailchimp' );
193195
} elseif ( ! empty( $body['errors'] ) && isset( $body['errors'][0]['field'] ) && $merge['tag'] === $body['errors'][0]['field'] ) {
194196
$field_name = $merge['name'];
195197
}
196198
}
197-
$message = sprintf( $field_name . ': ' . $body['errors'][0]['message'] );
199+
$message = $body['errors'][0]['message'] ?? esc_html__( 'Something went wrong, Please try again later.', 'mailchimp' );
200+
$message = ( ! empty( $field_name ) ) ? $field_name . ': ' . $message : $message;
201+
198202
return new WP_Error( 'mc-subscribe-error-api', $message );
199203
}
200204
}

mailchimp.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
* Plugin URI: https://mailchimp.com/help/connect-or-disconnect-list-subscribe-for-wordpress/
55
* Description: Add a Mailchimp signup form block, widget or shortcode to your WordPress site.
66
* Text Domain: mailchimp
7-
* Version: 1.6.1
8-
* Requires at least: 6.1
7+
* Version: 1.6.2
8+
* Requires at least: 6.3
99
* Requires PHP: 7.0
1010
* PHP tested up to: 8.3
1111
* Author: Mailchimp
@@ -35,7 +35,7 @@
3535
*/
3636

3737
// Version constant for easy CSS refreshes
38-
define( 'MCSF_VER', '1.6.1' );
38+
define( 'MCSF_VER', '1.6.2' );
3939

4040
// What's our permission (capability) threshold
4141
define( 'MCSF_CAP_THRESHOLD', 'manage_options' );

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mailchimp/wordpress",
3-
"version": "1.6.1",
3+
"version": "1.6.2",
44
"description": "Add a Mailchimp signup form widget to your WordPress site.",
55
"homepage": "https://github.com/mailchimp/wordpress",
66
"bugs": {

phpcs-compat.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
<exclude-pattern>*/node_modules/*</exclude-pattern>
1313
<exclude-pattern>*/vendor/*</exclude-pattern>
1414

15-
<config name="minimum_supported_wp_version" value="6.1"/>
15+
<config name="minimum_supported_wp_version" value="6.3"/>
1616
<config name="testVersion" value="7.0-"/>
1717
</ruleset>

phpcs.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<exclude-pattern>*/tests/*</exclude-pattern>
88

9-
<config name="minimum_supported_wp_version" value="6.1"/>
9+
<config name="minimum_supported_wp_version" value="6.3"/>
1010
<config name="testVersion" value="7.0-"/>
1111

1212
<!-- Exclude the PHPCompatibilityWP ruleset -->

readme.txt

+13-20
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
=== Mailchimp List Subscribe Form ===
22
Contributors: Mailchimp
33
Tags: mailchimp, email, newsletter, signup, marketing
4-
Tested up to: 6.6
5-
Stable tag: 1.6.1
4+
Tested up to: 6.7
5+
Stable tag: 1.6.2
66
License: GPL-2.0-or-later
77
License URI: https://spdx.org/licenses/GPL-2.0-or-later.html
88

@@ -16,7 +16,7 @@ After installation, if you already have a Mailchimp account, you'll log in with
1616

1717
If you don't have an account, you can create one directly in the plugin. After entering in all your personal details, you'll need to activate your account via an email that will be sent to you. Once done, you'll proceed to configure settings.
1818

19-
On the settings screen, you'll select your Mailchimp list, choose merge fields and groups, and configure other options. Once done, you can now add the block, widget, or shortcode to your site. Typically, installation and setup will take about 5-10 minutes, and absolutely everything can be done via the WordPress Setting GUI, with no file editing at all.
19+
On the settings screen, you'll select your Mailchimp list, choose merge fields and groups, and configure other options. Once done, you can now add the block, widget, or shortcode (`[mailchimpsf_form]`) to your site. Typically, installation and setup will take about 5-10 minutes, and absolutely everything can be done via the WordPress Setting GUI, with no file editing at all.
2020

2121
WordPress.com compatibility is limited to Business tier users only. [How to add a signup form if you have a WordPress.com site](https://mailchimp.com/help/ways-to-add-a-signup-form-in-wordpress/).
2222

@@ -67,23 +67,6 @@ This section describes how to install the plugin and get started using it.
6767

6868
If you are upgrading to version 1.2.1 and you used the widget in your sidebar previously, all you need to do is drag the `Mailchimp Widget` back into the sidebar, visit the Mailchimp settings page (which will have maintained your prior settings), click the "Update List" button, and you're done!
6969

70-
== Advanced ==
71-
72-
If you have a custom-coded sidebar or something that prevents enabling widgets through the WordPress GUI, complete these steps instead.
73-
74-
WordPress v2.8 or higher:
75-
` [mailchimpsf_form] `
76-
77-
If you are adding it inside a php code block, add this:
78-
79-
` mailchimp_sf_signup_form(); `
80-
81-
Or, if you are adding it within HTML, use this:
82-
83-
`<?php mailchimp_sf_signup_form(); ?>`
84-
85-
Where ever you want it to show up.
86-
8770
== Screenshots ==
8871

8972
1. Mailchimp List Subscribe Form block within the block inserter.
@@ -98,6 +81,13 @@ Where ever you want it to show up.
9881

9982
== Changelog ==
10083

84+
= 1.6.2 - 2024-11-12 =
85+
**Note that this release bumps the WordPress minimum version from 6.1 to 6.3.**
86+
87+
* **Changed:** Bump WordPress "tested up to" version 6.7 (props [@qasumitbagthariya](https://github.com/qasumitbagthariya), [@vikrampm1](https://github.com/vikrampm1), [@dkotter](https://github.com/dkotter) via [#71](https://github.com/mailchimp/wordpress/pull/71)).
88+
* **Changed:** Bump WordPress minimum supported version from 6.1 to 6.3 (props [@qasumitbagthariya](https://github.com/qasumitbagthariya), [@vikrampm1](https://github.com/vikrampm1), [@dkotter](https://github.com/dkotter) via [#71](https://github.com/mailchimp/wordpress/pull/71)).
89+
* **Fixed:** Ensure the field name is properly added to the error message when the email address is blank (props [@iamdharmesh](https://github.com/iamdharmesh), [@jerclarke](https://github.com/jerclarke), [@dkotter](https://github.com/dkotter) via [#74](https://github.com/mailchimp/wordpress/pull/74)).
90+
10191
= 1.6.1 - 2024-10-14 =
10292
* **Changed:** Improved migration flow from API Key to OAuth authentication for a better user experience (props [@iamdharmesh](https://github.com/iamdharmesh), [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter), [@qasumitbagthariya](https://github.com/qasumitbagthariya) via [#67](https://github.com/mailchimp/wordpress/pull/67)).
10393
* **Changed:** Updated the menu SVG icon (props [@dkotter](https://github.com/dkotter), [@jeffpaul](https://github.com/jeffpaul) via [#65](https://github.com/mailchimp/wordpress/pull/65)).
@@ -146,6 +136,9 @@ Where ever you want it to show up.
146136

147137
== Upgrade Notice ==
148138

139+
= 1.6.2 =
140+
This release bumps the WordPress minimum version from 6.1 to 6.3.
141+
149142
= 1.6.0 =
150143
This version increased the WordPress minimum version to 6.1 and the PHP minimum version to 7.0.
151144

tests/cypress/e2e/settings.test.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ describe('Admin can update plugin settings', () => {
3535
cy.get('#mc_signup_submit').should('exist');
3636
cy.get('#mc_signup_submit').click();
3737
cy.get('.mc_error_msg').should('exist');
38-
cy.get('.mc_error_msg').contains(': This value should not be blank.');
38+
cy.get('.mc_error_msg').contains('Email Address: This value should not be blank.');
3939
}
4040
});
4141
});
@@ -55,7 +55,7 @@ describe('Admin can update plugin settings', () => {
5555
cy.get('#mc_signup_submit').should('exist');
5656
cy.get('#mc_signup_submit').click();
5757
cy.get('.mc_error_msg').should('exist');
58-
cy.get('.mc_error_msg').contains(': This value should not be blank.');
58+
cy.get('.mc_error_msg').contains('Email Address: This value should not be blank.');
5959
}
6060
});
6161
});

0 commit comments

Comments
 (0)