WooCommerce Gutenberg Products Block - Version 8.5.1

Version Description

  • 2022-09-23 =

Bug Fixes

  • Ensure that scripts are loaded using absolute URLs to prevent loading issues with subfolder installs. (7211)
Download this release

Release Info

Developer automattic
Plugin Icon 128x128 WooCommerce Gutenberg Products Block
Version 8.5.1
Comparing to
See all releases

Code changes from version 8.5.0 to 8.5.1

readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: gutenberg, woocommerce, woo commerce, products, blocks, woocommerce blocks
4
  Requires at least: 6.0
5
  Tested up to: 6.0
6
  Requires PHP: 7.0
7
- Stable tag: 8.5.0
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -86,6 +86,12 @@ Release and roadmap notes available on the [WooCommerce Developers Blog](https:/
86
 
87
  == Changelog ==
88
 
 
 
 
 
 
 
89
  = 8.5.0 - 2022-09-12 =
90
 
91
  #### Enhancements
4
  Requires at least: 6.0
5
  Tested up to: 6.0
6
  Requires PHP: 7.0
7
+ Stable tag: 8.5.1
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
86
 
87
  == Changelog ==
88
 
89
+ = 8.5.1 - 2022-09-23 =
90
+
91
+ #### Bug Fixes
92
+
93
+ - Ensure that scripts are loaded using absolute URLs to prevent loading issues with subfolder installs. ([7211](https://github.com/woocommerce/woocommerce-blocks/pull/7211))
94
+
95
  = 8.5.0 - 2022-09-12 =
96
 
97
  #### Enhancements
src/AssetsController.php CHANGED
@@ -163,7 +163,7 @@ final class AssetsController {
163
  $dependencies,
164
  function( $src, $handle ) use ( $wp_scripts ) {
165
  if ( isset( $wp_scripts->registered[ $handle ] ) ) {
166
- $src[] = add_query_arg( 'ver', $wp_scripts->registered[ $handle ]->ver, $wp_scripts->registered[ $handle ]->src );
167
  $src = array_merge( $src, $this->get_script_dependency_src_array( $wp_scripts->registered[ $handle ]->deps ) );
168
  }
169
  return $src;
@@ -172,6 +172,20 @@ final class AssetsController {
172
  );
173
  }
174
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
175
  /**
176
  * Add body classes to the frontend and within admin.
177
  *
163
  $dependencies,
164
  function( $src, $handle ) use ( $wp_scripts ) {
165
  if ( isset( $wp_scripts->registered[ $handle ] ) ) {
166
+ $src[] = add_query_arg( 'ver', $wp_scripts->registered[ $handle ]->ver, $this->get_absolute_url( $wp_scripts->registered[ $handle ]->src ) );
167
  $src = array_merge( $src, $this->get_script_dependency_src_array( $wp_scripts->registered[ $handle ]->deps ) );
168
  }
169
  return $src;
172
  );
173
  }
174
 
175
+ /**
176
+ * Returns an absolute url to relative links for WordPress core scripts.
177
+ *
178
+ * @param string $src Original src that can be relative.
179
+ * @return string Correct full path string.
180
+ */
181
+ private function get_absolute_url( $src ) {
182
+ $wp_scripts = wp_scripts();
183
+ if ( ! preg_match( '|^(https?:)?//|', $src ) && ! ( $wp_scripts->content_url && 0 === strpos( $src, $wp_scripts->content_url ) ) ) {
184
+ $src = $wp_scripts->base_url . $src;
185
+ }
186
+ return $src;
187
+ }
188
+
189
  /**
190
  * Add body classes to the frontend and within admin.
191
  *
src/Package.php CHANGED
@@ -115,7 +115,7 @@ class Package {
115
  NewPackage::class,
116
  function ( $container ) {
117
  // leave for automated version bumping.
118
- $version = '8.5.0';
119
  return new NewPackage(
120
  $version,
121
  dirname( __DIR__ ),
115
  NewPackage::class,
116
  function ( $container ) {
117
  // leave for automated version bumping.
118
+ $version = '8.5.1';
119
  return new NewPackage(
120
  $version,
121
  dirname( __DIR__ ),
vendor/autoload.php CHANGED
@@ -9,4 +9,4 @@ if (PHP_VERSION_ID < 50600) {
9
 
10
  require_once __DIR__ . '/composer/autoload_real.php';
11
 
12
- return ComposerAutoloaderInitbdc6be99001fa43a7aff6265340678da::getLoader();
9
 
10
  require_once __DIR__ . '/composer/autoload_real.php';
11
 
12
+ return ComposerAutoloaderInit438eda88c484e2f834d3d8a5f671a2dd::getLoader();
vendor/autoload_packages.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpbdc6be99001fa43a7aff6265340678da;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp438eda88c484e2f834d3d8a5f671a2dd;
9
 
10
  // phpcs:ignore
11
 
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInitbdc6be99001fa43a7aff6265340678da
6
  {
7
  private static $loader;
8
 
@@ -22,18 +22,18 @@ class ComposerAutoloaderInitbdc6be99001fa43a7aff6265340678da
22
  return self::$loader;
23
  }
24
 
25
- spl_autoload_register(array('ComposerAutoloaderInitbdc6be99001fa43a7aff6265340678da', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
27
- spl_autoload_unregister(array('ComposerAutoloaderInitbdc6be99001fa43a7aff6265340678da', 'loadClassLoader'));
28
 
29
  require __DIR__ . '/autoload_static.php';
30
- call_user_func(\Composer\Autoload\ComposerStaticInitbdc6be99001fa43a7aff6265340678da::getInitializer($loader));
31
 
32
  $loader->register(true);
33
 
34
- $includeFiles = \Composer\Autoload\ComposerStaticInitbdc6be99001fa43a7aff6265340678da::$files;
35
  foreach ($includeFiles as $fileIdentifier => $file) {
36
- composerRequirebdc6be99001fa43a7aff6265340678da($fileIdentifier, $file);
37
  }
38
 
39
  return $loader;
@@ -45,7 +45,7 @@ class ComposerAutoloaderInitbdc6be99001fa43a7aff6265340678da
45
  * @param string $file
46
  * @return void
47
  */
48
- function composerRequirebdc6be99001fa43a7aff6265340678da($fileIdentifier, $file)
49
  {
50
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
51
  $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInit438eda88c484e2f834d3d8a5f671a2dd
6
  {
7
  private static $loader;
8
 
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInit438eda88c484e2f834d3d8a5f671a2dd', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
27
+ spl_autoload_unregister(array('ComposerAutoloaderInit438eda88c484e2f834d3d8a5f671a2dd', 'loadClassLoader'));
28
 
29
  require __DIR__ . '/autoload_static.php';
30
+ call_user_func(\Composer\Autoload\ComposerStaticInit438eda88c484e2f834d3d8a5f671a2dd::getInitializer($loader));
31
 
32
  $loader->register(true);
33
 
34
+ $includeFiles = \Composer\Autoload\ComposerStaticInit438eda88c484e2f834d3d8a5f671a2dd::$files;
35
  foreach ($includeFiles as $fileIdentifier => $file) {
36
+ composerRequire438eda88c484e2f834d3d8a5f671a2dd($fileIdentifier, $file);
37
  }
38
 
39
  return $loader;
45
  * @param string $file
46
  * @return void
47
  */
48
+ function composerRequire438eda88c484e2f834d3d8a5f671a2dd($fileIdentifier, $file)
49
  {
50
  if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
51
  $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInitbdc6be99001fa43a7aff6265340678da
8
  {
9
  public static $files = array (
10
  'fcd5d7d87e03ff4f5b5a66c2b8968671' => __DIR__ . '/../..' . '/src/StoreApi/deprecated.php',
@@ -51,9 +51,9 @@ class ComposerStaticInitbdc6be99001fa43a7aff6265340678da
51
  public static function getInitializer(ClassLoader $loader)
52
  {
53
  return \Closure::bind(function () use ($loader) {
54
- $loader->prefixLengthsPsr4 = ComposerStaticInitbdc6be99001fa43a7aff6265340678da::$prefixLengthsPsr4;
55
- $loader->prefixDirsPsr4 = ComposerStaticInitbdc6be99001fa43a7aff6265340678da::$prefixDirsPsr4;
56
- $loader->classMap = ComposerStaticInitbdc6be99001fa43a7aff6265340678da::$classMap;
57
 
58
  }, null, ClassLoader::class);
59
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInit438eda88c484e2f834d3d8a5f671a2dd
8
  {
9
  public static $files = array (
10
  'fcd5d7d87e03ff4f5b5a66c2b8968671' => __DIR__ . '/../..' . '/src/StoreApi/deprecated.php',
51
  public static function getInitializer(ClassLoader $loader)
52
  {
53
  return \Closure::bind(function () use ($loader) {
54
+ $loader->prefixLengthsPsr4 = ComposerStaticInit438eda88c484e2f834d3d8a5f671a2dd::$prefixLengthsPsr4;
55
+ $loader->prefixDirsPsr4 = ComposerStaticInit438eda88c484e2f834d3d8a5f671a2dd::$prefixDirsPsr4;
56
+ $loader->classMap = ComposerStaticInit438eda88c484e2f834d3d8a5f671a2dd::$classMap;
57
 
58
  }, null, ClassLoader::class);
59
  }
vendor/composer/installed.php CHANGED
@@ -3,7 +3,7 @@
3
  'name' => 'woocommerce/woocommerce-blocks',
4
  'pretty_version' => 'dev-trunk',
5
  'version' => 'dev-trunk',
6
- 'reference' => '6d58dfdd73c988272bbfd2a3a46ab65bed9ca9e7',
7
  'type' => 'wordpress-plugin',
8
  'install_path' => __DIR__ . '/../../',
9
  'aliases' => array(),
@@ -43,7 +43,7 @@
43
  'woocommerce/woocommerce-blocks' => array(
44
  'pretty_version' => 'dev-trunk',
45
  'version' => 'dev-trunk',
46
- 'reference' => '6d58dfdd73c988272bbfd2a3a46ab65bed9ca9e7',
47
  'type' => 'wordpress-plugin',
48
  'install_path' => __DIR__ . '/../../',
49
  'aliases' => array(),
3
  'name' => 'woocommerce/woocommerce-blocks',
4
  'pretty_version' => 'dev-trunk',
5
  'version' => 'dev-trunk',
6
+ 'reference' => 'e3262734a10a54b44dcf879451ce35f53b93c184',
7
  'type' => 'wordpress-plugin',
8
  'install_path' => __DIR__ . '/../../',
9
  'aliases' => array(),
43
  'woocommerce/woocommerce-blocks' => array(
44
  'pretty_version' => 'dev-trunk',
45
  'version' => 'dev-trunk',
46
+ 'reference' => 'e3262734a10a54b44dcf879451ce35f53b93c184',
47
  'type' => 'wordpress-plugin',
48
  'install_path' => __DIR__ . '/../../',
49
  'aliases' => array(),
vendor/composer/jetpack_autoload_filemap.php CHANGED
@@ -7,11 +7,11 @@ $baseDir = dirname($vendorDir);
7
 
8
  return array(
9
  'fcd5d7d87e03ff4f5b5a66c2b8968671' => array(
10
- 'version' => '8.5.0.0',
11
  'path' => $baseDir . '/src/StoreApi/deprecated.php'
12
  ),
13
  'd0f16a186498c2ba04f1d0064fecf9cf' => array(
14
- 'version' => '8.5.0.0',
15
  'path' => $baseDir . '/src/StoreApi/functions.php'
16
  ),
17
  );
7
 
8
  return array(
9
  'fcd5d7d87e03ff4f5b5a66c2b8968671' => array(
10
+ 'version' => '8.5.1.0',
11
  'path' => $baseDir . '/src/StoreApi/deprecated.php'
12
  ),
13
  'd0f16a186498c2ba04f1d0064fecf9cf' => array(
14
+ 'version' => '8.5.1.0',
15
  'path' => $baseDir . '/src/StoreApi/functions.php'
16
  ),
17
  );
vendor/composer/jetpack_autoload_psr4.php CHANGED
@@ -11,15 +11,15 @@ return array(
11
  'path' => array( $vendorDir . '/composer/installers/src/Composer/Installers' )
12
  ),
13
  'Automattic\\WooCommerce\\StoreApi\\' => array(
14
- 'version' => '8.5.0.0',
15
  'path' => array( $baseDir . '/src/StoreApi' )
16
  ),
17
  'Automattic\\WooCommerce\\Blocks\\Tests\\' => array(
18
- 'version' => '8.5.0.0',
19
  'path' => array( $baseDir . '/tests/php' )
20
  ),
21
  'Automattic\\WooCommerce\\Blocks\\' => array(
22
- 'version' => '8.5.0.0',
23
  'path' => array( $baseDir . '/src' )
24
  ),
25
  'Automattic\\Jetpack\\Autoloader\\' => array(
11
  'path' => array( $vendorDir . '/composer/installers/src/Composer/Installers' )
12
  ),
13
  'Automattic\\WooCommerce\\StoreApi\\' => array(
14
+ 'version' => '8.5.1.0',
15
  'path' => array( $baseDir . '/src/StoreApi' )
16
  ),
17
  'Automattic\\WooCommerce\\Blocks\\Tests\\' => array(
18
+ 'version' => '8.5.1.0',
19
  'path' => array( $baseDir . '/tests/php' )
20
  ),
21
  'Automattic\\WooCommerce\\Blocks\\' => array(
22
+ 'version' => '8.5.1.0',
23
  'path' => array( $baseDir . '/src' )
24
  ),
25
  'Automattic\\Jetpack\\Autoloader\\' => array(
vendor/jetpack-autoloader/class-autoloader-handler.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpbdc6be99001fa43a7aff6265340678da;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp438eda88c484e2f834d3d8a5f671a2dd;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-autoloader-locator.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpbdc6be99001fa43a7aff6265340678da;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp438eda88c484e2f834d3d8a5f671a2dd;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-autoloader.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpbdc6be99001fa43a7aff6265340678da;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp438eda88c484e2f834d3d8a5f671a2dd;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-container.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpbdc6be99001fa43a7aff6265340678da;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp438eda88c484e2f834d3d8a5f671a2dd;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-hook-manager.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpbdc6be99001fa43a7aff6265340678da;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp438eda88c484e2f834d3d8a5f671a2dd;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-latest-autoloader-guard.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpbdc6be99001fa43a7aff6265340678da;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp438eda88c484e2f834d3d8a5f671a2dd;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-manifest-reader.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpbdc6be99001fa43a7aff6265340678da;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp438eda88c484e2f834d3d8a5f671a2dd;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-path-processor.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpbdc6be99001fa43a7aff6265340678da;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp438eda88c484e2f834d3d8a5f671a2dd;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-php-autoloader.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpbdc6be99001fa43a7aff6265340678da;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp438eda88c484e2f834d3d8a5f671a2dd;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-plugin-locator.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpbdc6be99001fa43a7aff6265340678da;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp438eda88c484e2f834d3d8a5f671a2dd;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-plugins-handler.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpbdc6be99001fa43a7aff6265340678da;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp438eda88c484e2f834d3d8a5f671a2dd;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-shutdown-handler.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpbdc6be99001fa43a7aff6265340678da;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp438eda88c484e2f834d3d8a5f671a2dd;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-version-loader.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpbdc6be99001fa43a7aff6265340678da;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp438eda88c484e2f834d3d8a5f671a2dd;
9
 
10
  // phpcs:ignore
11
 
vendor/jetpack-autoloader/class-version-selector.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jpbdc6be99001fa43a7aff6265340678da;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jp438eda88c484e2f834d3d8a5f671a2dd;
9
 
10
  // phpcs:ignore
11
 
woocommerce-gutenberg-products-block.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WooCommerce Blocks
4
  * Plugin URI: https://github.com/woocommerce/woocommerce-gutenberg-products-block
5
  * Description: WooCommerce blocks for the Gutenberg editor.
6
- * Version: 8.5.0
7
  * Author: Automattic
8
  * Author URI: https://woocommerce.com
9
  * Text Domain: woo-gutenberg-products-block
3
  * Plugin Name: WooCommerce Blocks
4
  * Plugin URI: https://github.com/woocommerce/woocommerce-gutenberg-products-block
5
  * Description: WooCommerce blocks for the Gutenberg editor.
6
+ * Version: 8.5.1
7
  * Author: Automattic
8
  * Author URI: https://woocommerce.com
9
  * Text Domain: woo-gutenberg-products-block