Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Merge branch 'trunk' into tt4/11328-featured-blocks-rounded-borders
Browse files Browse the repository at this point in the history
  • Loading branch information
sunyatasattva authored Oct 25, 2023
2 parents e15196e + 9d9f867 commit e93bac5
Show file tree
Hide file tree
Showing 11 changed files with 509 additions and 14 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "WooCommerce blocks for the Gutenberg editor.",
"homepage": "https://woocommerce.com/",
"type": "wordpress-plugin",
"version": "11.4.0-dev",
"version": "11.5.0-dev",
"keywords": [
"gutenberg",
"woocommerce",
Expand Down
392 changes: 392 additions & 0 deletions docs/internal-developers/testing/releases/1140.md

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions docs/internal-developers/testing/releases/1141.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Testing notes and ZIP for release 11.4.1

Zip file for testing: [woocommerce-gutenberg-products-block.zip](https://github.com/woocommerce/woocommerce-blocks/files/13166106/woocommerce-gutenberg-products-block.zip)

## WooCommerce Core

### Bug Fixes

#### Regenerate package

1. Add a new post.
2. Add the All Products block.
3. Make sure there are no errors in the editor or the page.
2 changes: 2 additions & 0 deletions docs/internal-developers/testing/releases/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ Every release includes specific testing instructions for new features and bug fi
- [11.2.0](./1120.md)
- [11.3.0](./1130.md)
- [11.3.1](./1131.md)
- [11.4.0](./1140.md)
- [11.4.1](./1141.md)

<!-- FEEDBACK -->

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@woocommerce/block-library",
"title": "WooCommerce Blocks",
"author": "Automattic",
"version": "11.4.0-dev",
"version": "11.5.0-dev",
"description": "WooCommerce blocks for the Gutenberg editor.",
"homepage": "https://github.com/woocommerce/woocommerce-gutenberg-products-block/",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion patterns/product-collection-4-columns.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<!-- wp:woocommerce/product-price {"isDescendentOfQueryLoop":true,"textAlign":"center","fontSize":"small"} /-->

<!-- wp:woocommerce/product-button {"textAlign":"center","isDescendentOfQueryLoop":true,"fontSize":"small"} /-->
<!-- wp:woocommerce/product-button {"textAlign":"center","isDescendentOfQueryLoop":true} /-->
<!-- /wp:woocommerce/product-template -->
</div>
<!-- /wp:woocommerce/product-collection -->
Expand Down
66 changes: 62 additions & 4 deletions readme.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
=== WooCommerce Blocks ===
Contributors: automattic, woocommerce, claudiulodro, tiagonoronha, jameskoster, ryelle, levinmedia, aljullu, mikejolley, nerrad, joshuawold, assassinateur, haszari, mppfeiffer, nielslange, opr18, ralucastn, tjcafferkey, danielwrobert, patriciahillebrandt, albarin, dinhtungdu, royho, imanish003, karolmanijak, sunyatasattva, alexandrelara, gigitux, danieldudzic, samueljseay, alexflorisca, opr18, tarunvijwani, pauloarromba, saadtarhi
Tags: gutenberg, woocommerce, woo commerce, products, blocks, woocommerce blocks
Requires at least: 6.3
Tested up to: 6.3
Requires PHP: 7.3
Stable tag: 11.3.1
Requires at least: 6.3.2
Tested up to: 6.3.2
Requires PHP: 7.4
Stable tag: 11.4.1
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -81,6 +81,64 @@ Release and roadmap notes available on the [WooCommerce Developers Blog](https:/

== Changelog ==

= 11.4.1 - 2023-10-25 =

#### Bug Fixes

- Regenerate package.

= 11.4.0 - 2023-10-24 =

#### Enhancements

- Store Customization: Update the "Large Footer" pattern. (https://github.com/woocommerce/woocommerce-blocks/pull/11381)
- Store Customization: Update the `Footer with 3 Menus` pattern. (https://github.com/woocommerce/woocommerce-blocks/pull/11356)
- Store Customization: Update the Social pattern. (https://github.com/woocommerce/woocommerce-blocks/pull/11355)
- Store Customization: Re-enable the `Product Hero 2 Column 2 Row` pattern. (https://github.com/woocommerce/woocommerce-blocks/pull/11346)
- Product Collection: Shrink columns to fit. (https://github.com/woocommerce/woocommerce-blocks/pull/11320)
- Store Customization: Adjust margins and paddings for the `Featured Category Triple`. (https://github.com/woocommerce/woocommerce-blocks/pull/11319)
- Move `Spinner` to components package. (https://github.com/woocommerce/woocommerce-blocks/pull/11317)
- Store Customization: Fix "Discount Banner" pattern. (https://github.com/woocommerce/woocommerce-blocks/pull/11315)
- Move `RadioControl`and `RadioControlAccordion` components to components package. (https://github.com/woocommerce/woocommerce-blocks/pull/11312)
- Store Customization: Fix the "Testimonials 3 Columns" title alignment. (https://github.com/woocommerce/woocommerce-blocks/pull/11281)
- Store Customization: Fix pattern spacing in homepage template 3. (https://github.com/woocommerce/woocommerce-blocks/pull/11279)
- Store Customization: Fix pattern spacing in homepage template 2. (https://github.com/woocommerce/woocommerce-blocks/pull/11278)
- Store Customization: Fix pattern spacing in homepage template 1. (https://github.com/woocommerce/woocommerce-blocks/pull/11268)
- Store Customization: Remove placeholder text from the image on the Hero Product Chessboard pattern. (https://github.com/woocommerce/woocommerce-blocks/pull/11250)
- Move `FormStep` to the components package. (https://github.com/woocommerce/woocommerce-blocks/pull/11246)
- Temporarily disable the `woocommerce-blocks/product-hero-2-col-2-row` pattern. (https://github.com/woocommerce/woocommerce-blocks/pull/11234)
- Add: `menu-order` orderby option for Product Attribute Terms route. (https://github.com/woocommerce/woocommerce-blocks/pull/11232)
- Move `FormattedMonetaryAmount` to the components package. (https://github.com/woocommerce/woocommerce-blocks/pull/11230)
- Cart and Checkout block transforms for classic shortcodes. (https://github.com/woocommerce/woocommerce-blocks/pull/11228)
- Use the <main> tag in Cart and Checkout templates. (https://github.com/woocommerce/woocommerce-blocks/pull/11224)
- Move `Chip` and `RemovableChip` to components package. (https://github.com/woocommerce/woocommerce-blocks/pull/11223)
- Move `CheckboxList` and create new `blocksComponents` package. (https://github.com/woocommerce/woocommerce-blocks/pull/11214)
- Store Customization MVP: Add fallbacks to all the pattern titles, descriptions and buttons. (https://github.com/woocommerce/woocommerce-blocks/pull/11208)
- Checkout Field Padding and Spacing. (https://github.com/woocommerce/woocommerce-blocks/pull/11207)
- Make patterns full width and fix margin. (https://github.com/woocommerce/woocommerce-blocks/pull/11206)
- Product Collection 5 Columns pattern: Update title and price to be rows instead of columns. (https://github.com/woocommerce/woocommerce-blocks/pull/11205)
- Product Collection: Featured Products 5 Columns: Remove no results block. (https://github.com/woocommerce/woocommerce-blocks/pull/11198)
- Add universal border radius for form elements and components. (https://github.com/woocommerce/woocommerce-blocks/pull/11193)
- Update wording on checkout error message to try to prevent retries. (https://github.com/woocommerce/woocommerce-blocks/pull/10888)

#### Bug Fixes

- Remove hardcoded queryIds from patterns that include Product Collection. (https://github.com/woocommerce/woocommerce-blocks/pull/11290)
- Fix: Mini-Cart block shows wrong total if theres multiple installs on the same domain. (https://github.com/woocommerce/woocommerce-blocks/pull/11257)
- Fix inconsistent border focus styles. (https://github.com/woocommerce/woocommerce-blocks/pull/11203)
- Product Gallery pattern: Use the Product Collection block. (https://github.com/woocommerce/woocommerce-blocks/pull/11194)
- Increase number of visible products when cart is empty. (https://github.com/woocommerce/woocommerce-blocks/pull/11182)
- Fix a bug in which shipping phone field was not being synced to the billing field. (https://github.com/woocommerce/woocommerce-blocks/pull/10603)
- Always show the `Enable the shipping calculator on the cart page` option. (https://github.com/woocommerce/woocommerce-blocks/pull/11421)

#### Documentation

- Add order and checkout order endpoint documentation. (https://github.com/woocommerce/woocommerce-blocks/pull/11157)

#### Various

- Add Local Pickup event and Cart/Checkout page views events. (https://github.com/woocommerce/woocommerce-blocks/pull/11225)

= 11.3.1 - 2023-10-16 =

#### Bug Fixes
Expand Down
36 changes: 33 additions & 3 deletions src/BlockPatterns.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ public function __construct( Package $package ) {
$this->patterns_path = $package->get_path( 'patterns' );

add_action( 'init', array( $this, 'register_block_patterns' ) );
add_action( 'update_option_woo_ai_describe_store_description', array( $this, 'schedule_patterns_content_update' ), 10, 2 );
add_action( 'update_option_woo_ai_describe_store_description', array( $this, 'schedule_on_option_update' ), 10, 2 );
add_action( 'upgrader_process_complete', array( $this, 'schedule_on_plugin_update' ), 10, 2 );
add_action( 'woocommerce_update_patterns_content', array( $this, 'update_patterns_content' ) );
}

Expand Down Expand Up @@ -211,7 +212,36 @@ public function register_block_patterns() {
* @param string $option The option name.
* @param string $value The option value.
*/
public function schedule_patterns_content_update( $option, $value ) {
public function schedule_on_option_update( $option, $value ) {
$this->schedule_patterns_content_update( $value );
}

/**
* Update the patterns content when the WooCommerce Blocks plugin is updated.
*
* @param \WP_Upgrader $upgrader_object WP_Upgrader instance.
* @param array $options Array of bulk item update data.
*/
public function schedule_on_plugin_update( $upgrader_object, $options ) {
if ( 'update' === $options['action'] && 'plugin' === $options['type'] ) {
foreach ( $options['plugins'] as $plugin ) {
if ( str_contains( $plugin, 'woocommerce-gutenberg-products-block.php' ) || str_contains( $plugin, 'woocommerce.php' ) ) {
$business_description = get_option( 'woo_ai_describe_store_description' );

if ( $business_description ) {
$this->schedule_patterns_content_update( $business_description );
}
}
}
}
}

/**
* Update the patterns content when the store description is changed.
*
* @param string $business_description The business description.
*/
public function schedule_patterns_content_update( $business_description ) {
if ( ! class_exists( 'WooCommerce' ) ) {
return;
}
Expand All @@ -224,7 +254,7 @@ public function schedule_patterns_content_update( $option, $value ) {

require_once $action_scheduler;

as_schedule_single_action( time(), 'woocommerce_update_patterns_content', array( $value ) );
as_schedule_single_action( time(), 'woocommerce_update_patterns_content', array( $business_description ) );
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/Package.php
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public static function container( $reset = false ) {
NewPackage::class,
function ( $container ) {
// leave for automated version bumping.
$version = '11.4.0-dev';
$version = '11.5.0-dev';
return new NewPackage(
$version,
dirname( __DIR__ ),
Expand Down
2 changes: 1 addition & 1 deletion woocommerce-gutenberg-products-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: WooCommerce Blocks
* Plugin URI: https://github.com/woocommerce/woocommerce-gutenberg-products-block
* Description: WooCommerce blocks for the Gutenberg editor.
* Version: 11.4.0-dev
* Version: 11.5.0-dev
* Author: Automattic
* Author URI: https://woocommerce.com
* Text Domain: woo-gutenberg-products-block
Expand Down

0 comments on commit e93bac5

Please sign in to comment.