WooCommerce Gutenberg Products Block - Version 6.0.1

Version Description

  • 2021-10-29 =

Bug Fixes

  • Support custom classes and alignment when updating Checkout block.
Download this release

Release Info

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

Code changes from version 6.0.0 to 6.0.1

readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: gutenberg, woocommerce, woo commerce, products, blocks, woocommerce blocks
4
  Requires at least: 5.8
5
  Tested up to: 5.8
6
  Requires PHP: 7.0
7
- Stable tag: 6.0.0
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -85,7 +85,13 @@ Release and roadmap notes available on the [WooCommerce Developers Blog](https:/
85
 
86
  == Changelog ==
87
 
88
- = 5.6.0 - 2021-10-28 =
 
 
 
 
 
 
89
 
90
  #### Enhancements
91
 
@@ -107,11 +113,11 @@ Release and roadmap notes available on the [WooCommerce Developers Blog](https:/
107
  - Removed `receiveCart` method that was exposed in a couple of SlotFills by mistake. ([4730](https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4730))
108
  - Fix calculation of number of reviews in the Reviews by Category block. ([4729](https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4729))
109
 
110
- #### documentation
111
 
112
  - Add documentation for registerPaymentMethodExtensionCallbacks. ([4834](https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4834))
113
 
114
- #### dependencies
115
 
116
  - Removed `wp-blocks` dependency from several frontend scripts. ([4767](https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4767))
117
 
4
  Requires at least: 5.8
5
  Tested up to: 5.8
6
  Requires PHP: 7.0
7
+ Stable tag: 6.0.1
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
85
 
86
  == Changelog ==
87
 
88
+ = 6.0.1 - 2021-10-29 =
89
+
90
+ #### Bug Fixes
91
+
92
+ - Support custom classes and alignment when updating Checkout block.
93
+
94
+ = 6.0.0 - 2021-10-28 =
95
 
96
  #### Enhancements
97
 
113
  - Removed `receiveCart` method that was exposed in a couple of SlotFills by mistake. ([4730](https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4730))
114
  - Fix calculation of number of reviews in the Reviews by Category block. ([4729](https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4729))
115
 
116
+ #### Documentation
117
 
118
  - Add documentation for registerPaymentMethodExtensionCallbacks. ([4834](https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4834))
119
 
120
+ #### Performance
121
 
122
  - Removed `wp-blocks` dependency from several frontend scripts. ([4767](https://github.com/woocommerce/woocommerce-gutenberg-products-block/pull/4767))
123
 
src/BlockTypes/Checkout.php CHANGED
@@ -77,13 +77,14 @@ class Checkout extends AbstractBlock {
77
  wp_dequeue_style( 'select2' );
78
 
79
  // If the content is empty, we may have transformed from an older checkout block. Insert the default list of blocks.
80
- $is_empty = strstr( $content, '<div class="wp-block-woocommerce-checkout is-loading"></div>' );
 
 
81
 
82
  if ( $is_empty ) {
83
- $content = '<div class="wp-block-woocommerce-checkout is-loading">
84
- <div data-block-name="woocommerce/checkout-fields-block" class="wp-block-woocommerce-checkout-fields-block"></div>
85
- <div data-block-name="woocommerce/checkout-totals-block" class="wp-block-woocommerce-checkout-totals-block"></div>
86
- </div>';
87
  }
88
 
89
  return $this->inject_html_data_attributes( $content, $attributes );
77
  wp_dequeue_style( 'select2' );
78
 
79
  // If the content is empty, we may have transformed from an older checkout block. Insert the default list of blocks.
80
+ $regex_for_empty_block = '/<div class="[a-zA-Z0-9_\- ]*wp-block-woocommerce-checkout[a-zA-Z0-9_\- ]*"><\/div>/mi';
81
+
82
+ $is_empty = preg_match( $regex_for_empty_block, $content );
83
 
84
  if ( $is_empty ) {
85
+ $inner_blocks_html = '<div data-block-name="woocommerce/checkout-fields-block" class="wp-block-woocommerce-checkout-fields-block"></div><div data-block-name="woocommerce/checkout-totals-block" class="wp-block-woocommerce-checkout-totals-block"></div>';
86
+
87
+ $content = str_replace( '</div>', $inner_blocks_html . '</div>', $content );
 
88
  }
89
 
90
  return $this->inject_html_data_attributes( $content, $attributes );
src/Package.php CHANGED
@@ -106,7 +106,7 @@ class Package {
106
  NewPackage::class,
107
  function ( $container ) {
108
  // leave for automated version bumping.
109
- $version = '6.0.0';
110
  return new NewPackage(
111
  $version,
112
  dirname( __DIR__ ),
106
  NewPackage::class,
107
  function ( $container ) {
108
  // leave for automated version bumping.
109
+ $version = '6.0.1';
110
  return new NewPackage(
111
  $version,
112
  dirname( __DIR__ ),
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit97e8bfef4e853be9d72a96b8a6e2cba4::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInite3060c1e47be4fd74897ffe404bfe378::getLoader();
vendor/autoload_packages.php CHANGED
@@ -5,7 +5,7 @@
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
- namespace Automattic\Jetpack\Autoloader\jp97e8bfef4e853be9d72a96b8a6e2cba4;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jpe3060c1e47be4fd74897ffe404bfe378;
9
 
10
  // phpcs:ignore
11
 
vendor/composer/InstalledVersions.php CHANGED
@@ -32,7 +32,7 @@ private static $installed = array (
32
  'aliases' =>
33
  array (
34
  ),
35
- 'reference' => '71146c1aa2eb9fd2d898187ba52bca6151a05b30',
36
  'name' => 'woocommerce/woocommerce-blocks',
37
  ),
38
  'versions' =>
@@ -76,7 +76,7 @@ private static $installed = array (
76
  'aliases' =>
77
  array (
78
  ),
79
- 'reference' => '71146c1aa2eb9fd2d898187ba52bca6151a05b30',
80
  ),
81
  ),
82
  );
32
  'aliases' =>
33
  array (
34
  ),
35
+ 'reference' => 'fbbe5857adc870276ea1783a4ea51dc6f94528ac',
36
  'name' => 'woocommerce/woocommerce-blocks',
37
  ),
38
  'versions' =>
76
  'aliases' =>
77
  array (
78
  ),
79
+ 'reference' => 'fbbe5857adc870276ea1783a4ea51dc6f94528ac',
80
  ),
81
  ),
82
  );
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit97e8bfef4e853be9d72a96b8a6e2cba4
6
  {
7
  private static $loader;
8
 
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit97e8bfef4e853be9d72a96b8a6e2cba4
22
  return self::$loader;
23
  }
24
 
25
- spl_autoload_register(array('ComposerAutoloaderInit97e8bfef4e853be9d72a96b8a6e2cba4', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
27
- spl_autoload_unregister(array('ComposerAutoloaderInit97e8bfef4e853be9d72a96b8a6e2cba4', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require __DIR__ . '/autoload_static.php';
32
 
33
- call_user_func(\Composer\Autoload\ComposerStaticInit97e8bfef4e853be9d72a96b8a6e2cba4::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInite3060c1e47be4fd74897ffe404bfe378
6
  {
7
  private static $loader;
8
 
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInite3060c1e47be4fd74897ffe404bfe378', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
27
+ spl_autoload_unregister(array('ComposerAutoloaderInite3060c1e47be4fd74897ffe404bfe378', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require __DIR__ . '/autoload_static.php';
32
 
33
+ call_user_func(\Composer\Autoload\ComposerStaticInite3060c1e47be4fd74897ffe404bfe378::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInit97e8bfef4e853be9d72a96b8a6e2cba4
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'C' =>
@@ -46,9 +46,9 @@ class ComposerStaticInit97e8bfef4e853be9d72a96b8a6e2cba4
46
  public static function getInitializer(ClassLoader $loader)
47
  {
48
  return \Closure::bind(function () use ($loader) {
49
- $loader->prefixLengthsPsr4 = ComposerStaticInit97e8bfef4e853be9d72a96b8a6e2cba4::$prefixLengthsPsr4;
50
- $loader->prefixDirsPsr4 = ComposerStaticInit97e8bfef4e853be9d72a96b8a6e2cba4::$prefixDirsPsr4;
51
- $loader->classMap = ComposerStaticInit97e8bfef4e853be9d72a96b8a6e2cba4::$classMap;
52
 
53
  }, null, ClassLoader::class);
54
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInite3060c1e47be4fd74897ffe404bfe378
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'C' =>
46
  public static function getInitializer(ClassLoader $loader)
47
  {
48
  return \Closure::bind(function () use ($loader) {
49
+ $loader->prefixLengthsPsr4 = ComposerStaticInite3060c1e47be4fd74897ffe404bfe378::$prefixLengthsPsr4;
50
+ $loader->prefixDirsPsr4 = ComposerStaticInite3060c1e47be4fd74897ffe404bfe378::$prefixDirsPsr4;
51
+ $loader->classMap = ComposerStaticInite3060c1e47be4fd74897ffe404bfe378::$classMap;
52
 
53
  }, null, ClassLoader::class);
54
  }
vendor/composer/installed.php CHANGED
@@ -6,7 +6,7 @@
6
  'aliases' =>
7
  array (
8
  ),
9
- 'reference' => '71146c1aa2eb9fd2d898187ba52bca6151a05b30',
10
  'name' => 'woocommerce/woocommerce-blocks',
11
  ),
12
  'versions' =>
@@ -50,7 +50,7 @@
50
  'aliases' =>
51
  array (
52
  ),
53
- 'reference' => '71146c1aa2eb9fd2d898187ba52bca6151a05b30',
54
  ),
55
  ),
56
  );
6
  'aliases' =>
7
  array (
8
  ),
9
+ 'reference' => 'fbbe5857adc870276ea1783a4ea51dc6f94528ac',
10
  'name' => 'woocommerce/woocommerce-blocks',
11
  ),
12
  'versions' =>
50
  'aliases' =>
51
  array (
52
  ),
53
+ 'reference' => 'fbbe5857adc870276ea1783a4ea51dc6f94528ac',
54
  ),
55
  ),
56
  );
vendor/composer/jetpack_autoload_psr4.php CHANGED
@@ -11,11 +11,11 @@ return array(
11
  'path' => array( $vendorDir . '/composer/installers/src/Composer/Installers' )
12
  ),
13
  'Automattic\\WooCommerce\\Blocks\\Tests\\' => array(
14
- 'version' => '6.0.0.0',
15
  'path' => array( $baseDir . '/tests/php' )
16
  ),
17
  'Automattic\\WooCommerce\\Blocks\\' => array(
18
- 'version' => '6.0.0.0',
19
  'path' => array( $baseDir . '/src' )
20
  ),
21
  'Automattic\\Jetpack\\Autoloader\\' => array(
11
  'path' => array( $vendorDir . '/composer/installers/src/Composer/Installers' )
12
  ),
13
  'Automattic\\WooCommerce\\Blocks\\Tests\\' => array(
14
+ 'version' => '6.0.1.0',
15
  'path' => array( $baseDir . '/tests/php' )
16
  ),
17
  'Automattic\\WooCommerce\\Blocks\\' => array(
18
+ 'version' => '6.0.1.0',
19
  'path' => array( $baseDir . '/src' )
20
  ),
21
  '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\jp97e8bfef4e853be9d72a96b8a6e2cba4;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jpe3060c1e47be4fd74897ffe404bfe378;
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\jp97e8bfef4e853be9d72a96b8a6e2cba4;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jpe3060c1e47be4fd74897ffe404bfe378;
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\jp97e8bfef4e853be9d72a96b8a6e2cba4;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jpe3060c1e47be4fd74897ffe404bfe378;
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\jp97e8bfef4e853be9d72a96b8a6e2cba4;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jpe3060c1e47be4fd74897ffe404bfe378;
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\jp97e8bfef4e853be9d72a96b8a6e2cba4;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jpe3060c1e47be4fd74897ffe404bfe378;
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\jp97e8bfef4e853be9d72a96b8a6e2cba4;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jpe3060c1e47be4fd74897ffe404bfe378;
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\jp97e8bfef4e853be9d72a96b8a6e2cba4;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jpe3060c1e47be4fd74897ffe404bfe378;
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\jp97e8bfef4e853be9d72a96b8a6e2cba4;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jpe3060c1e47be4fd74897ffe404bfe378;
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\jp97e8bfef4e853be9d72a96b8a6e2cba4;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jpe3060c1e47be4fd74897ffe404bfe378;
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\jp97e8bfef4e853be9d72a96b8a6e2cba4;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jpe3060c1e47be4fd74897ffe404bfe378;
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\jp97e8bfef4e853be9d72a96b8a6e2cba4;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jpe3060c1e47be4fd74897ffe404bfe378;
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\jp97e8bfef4e853be9d72a96b8a6e2cba4;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jpe3060c1e47be4fd74897ffe404bfe378;
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\jp97e8bfef4e853be9d72a96b8a6e2cba4;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jpe3060c1e47be4fd74897ffe404bfe378;
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\jp97e8bfef4e853be9d72a96b8a6e2cba4;
9
 
10
  // phpcs:ignore
11
 
5
  * @package automattic/jetpack-autoloader
6
  */
7
 
8
+ namespace Automattic\Jetpack\Autoloader\jpe3060c1e47be4fd74897ffe404bfe378;
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: 6.0.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: 6.0.1
7
  * Author: Automattic
8
  * Author URI: https://woocommerce.com
9
  * Text Domain: woo-gutenberg-products-block