@automattic/newspack-blocks 4.27.0 → 4.27.1-hotfix-remove-hidden-checkout-fields.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## @automattic/newspack-blocks [4.27.1-hotfix-remove-hidden-checkout-fields.1](https://github.com/Automattic/newspack-workspace/compare/newspack-blocks@4.27.0...newspack-blocks@4.27.1-hotfix-remove-hidden-checkout-fields.1) (2026-07-09)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* **blocks:** fully remove configured-off checkout fields (NPPM-2937) ([e7f1f71](https://github.com/Automattic/newspack-workspace/commit/e7f1f7165afc8e08c27c0e6e5c7b2c61c14b6367))
|
|
7
|
+
|
|
1
8
|
# @automattic/newspack-blocks [4.27.0](https://github.com/Automattic/newspack-workspace/compare/newspack-blocks@4.26.8...newspack-blocks@4.27.0) (2026-07-08)
|
|
2
9
|
|
|
3
10
|
|
|
@@ -1332,19 +1332,26 @@ final class Modal_Checkout {
|
|
|
1332
1332
|
}
|
|
1333
1333
|
|
|
1334
1334
|
/**
|
|
1335
|
-
*
|
|
1335
|
+
* Remove the configured-off billing fields from checkout.
|
|
1336
|
+
*
|
|
1337
|
+
* Not limited to modal checkout requests (NPPM-2937): the fields must be
|
|
1338
|
+
* unregistered wherever WooCommerce renders or validates them. When they were
|
|
1339
|
+
* only removed from the modal render, they stayed registered on the standard
|
|
1340
|
+
* checkout page, and express checkout wallets (e.g. Apple Pay) would populate
|
|
1341
|
+
* and fail validation on fields the buyer could not see or edit.
|
|
1336
1342
|
*
|
|
1337
1343
|
* @param array $fields Checkout fields.
|
|
1338
1344
|
*
|
|
1339
1345
|
* @return array
|
|
1340
1346
|
*/
|
|
1341
1347
|
public static function woocommerce_checkout_fields( $fields ) {
|
|
1342
|
-
|
|
1348
|
+
// My Account checkouts relax required flags instead of removing fields.
|
|
1349
|
+
if ( method_exists( 'Newspack\WooCommerce_My_Account', 'is_from_my_account' ) && \Newspack\WooCommerce_My_Account::is_from_my_account() ) {
|
|
1343
1350
|
return $fields;
|
|
1344
1351
|
}
|
|
1345
1352
|
$cart = \WC()->cart;
|
|
1346
|
-
// Don't modify fields if shipping is required.
|
|
1347
|
-
if ( $cart->needs_shipping_address() ) {
|
|
1353
|
+
// Don't modify fields if there is no cart or shipping is required.
|
|
1354
|
+
if ( ! $cart || $cart->needs_shipping_address() ) {
|
|
1348
1355
|
return $fields;
|
|
1349
1356
|
}
|
|
1350
1357
|
/**
|
package/newspack-blocks.php
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* Author URI: https://newspack.com/
|
|
8
8
|
* Text Domain: newspack-blocks
|
|
9
9
|
* Domain Path: /languages
|
|
10
|
-
* Version: 4.27.
|
|
10
|
+
* Version: 4.27.1-hotfix-remove-hidden-checkout-fields.1
|
|
11
11
|
*
|
|
12
12
|
* @package Newspack_Blocks
|
|
13
13
|
*/
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
define( 'NEWSPACK_BLOCKS__PLUGIN_FILE', __FILE__ );
|
|
16
16
|
define( 'NEWSPACK_BLOCKS__BLOCKS_DIRECTORY', 'dist/' );
|
|
17
17
|
define( 'NEWSPACK_BLOCKS__PLUGIN_DIR', plugin_dir_path( NEWSPACK_BLOCKS__PLUGIN_FILE ) );
|
|
18
|
-
define( 'NEWSPACK_BLOCKS__VERSION', '4.27.
|
|
18
|
+
define( 'NEWSPACK_BLOCKS__VERSION', '4.27.1-hotfix-remove-hidden-checkout-fields.1' );
|
|
19
19
|
|
|
20
20
|
require_once NEWSPACK_BLOCKS__PLUGIN_DIR . 'includes/class-newspack-blocks.php';
|
|
21
21
|
require_once NEWSPACK_BLOCKS__PLUGIN_DIR . 'includes/class-newspack-blocks-api.php';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automattic/newspack-blocks",
|
|
3
|
-
"version": "4.27.
|
|
3
|
+
"version": "4.27.1-hotfix-remove-hidden-checkout-fields.1",
|
|
4
4
|
"author": "Automattic",
|
|
5
5
|
"description": "=== Newspack Blocks === Contributors: (this should be a list of wordpress.org userid's) Donate link: https://example.com/ Tags: comments, spam Requires at least: 4.5 Tested up to: 5.1.1 Stable tag: 0.1.0 License: GPLv2 or later License URI: https://www.gnu.org/licenses/gpl-2.0.html",
|
|
6
6
|
"repository": {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
'name' => 'automattic/newspack-blocks',
|
|
4
4
|
'pretty_version' => 'dev-main',
|
|
5
5
|
'version' => 'dev-main',
|
|
6
|
-
'reference' => '
|
|
6
|
+
'reference' => 'e0a029d3f7ce289cb193c6d41b8130b5460ab7fc',
|
|
7
7
|
'type' => 'wordpress-plugin',
|
|
8
8
|
'install_path' => __DIR__ . '/../../',
|
|
9
9
|
'aliases' => array(),
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
'automattic/newspack-blocks' => array(
|
|
14
14
|
'pretty_version' => 'dev-main',
|
|
15
15
|
'version' => 'dev-main',
|
|
16
|
-
'reference' => '
|
|
16
|
+
'reference' => 'e0a029d3f7ce289cb193c6d41b8130b5460ab7fc',
|
|
17
17
|
'type' => 'wordpress-plugin',
|
|
18
18
|
'install_path' => __DIR__ . '/../../',
|
|
19
19
|
'aliases' => array(),
|