WooCommerce 10.6: SQL fixes and two breaking changes

I expected the move to block based themes to crawl along for years, and the WooCommerce 10.6 updates say otherwise. If you look after high-traffic stores, the interesting part of this release is not the new trash icon in the cart. It is the lazy loading default, the SQL work in the admin, and a Store API change that will break headless code.

Two of the developer advisories deserve a second read. One can throw a fatal error in custom breadcrumb code, the other quietly breaks headless requests. So what follows is the code-side view of 10.6 rather than the dashboard tour.

SQL performance in the admin

A good chunk of 10.6 goes at slow SQL. The team fixed a bottleneck in the Recent Reviews widget and reworked how the admin fetches dates for the month filter on the orders page. Small n+1 queries like those are exactly what turns a snappy admin into something painful once a store passes 50k orders.

Order retrieval also gets smarter cache priming, and the redundant lookups for related and upsell products are gone, so product pages render with less work behind them. If you have been fighting database locks during a sale, that is the line item to care about.

Lazy loading is on by default

WooCommerce 10.6 enables lazy loading on the Product Image block out of the box. That helps Core Web Vitals in most cases, but it gets in the way if you run a custom gallery script or you hand-tuned the above-the-fold LCP image. There is a filter for it.

/**
 * Customizing lazy loading for product images in Woo 10.6
 * Prefix: bbioon_
 */
add_filter( 'woocommerce_product_image_loading_attr', function( $value, $attachment_id ) {
    // Disable lazy loading for the first product image to improve LCP
    if ( is_product() && bbioon_is_first_product_image( $attachment_id ) ) {
        return 'eager';
    }
    return $value;
}, 10, 2 );

The other one to watch is woocommerce_get_breadcrumb. Its second parameter can now arrive as null when the Core Breadcrumbs block is in play, so a callback that assumes an object will hand you a fatal error instead. Add the null check before you update.

Compliance and the Store API

Stores selling into Germany or Switzerland get a filter for tax-inclusive shipping. It keeps the shipping price the same whatever the VAT rate is, which is what the EU consumer protection rules ask for. One line does it:

add_filter( 'woocommerce_shipping_prices_include_tax', '__return_true' );

On the headless side, the Store API now requires per_page to be at least 1. Anyone passing per_page=0 to pull everything in one call (not a good idea in the first place) gets a failure now and has to paginate properly.

I covered the API side separately in my notes on WooCommerce 10.6 API updates.

If WooCommerce work is eating your dev hours, I take it on as client work. I have been doing WordPress since the 4.x days.

What to check before you update

WooCommerce 10.6 is a maintenance release. It standardizes more of the block experience and the UI polish will please clients, but the parts that matter to a developer are the SQL work and the new image loading filter. Run wp database update and check your breadcrumb hooks before any of this goes near production.

author avatar
Ahmad Wael
I'm a WordPress and WooCommerce developer with 15+ years of experience building custom e-commerce solutions and plugins. I specialize in PHP development, following WordPress coding standards to deliver clean, maintainable code. Currently, I'm exploring AI and e-commerce by building multi-agent systems and SaaS products that integrate technologies like Google Gemini API with WordPress platforms, approaching every project with a commitment to performance, security, and exceptional user experience.