WooCommerce 10.6.2 matches attributes by name, not by slug

Most dot releases are housekeeping. WooCommerce 10.6.2 is not, at least if your store sells variable products or uses non-standard character sets in its attributes. It fixes how attribute data gets matched in the “Add to Cart with Options” block, and it carries a pile of UI work aimed at the upcoming WordPress 7.0 release.

The variable product name trap

The fix that matters is in how variable products get selected inside the block-based checkout and product templates. The old logic matched a selection by transforming the name into a slug and comparing that. It broke whenever an attribute name held special characters, or when a custom slug did not line up exactly with the display name.

The comparison is now name to name. That distinction does real work on multi-language stores and on attributes with hyphens, the same territory as the WooCommerce 10.6.1 update, where slug-based matching has always been fragile.

<?php
/**
 * Illustrating the Logic: Comparing Attribute Names Safely
 * In WooCommerce 10.6.2, the core logic moves away from slug transformation
 * to direct name matching to avoid issues with special characters.
 */
function bbioon_check_attribute_match( $selected_value, $attribute_name ) {
    // OLD WAY: transform to slug and hope for the best
    // $is_match = ( sanitize_title( $attribute_name ) === $selected_value );

    // NEW WAY: Direct comparison of the raw attribute name
    return ( strcasecmp( $attribute_name, $selected_value ) === 0 );
}

Getting ready for WordPress 7.0

The rest of the release heads off UI regressions in WordPress 7.0. The team went after bottlenecks in the admin, mostly the analytics tables and the dashboard cards. The best one of the bunch is the infinite re-render loop they found in the Activity panel. If you have ever opened the dashboard and heard your laptop fan spin up, that is usually what it is: a race condition or a React loop feeding itself.

WooCommerce 10.6.2 also gets metaboxes and control elements lining up properly on small viewports, which earlier versions did not. Dull work, and it is the difference between an admin that looks maintained and one that looks broken as core moves under it. I covered the performance side of these changes in my analysis of WooCommerce 10.6 performance updates.

If WooCommerce 10.6.2 is eating your dev hours, I can take it on. I have been wrestling with WordPress since the 4.x days.

What to do with it

Put it on staging today. The variable product selection fix (GitHub PR #63771) is a conversion patch as much as a bug fix. A customer who cannot pick a variation because of a character encoding mismatch does not email you about it, they leave. Shipping the update is the quickest way to stop that.

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.