@automattic/newspack-blocks 4.28.1-hotfix-blocks-input-validation.2 → 4.28.1-hotfix-blocks-input-validation.3

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,9 +1,9 @@
1
- ## @automattic/newspack-blocks [4.28.1-hotfix-blocks-input-validation.2](https://github.com/Automattic/newspack-workspace/compare/newspack-blocks@4.28.1-hotfix-blocks-input-validation.1...newspack-blocks@4.28.1-hotfix-blocks-input-validation.2) (2026-07-31)
1
+ ## @automattic/newspack-blocks [4.28.1-hotfix-blocks-input-validation.3](https://github.com/Automattic/newspack-workspace/compare/newspack-blocks@4.28.1-hotfix-blocks-input-validation.2...newspack-blocks@4.28.1-hotfix-blocks-input-validation.3) (2026-08-03)
2
2
 
3
3
 
4
4
  ### Bug Fixes
5
5
 
6
- * **blocks:** close after-success dead ends and tighten write checks ([12e6bd8](https://github.com/Automattic/newspack-workspace/commit/12e6bd898d28eaf4fb6a59633f99b297febc308f))
6
+ * **blocks:** announce refused post-checkout destinations ([d6607c0](https://github.com/Automattic/newspack-workspace/commit/d6607c0984ebe86697f43b701f86955c2fa06360))
7
7
 
8
8
  # @automattic/newspack-blocks [4.28.0](https://github.com/Automattic/newspack-workspace/compare/newspack-blocks@4.27.1...newspack-blocks@4.28.0) (2026-07-20)
9
9
 
@@ -1226,7 +1226,22 @@ final class Modal_Checkout {
1226
1226
  $url = str_replace( '://' . $host, '://' . strtolower( $host ), $url );
1227
1227
  }
1228
1228
 
1229
- return (string) wp_validate_redirect( $url, '' );
1229
+ $validated = (string) wp_validate_redirect( $url, '' );
1230
+
1231
+ if ( '' === $validated ) {
1232
+ /**
1233
+ * Fires when a post-checkout destination is refused.
1234
+ *
1235
+ * The reader is sent nowhere and the modal simply closes, which looks the same
1236
+ * as a publisher not configuring a destination at all. This is the hook to
1237
+ * watch if you need to tell those two apart.
1238
+ *
1239
+ * @param string $url The refused destination.
1240
+ */
1241
+ do_action( 'newspack_blocks_after_success_url_rejected', $url );
1242
+ }
1243
+
1244
+ return $validated;
1230
1245
  }
1231
1246
 
1232
1247
  /**
@@ -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.28.1-hotfix-blocks-input-validation.2
10
+ * Version: 4.28.1-hotfix-blocks-input-validation.3
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.28.1-hotfix-blocks-input-validation.2' );
18
+ define( 'NEWSPACK_BLOCKS__VERSION', '4.28.1-hotfix-blocks-input-validation.3' );
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.28.1-hotfix-blocks-input-validation.2",
3
+ "version": "4.28.1-hotfix-blocks-input-validation.3",
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' => '12e6bd898d28eaf4fb6a59633f99b297febc308f',
6
+ 'reference' => 'd6607c0984ebe86697f43b701f86955c2fa06360',
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' => '12e6bd898d28eaf4fb6a59633f99b297febc308f',
16
+ 'reference' => 'd6607c0984ebe86697f43b701f86955c2fa06360',
17
17
  'type' => 'wordpress-plugin',
18
18
  'install_path' => __DIR__ . '/../../',
19
19
  'aliases' => array(),