FAQ: Cart and Checkout Blocks by Default

In a recent developer advisory, we announced that Cart and Checkout blocks will become available as the default experience with the release of WooCommerce 8.3. As we prepare for that reality, we’ve collected some of the FAQs you may be asking yourself as the time to welcome Cart and Checkout Blocks by default approaches. 

Timelines 

When will Cart and Checkout Blocks become the default experience?

Cart and Checkout Blocks will become default experience for all new users in the upcoming November 14th release of WooCommerce Core (8.3)

My plugin touches the checkout. What will happen on November 14th?

Any new stores which use WooCommerce Version 8.3 will have the new block based Cart and Checkout by default. 

  • If you are a plugin developer whose plugin touches the Cart and Checkout experience, and your plugin has been migrated, and you have declared compatibility, then your plugin will work for users who have created a new store after the release of WC 8.3
  • If you are a plugin developer whose plugin touches the Cart and Checkout experience, and your plugin has not been migrated, and you have not declared compatibility, users who have created a new store after the release of WC 8.3 and install your plugin may have a broken experience.
  • If you are a plugin developer whose plugin touches the Cart and Checkout experience, and your plugin has not been migrated, and you have declared incompatibility, users who have created a new store after the release of WC 8.3 and install your plugin will receive a notification on the Cart & Checkout blocks’ settings sidebar letting them know about the incompatibility.

Using the new experience

I want to enable the new Cart and Checkout block experience in a store I manage. How can I do that?

Existing stores will continue to use the cart and checkout version that they had been using, even if they upgrade to WC 8.3. In order to enable the new experience, follow these steps

Declaring Compatibility 

Who needs to declare compatibility?

If your plugin extends the existing cart or checkout experience, and you have migrated your plugin to support Cart and Checkout blocks, you should declare compatibility. 

If your plugin is a payment gateway, the plugin compatibility and payment gateway compatibility are determined separately. Declaring compatibility is still required. Until your payment gateway is integrated with the Cart and Checkout blocks a notice will continue show irrespective of compatibility declaration.

How do I declare compatibility or incompatibility?

Declaring compatibility in your extension is straightforward, and helps merchants better understand the root cause if compatibility conflicts arise. Extensions will fall into 2 categories, which will determine next steps to take:

  1. If an extension is incompatible with the Cart and Checkout Blocks, it should declare its incompatibility.
  2. If an extension is compatible with the Cart and Checkout Blocks, it should declare its compatibility.
  3. If an extension is a payment gateway you must follow the payment method integration steps and declare its compatibility.
  4. If an extension isn’t related to the Cart and Checkout flow, then no actions are required.

Declare WC tested up to in your main plugin file(s) using the WooCommerce version support header, WC tested up to:

/*
 * Plugin Name: WooCommerce Example Extension
 * Plugin URI: https://wordpress.org/plugins/[EXAMPLE EXTENSION]/
 * Description: Sample description
 * Author: WooCommerce
 * Author URI: https://woocommerce.com/
 * Version: 1.0.0
 * Text Domain: woocommerce-example-extension
 * Domain Path: /languages
 * WC requires at least: 6.0
 * WC tested up to: 8.0
 */

As many WordPress extensions aren’t WooCommerce related, we will only check for compatibility in extensions which use the WC tested up to header. 

Incompatible extensions: Add the following code to your main plugin file

add_action( 'before_woocommerce_init', function() {
    if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) {
        \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'cart_checkout_blocks', __FILE__, false );
    }
} );

Compatible extensions: Add the following code snippet to your main plugin file

add_action( 'before_woocommerce_init', function() {
    if ( class_exists( '\Automattic\WooCommerce\Utilities\FeaturesUtil' ) ) {
        \Automattic\WooCommerce\Utilities\FeaturesUtil::declare_compatibility( 'cart_checkout_blocks', __FILE__, true );
    }
} );

What happens if I don’t declare compatibility?

If your plugin touches the checkout or cart experience but does not support Cart and Checkout Blocks, in most cases, the functionality offered by your plugin won’t be visible. However, in some cases, it’s possible that your plugin will break the experience for users who are creating new stores on WC 8.3. 

What happens if I declare incompatibility?

Declaring incompatibility is a way to provide users with information that will eliminate their confusion about missing functionality. If your plugin is not compatible, and you have declared incompatibility, a message will be shown in the Cart & Checkout blocks’ settings sidebar letting users know. 

How is a payment gateway’s compatibility determined?

WooCommerce Blocks determines if a payment gateway is compatible by comparing the list of server-side registered gateways to the list of front-end registered gateways, if a gateway is in the server-side list, but not the front-end list, then it has not been made compatible with the Cart and Checkout blocks.

To make it compatible, you’ll need to follow the steps in the Payment Method Integration guide.

Hooks

Which legacy hooks are available?

The list of hooks and actions which we have migrated can be found here

Will you be migrating all the hooks and actions? 

In the changing extensibility landscape, we will favor explicit APIs and interfaces for integrations over action and filter hooks. Wherever possible, instead of using do_action or apply_filters, we will introduce explicit interfaces for adding extensibility. 

I need more help 

Still have questions around Cart and Checkout Blocks?

Check out our GitHub Discussions section Q&A – Extension Integrations and Customizations to see if your question has already been answered or to add your own. Some of the most talked about topics on Cart and Checkout extensibility can also be found in this post

If you are looking for a general overview of this feature, checkout the documentation on woo.com

Join our Community Slack #woocommerce-blocks-and-block-themes channel to ask questions or get feedback from peers and WooCommerce developers. 


Leave a Reply

Your email address will not be published. Required fields are marked *