Skip to content

Commit 9aef0fb

Browse files
committed
Merge branch 'develop' of github.com:mailchimp/wordpress into enhancement/120
2 parents 9cb88be + b6f5c9d commit 9aef0fb

28 files changed

+357
-507
lines changed

.github/workflows/e2e.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ jobs:
2020
env:
2121
CYPRESS_MAILCHIMP_USERNAME: ${{ secrets.MAILCHIMP_USERNAME }}
2222
CYPRESS_MAILCHIMP_PASSWORD: ${{ secrets.MAILCHIMP_PASSWORD }}
23+
CYPRESS_MAILCHIMP_API_KEY: ${{ secrets.MAILCHIMP_API_KEY }}
24+
CYPRESS_MAILCHIMP_API_SERVER_PREFIX: ${{ secrets.MAILCHIMP_API_SERVER_PREFIX }}
2325
strategy:
26+
max-parallel: 1
2427
matrix:
2528
core:
2629
- {name: 'WP latest', version: 'latest'}

CHANGELOG.md

Lines changed: 85 additions & 0 deletions
Large diffs are not rendered by default.

includes/blocks/class-mailchimp-list-subscribe-form-blocks.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
/**
1414
* Class Mailchimp_List_Subscribe_Form_Blocks
1515
*
16-
* @since x.x.x
16+
* @since 1.7.0
1717
*/
1818
class Mailchimp_List_Subscribe_Form_Blocks {
1919

includes/class-mailchimp-admin.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ public function enqueue_admin_page_scripts( $hook_suffix ) {
509509
/**
510510
* Add the create account page.
511511
*
512-
* @since x.x.x
512+
* @since 1.6.0
513513
*/
514514
public function add_create_account_page() {
515515
add_submenu_page(
@@ -525,7 +525,7 @@ public function add_create_account_page() {
525525
/**
526526
* Create account page.
527527
*
528-
* @since x.x.x
528+
* @since 1.6.0
529529
*
530530
* @return void
531531
*/
@@ -544,7 +544,7 @@ public function create_account_page() {
544544
/**
545545
* Get a list of timezones.
546546
*
547-
* @since x.x.x
547+
* @since 1.6.0
548548
*
549549
* @return array
550550
*/
@@ -555,7 +555,7 @@ private function get_timezones() {
555555
/**
556556
* Get a list of countries.
557557
*
558-
* @since x.x.x
558+
* @since 1.6.0
559559
*
560560
* @return array
561561
*/
@@ -816,7 +816,7 @@ public function get_countries() {
816816
/**
817817
* Display the Mailchimp footer text on the Mailchimp admin pages.
818818
*
819-
* @since x.x.x
819+
* @since 1.6.0
820820
*
821821
* @param string $text The current footer text.
822822
* @return string The modified footer text.

mailchimp.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
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.3
7+
* Version: 1.7.0
88
* Requires at least: 6.3
99
* Requires PHP: 7.0
1010
* PHP tested up to: 8.3
@@ -67,7 +67,7 @@ function () {
6767
use function Mailchimp\WordPress\Includes\Admin\{admin_notice_error, admin_notice_success};
6868

6969
// Version constant for easy CSS refreshes
70-
define( 'MCSF_VER', '1.6.3' );
70+
define( 'MCSF_VER', '1.7.0' );
7171

7272
// What's our permission (capability) threshold
7373
define( 'MCSF_CAP_THRESHOLD', 'manage_options' );
@@ -830,8 +830,6 @@ function mailchimp_sf_check_status( $endpoint ) {
830830
return $subscriber['status'];
831831
}
832832

833-
834-
835833
/**
836834
* Validate phone
837835
*

mailchimp_widget.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ function mailchimp_sf_signup_form( $args = array() ) {
184184

185185
<div class="mc_form_inside">
186186

187-
<div class="updated mc_message_wrapper" id="mc_message">
187+
<div class="mc_message_wrapper" id="mc_message">
188188
<?php echo wp_kses_post( mailchimp_sf_frontend_msg() ); ?>
189189
</div><!-- /mc_message -->
190190

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

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

readme.txt

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Contributors: Mailchimp
33
Tags: mailchimp, email, newsletter, signup, marketing
44
Tested up to: 6.7
5-
Stable tag: 1.6.3
5+
Stable tag: 1.7.0
66
License: GPL-2.0-or-later
77
License URI: https://spdx.org/licenses/GPL-2.0-or-later.html
88

@@ -81,6 +81,20 @@ If you are upgrading to version 1.2.1 and you used the widget in your sidebar pr
8181

8282
== Changelog ==
8383

84+
= 1.7.0 - 2025-04-08 =
85+
* **Changed:** Enhance the Mailchimp List Subscribe Form block to allow for selecting an audience list, reorder fields, toggle field and group visibility, and various other improvements (props [@iamdharmesh](https://github.com/iamdharmesh), [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter), [@qasumitbagthariya](https://github.com/qasumitbagthariya) via [#126](https://github.com/mailchimp/wordpress/pull/126)).
86+
* **Changed:** Plugin settings page success and error messages will now use WP admin notices (props [@MaxwellGarceau](https://github.com/MaxwellGarceau), [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter), [@qasumitbagthariya](https://github.com/qasumitbagthariya), [@iamdharmesh](https://github.com/iamdharmesh) via [#85](https://github.com/mailchimp/wordpress/pull/85)).
87+
* **Changed:** Renamed `mailchimp_sf_global_msg` function to `mailchimp_sf_frontend_msg` to differentiate functionality from WP admin notices that are used exclusively in the WP Admin (props [@MaxwellGarceau](https://github.com/MaxwellGarceau), [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter), [@qasumitbagthariya](https://github.com/qasumitbagthariya), [@iamdharmesh](https://github.com/iamdharmesh) via [#85](https://github.com/mailchimp/wordpress/pull/85)).
88+
* **Changed:** Make the form field visibility dependent on the WordPress "Include?" settings instead of the Mailchimp settings (props [@iamdharmesh](https://github.com/iamdharmesh), [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter), [@qasumitbagthariya](https://github.com/qasumitbagthariya), [@MaxwellGarceau](https://github.com/MaxwellGarceau) via [#137](https://github.com/mailchimp/wordpress/pull/137)).
89+
* **Fixed:** Ensure that form data persists when validation fails (props [@iamdharmesh](https://github.com/iamdharmesh), [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter), [@qasumitbagthariya](https://github.com/qasumitbagthariya), [@MaxwellGarceau](https://github.com/MaxwellGarceau) via [#130](https://github.com/mailchimp/wordpress/pull/130)).
90+
* **Fixed:** Display an error message informing users that they must subscribe through the hosted form if they were previously unsubscribed (props [@iamdharmesh](https://github.com/iamdharmesh), [@dkotter](https://github.com/dkotter), [@qasumitbagthariya](https://github.com/qasumitbagthariya), [@MaxwellGarceau](https://github.com/MaxwellGarceau) via [#131](https://github.com/mailchimp/wordpress/pull/131), [#140](https://github.com/mailchimp/wordpress/pull/140)).
91+
* **Removed:** The "CSS Cheat Sheet" section from the Mailchimp settings page (props [@iamdharmesh](https://github.com/iamdharmesh), [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter), [@qasumitbagthariya](https://github.com/qasumitbagthariya) via [#126](https://github.com/mailchimp/wordpress/pull/126)).
92+
* **Removed:** The "Use JavaScript Support?" option from the Mailchimp settings page (props [@iamdharmesh](https://github.com/iamdharmesh), [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter), [@qasumitbagthariya](https://github.com/qasumitbagthariya) via [#126](https://github.com/mailchimp/wordpress/pull/126)).
93+
* **Removed:** The "Use JavaScript Datepicker?" option from the Mailchimp settings page (props [@iamdharmesh](https://github.com/iamdharmesh), [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter), [@qasumitbagthariya](https://github.com/qasumitbagthariya) via [#126](https://github.com/mailchimp/wordpress/pull/126)).
94+
* **Removed:** The "Custom Styling" settings from the Mailchimp settings page (props [@iamdharmesh](https://github.com/iamdharmesh), [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter), [@qasumitbagthariya](https://github.com/qasumitbagthariya) via [#126](https://github.com/mailchimp/wordpress/pull/126)).
95+
* **Removed:** The "Remove Mailchimp CSS" settings from the Mailchimp settings page (props [@iamdharmesh](https://github.com/iamdharmesh), [@jeffpaul](https://github.com/jeffpaul), [@dkotter](https://github.com/dkotter), [@qasumitbagthariya](https://github.com/qasumitbagthariya) via [#126](https://github.com/mailchimp/wordpress/pull/126)).
96+
* **Security:** Bump `express` from 4.21.0 to 4.21.2 (props [@dependabot](https://github.com/apps/dependabot), [@iamdharmesh](https://github.com/iamdharmesh), [@dkotter](https://github.com/dkotter) via [#125](https://github.com/mailchimp/wordpress/pull/125)).
97+
8498
= 1.6.3 - 2025-01-30 =
8599
* **Added:** Transform the `mailchimp_sf_shortcode` shortcode to the Mailchimp List Subscribe Form block (props [@MaxwellGarceau](https://github.com/qasumitbagthariya), [@jeffpaul](https://github.com/vikrampm1), [@dkotter](https://github.com/dkotter), [@qasumitbagthariya](https://github.com/qasumitbagthariya) via [#84](https://github.com/mailchimp/wordpress/pull/84)).
86100
* **Removed:** Deprecated Sopresto code (props [@MaxwellGarceau](https://github.com/qasumitbagthariya), [@jeffpaul](https://github.com/vikrampm1), [@dkotter](https://github.com/dkotter) via [#98](https://github.com/mailchimp/wordpress/pull/98)).

tests/cypress/config.js

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
const { defineConfig } = require( 'cypress' );
2-
const { loadConfig } = require( '@wordpress/env/lib/config' );
3-
const getCacheDirectory = require( '@wordpress/env/lib/config/get-cache-directory' );
1+
const { defineConfig } = require('cypress');
2+
const { loadConfig } = require('@wordpress/env/lib/config');
3+
const getCacheDirectory = require('@wordpress/env/lib/config/get-cache-directory');
44
const dotenvPlugin = require('cypress-dotenv');
55

6-
module.exports = defineConfig( {
6+
module.exports = defineConfig({
77
chromeWebSecurity: false,
88
fixturesFolder: 'tests/cypress/fixtures',
99
screenshotsFolder: 'tests/cypress/screenshots',
@@ -13,21 +13,24 @@ module.exports = defineConfig( {
1313
reporter: 'mochawesome',
1414
reporterOptions: {
1515
mochaFile: 'mochawesome-[name]',
16-
reportDir: __dirname + '/reports',
16+
reportDir: `${__dirname}/reports`,
1717
overwrite: false,
1818
html: false,
1919
json: true,
2020
},
2121
e2e: {
22-
setupNodeEvents( on, config ) {
22+
setupNodeEvents(on, config) {
2323
config = dotenvPlugin(config, { path: '../../.env.test' }); // Load .env variables into Cypress
24-
return setBaseUrl( on, config );
24+
return setBaseUrl(on, config);
2525
},
2626
specPattern: [
27-
'tests/cypress/e2e/admin.test.js',
27+
'tests/cypress/e2e/settings/admin.test.js',
2828
'tests/cypress/e2e/connect.test.js',
29-
'tests/cypress/e2e/settings.test.js',
30-
'tests/cypress/e2e/mailchimp-block.test.js',
29+
'tests/cypress/e2e/settings/list.test.js',
30+
'tests/cypress/e2e/settings/settings.test.js',
31+
'tests/cypress/e2e/submission/**.test.js',
32+
'tests/cypress/e2e/validation/**.test.js',
33+
'tests/cypress/e2e/block.test.js',
3134
'tests/cypress/e2e/logout.test.js',
3235
],
3336
supportFile: 'tests/cypress/support/index.js',
@@ -38,23 +41,23 @@ module.exports = defineConfig( {
3841
runMode: 2,
3942
openMode: 0,
4043
},
41-
} );
44+
});
4245

4346
/**
4447
* Set WP URL as baseUrl in Cypress config.
4548
*
4649
* @param {Function} on function that used to register listeners on various events.
47-
* @param {Object} config Cypress Config object.
48-
* @return {Object} Updated Cypress Config object.
50+
* @param {object} config Cypress Config object.
51+
* @returns {object} Updated Cypress Config object.
4952
*/
50-
const setBaseUrl = async ( on, config ) => {
53+
const setBaseUrl = async (on, config) => {
5154
const cacheDirectory = await getCacheDirectory();
52-
const wpEnvConfig = await loadConfig( cacheDirectory );
55+
const wpEnvConfig = await loadConfig(cacheDirectory);
5356

54-
if ( wpEnvConfig ) {
57+
if (wpEnvConfig) {
5558
const port = wpEnvConfig.env.tests.port || null;
5659

57-
if ( port ) {
60+
if (port) {
5861
config.baseUrl = wpEnvConfig.env.tests.config.WP_SITEURL;
5962
}
6063
}

0 commit comments

Comments
 (0)