Changelog

  • A new version of WooCommerce Blocks has been released! Version 8.8.2 is now available for download from GitHub and WordPress.org.

    In this minor release, we focused on improving the way blocks integrate with block themes and dark backgrounds!

    Filter by Price block

    The price slider looks better on dark themes:

    Before
    After

    Also, we improved the price slider ‘inactive’ range:

    Before
    After

    Filter by Attribute block

    The dropdown is legible on dark backgrounds:

    Before
    After

    Mini Cart block

    The Mini Cart drawer uses the background color of the body element as the default background color:

    Before
    After

    Changelog

    Enhancements

    • Fix Mini Cart Global Styles. 7515
    • Fix inconsistent button styling with TT3. (7516)
    • Make the Filter by Price block range color dependent of the theme color. 7525
    • Filter by Price block: fix price slider visibility on dark themes. 7527
    • Update the Mini Cart block drawer to honor the theme’s background. 7510
    • Add white background to Filter by Attribute block dropdown so text is legible in dark backgrounds. 7506

  • A new version of WooCommerce Blocks has been released! Version 8.8.1 is now available for download from GitHub and WordPress.org.

    In this minor release we fixed a bug where some extensions making use of the /cart/extensions endpoint would not receive the updated cart totals in the response. We now ensure the cart totals are recalculated before sending the response.

    Changelog

    Bug fixes

    • Fix a bug in which cart totals aren’t recalculated aftering running CartExtensions (#7490)

  • Beta 2 for the November 2022 release of WooCommerce is now available for testing! You can either download it directly from WordPress.org or install our WooCommerce Beta Tester Plugin.

    Highlights

    Since the release of Beta 1, the following changes have been made:

    Release Schedule

    We’re still on track for our planned November 8 release.

    VersionRelease
    Release CandidateNovember 1st, 2022
    Final ReleaseNovember 8th, 2022

    Testing

    If you’d like to dive in and help test this new release, our handy WooCommerce Beta Tester plugin allows you to switch between beta versions and release candidates. You can also download the release from WordPress.org.

    A set of testing instructions has been published on our Wiki page in GitHub. We’ve also posted a helpful writeup on beta testing to help get you started.

    If you discover any bugs during the testing process, please let us know by logging a report in GitHub.


  • A new version of WooCommerce Blocks has been released! Version 8.8.0 is now available for download from GitHub and WordPress.org.

    Filter by Rating block

    This release contains a new block: the Filter by Rating block. This allows shoppers to select a rating and only show products that satisfy the filter’s criteria.

    The Filter by Rating block being used to show products rated 3-stars.

    New hook for modifying cart_item_data

    We added a new hook to the Store API named woocommerce_store_api_add_to_cart_data that provides an array of cart item data, and the API request object. This allows data to be modified or added to cart items before they are added to the cart.

    For example, if an extension were to pass custom data to the API endpoint, it could retrieve the posted values via the new hook and then store it within the cart item itself for later use:

    add_filter( 'woocommerce_store_api_add_to_cart_data', function( $add_to_cart_data, \WP_REST_Request $request ) {
         $add_to_cart_data['cart_item_data']['custom'] = sanitize_text_field( $request['custom-extension-data'] );
         return $add_to_cart_data;
    }, 10, 2 );

    More information about this can be found on the pull request in the WooCommerce Blocks GitHub repository.

    Other changes

    Besides these changes, we also made some performance improvements in the editor when working with the Cart and Checkout blocks. We added a notice to the block inspector to let users know these blocks are a beta feature, but the implementation of this notice had a slight performance impact. To fix this, we added some extra checks which allow us to stop executing the code for this notice early if the editor was not focused on either the Cart or Checkout block.

    This release also fixes some alignment issues with the mini-cart in the editor.

    We also fixed a bug where object data would be lost or inconsistent when using the /cart/extensions endpoint.

    Finally, we fixed a bug where a fatal error would sometimes occur when using certain shipping setups on specific store configurations.

    Changelog

    Enhancements

    • Filter by Ratings: Add the Filter by Rating block to the feature plugin build. (7384)
    • Filter by Ratings: Improve accessibility by announcing the rating filter change. (7370)
    • Prevent resource hinting when cart/checkout blocks are not in use. (7364)
    • Separate filter title and filter controls by converting the Rating filter block to use Inner Blocks. (7362)
    • Products by Rating: Add support for Display Options. (7311)
    • Store API: Introduced woocommerce_store_api_add_to_cart_data hook. (7252)

    Bug Fixes

    • Fix performance issue with the sidebar notices. (7435)
    • Fix mini cart items alignment issues in Editor. (7387)
    • Store API: Replaced wc()->api->get_endpoint_data usage in /cart/extensions to fix inconsistencies via filter hooks. (7361)
    • Fixes a fatal error with Cart Block usage in specific site configurations with multiple shipping countries. (6896)

  • A new version of WooCommerce Blocks has been released! Version 8.7.4 is now available for download from GitHub and WordPress.org.

    This is a patch release that addresses the following:

    Bug Fixes

    • Compatibility fix for Cart and Checkout inner blocks for WordPress 6.1. (7447)

    • A new version of WooCommerce Blocks has been released! Version 8.7.3 is now available for download from GitHub and WordPress.org.

      This is a patch release that addresses the following:

      Bug Fixes

      • Fix wrong keys being sent in canMakePayment and customer data showing in the Checkout block in the editor (7434)

    • Beta 1 for the November 2022 release of WooCommerce is now available for testing! You can either download it directly from WordPress.org or install our WooCommerce Beta Tester Plugin.

      Highlights

      This release introduces High Performance Order Storage, which can be enabled within wp-admin under WooCommerce > Settings > Advanced > Features.

      For a complete overview of this feature, take a look at the posts we’ve previously made about High Performance Order Storage, such as this post with frequently asked questions, or this one that addresses backward compatibility.

      7.1 beta 1 also includes several other fixes, tweaks, and enhancements. For the complete list, view the changelog in the readme for this release.

      Actions and Filters

      This release doesn’t add any filters and adds one new action.

      ActionDescription
      woocommerce_before_delete_orderFires immediately before an order is deleted from the database. [Source]

      Database Changes

      This release does not contain any database changes. The changes required for High Performance Order Store are not made until you enable that feature. For more about the schema of High Performance Order Store, see this post.

      Template Changes

      There are no template changes in this release.

      Deprecations

      There are no deprecations in this release.

      Release Schedule

      VersionRelease
      BetaOctober 18, 2022
      Release CandidateNovember 1, 2022
      Final ReleaseNovember 8, 2022

      Testing

      If you’d like to dive in and help test this new release, our handy WooCommerce Beta Tester plugin allows you to switch between beta versions and release candidates. You can also download the release from WordPress.org.

      A set of testing instructions has been published on our Wiki page in GitHub. We’ve also posted a helpful writeup on beta testing to help get you started.

      If you discover any bugs during the testing process, please let us know by logging a report in GitHub.


    • A new version of WooCommerce Blocks has been released! Version 8.7.2 is now available for download from GitHub and WordPress.org.

      This is a patch release that addresses the following:

      Bug Fixes

      • Fixed a problem where Custom Order Tables compatibility declaration could fail due to the unpredictable plugin order load. (7395)
      • Refactor useCheckoutAddress hook to enable the “Use same address for billing” option in Editor (7393)

    • A new version of WooCommerce Blocks has been released! Version 8.7.1 is now available for download from GitHub and WordPress.org.

      This is a patch release to fix an issue where JavaScript errors would occur when more than one extension tried to filter specific payment methods in the Cart and Checkout blocks.

      Changelog

      Bug Fixes

      • Fixed an issue where JavaScript errors would occur when more than one extension tried to filter specific payment methods in the Cart and Checkout blocks. (7377)

    • A new version of WooCommerce Blocks has been released! Version 8.7.0 is now available for download from GitHub and WordPress.org.

      In this release we focused on a lot of internal changes and bug fixes. Some highlights include the following:

      Cart & Checkout Integration

      As a highlight for developers, we made a few changes to the way you integrate with the Cart & Checkout blocks.

      WP Data Stores

      We moved a lot of the data related to the Checkout process into wp/data stores, which can now be accessed by other plugins to allow more flexibility and creativity when interacting with the Checkout Block. You can read more about these and how to do that here

      New filters

      We added a new filter for changing the text of the “Place Order” button on the Checkout Block

      const { __experimentalRegisterCheckoutFilters } = window.wc.blocksCheckout;
      __experimentalRegisterCheckoutFilters( 'custom-place-order-button-label', {
      	placeOrderButtonLabel: label,
      } );

      We also added a filter for disabling the ability to remove items from the Cart Block

      const { __experimentalRegisterCheckoutFilters } = window.wc.blocksCheckout;
      
      __experimentalRegisterCheckoutFilters('some-extension-name', {
      		showRemoveItemLink: (value, extensions, { cartItem }) => {
      			return cartItem.name !== 'Beanie';
      		},
      	});
      

      Styling filter blocks is now easier

      Previously, filter blocks were regular blocks containing a title and filter controls. Those blocks only had a styling option for the title. Also, we can’t style the filter controls without increasing the complexity of the block settings.

      Because of those limitations, we upgraded filter blocks to use inner blocks. Each filter block now contains two inner blocks: a core heading block and the filter controls block. The new structures allow merchants to style individual inner blocks, which makes the filter blocks more versatile and easier to customize. In addition, using the core heading block also unlocks many possibilities and functionalities for free.

      Changelog

      Enhancements

      • Improve visual consistency between block links. (7340)
      • Update the titles of some inner blocks of the Cart block and remove the lock of the Cross-Sells parent block. (7232)
      • Add filter for place order button label. (7154)
      • Exposed data related to the checkout through wordpress/data stores. (6612)
      • Add simple, large & two menus footer patterns. (7306)
      • Add minimal, large, and essential header patterns. (7292)
      • Add showRemoveItemLink as a new checkout filter to allow extensions to toggle the visibility of the Remove item button under each cart line item. (7242)
      • Add support for a GT tracking ID for Google Analytics. (7213)
      • Separate filter titles and filter controls by converting filter blocks to use Inner Blocks. (6978)
      • StoreApi requests will return a Cart-Token header that can be used to retrieve the cart from the corresponding session via GET /wc/store/v1/cart. (5953)

      Bug Fixes

      • Fixed HTML rendering in the description of active payment integrations. (7313)
      • Hide the shipping address form from the Checkout when the “Force shipping to the customer billing address” is enabled. (7268)
      • Fixed an error where adding new pages would cause an infinite loop and large amounts of memory used in redux. (7256)
      • Ensure error messages containing HTML are shown correctly in the Cart and Checkout blocks. (7231)
      • Prevent locked inner blocks from sometimes displaying twice. (6676)
      • StoreApi /checkout endpoint now returns HTTP 402 instead of HTTP 400 when a payment fails. (7273)
      • Fix a problem that causes an infinite loop when inserting Cart block in wordpress.com. (7367)