The order in which your product attributes appear on a WooCommerce product page directly affects conversions. When customers have to hunt for size or color information buried under irrelevant specs, they leave. This guide covers every method for changing attribute order in WooCommerce 9.x – from the redesigned block editor to drag-and-drop plugins and code-based approaches – so you can control exactly how attributes display on your product pages.
Two Types of Attribute Order
Before diving into methods, it helps to understand the two distinct ordering problems in WooCommerce:
| Type | Where Set | Example | Scope |
|---|---|---|---|
| Global Attributes (attribute groups) | Products > Attributes | pa_color, pa_size | Store-wide, used across multiple products |
| Local / Custom Attributes | Individual product editor | Frame Material, Lens Type | Product-specific only |
| Attribute terms (values) | Products > Attributes > Configure terms | XS, S, M, L, XL | Within an attribute group |
The order you want to change has two levels: the order of attribute groups (Size before Color) and the order of individual values within an attribute (XS before S before M before L). Both are covered below.
Why Attribute Order Affects Conversions
- Conversion impact: Customers who quickly find size or variant information are more likely to add to cart. A cluttered or illogical attribute order creates friction that leads to abandonment.
- Decision logic: Customers follow a mental decision sequence. For apparel, they first filter by size availability, then by color. Putting Color first forces them to backtrack.
- Brand consistency: If your store always leads with Size, customers build a habit. Inconsistency between products confuses them.
- Reduced returns: When Size is prominent and clear, customers make more deliberate choices, reducing wrong-size returns.
Category-Specific Attribute Priority
Different product categories benefit from different attribute ordering strategies. The right order depends on how customers make purchasing decisions in your specific niche:
| Product Category | Recommended First Attribute | Reason |
|---|---|---|
| Apparel (T-shirts, pants, dresses) | Size | Size availability determines whether purchase is possible; color is secondary |
| Footwear | Size | Same logic as apparel; wrong size = return regardless of color choice |
| Electronics (phones, laptops) | Storage/RAM/Model | Capability spec is the primary differentiator; color is cosmetic |
| Furniture | Material/Finish | Long-term aesthetic decision comes before size considerations |
| Cosmetics | Shade/Color | Color match is the primary purchase driver; size is secondary |
| Coffee/Food | Flavor/Type | Product type selection comes before quantity or size |
Method 1: WooCommerce 9.x Block-Based Product Editor
WooCommerce 9.0 introduced the block-based product editor as the default interface. If this is active for your store, attribute ordering works through the new drag-and-drop interface in the product sidebar.
Reordering Attribute Groups
- Go to WooCommerce > Products and open any product.
- In the Attributes panel (right sidebar or main body), you will see each attribute group listed.
- Hover over an attribute row – a six-dot drag handle appears on the left side.
- Click and drag the row to your desired position.
- Click Save or Update to persist the change.
Known Issue: Position Not Saving in Some 9.x Versions
A known bug in early WooCommerce 9.x releases caused drag-reordered attributes to revert on page refresh. The fix was shipped in WooCommerce 9.1.2. If you are on an affected version:
- Update WooCommerce to the latest 9.x patch release (always recommended).
- As a workaround, use the classic editor by clicking “Switch to classic product form” at the top of the product editor.
- For bulk fixes across many products, use the WP-CLI approach in Method 5 below.
Check your WooCommerce version at WooCommerce > Status. Running an outdated version also creates security risks – see our guide on WooCommerce security for the full picture.
Method 2: WooCommerce Classic Product Editor
If you use the classic product editor (available via the opt-out toggle in WooCommerce 9.x), attribute drag-and-drop works exactly as in earlier WooCommerce versions.
- Open the product in the classic editor.
- Scroll to the Product Data metabox and click the Attributes tab.
- Each attribute has a drag handle on the left side of the row.
- Drag attributes into your preferred order. The topmost attribute displays first on the product page.
- Click Update to save.
The classic editor stores the attribute display position in the position field of the product attribute object. This is the same field used by the REST API, so changes made here apply immediately on the frontend.
How to Switch from Block Editor to Classic Editor
If your store defaulted to the WooCommerce 9.x block editor but you prefer the classic interface for attribute management:
- Open any product in the block editor.
- Click the three-dot menu in the top-right of the editor toolbar.
- Select “Switch to classic product form.”
- The product reloads in the classic interface. Your attribute ordering changes there will take effect immediately.
- To make this the default for all products, go to WooCommerce > Settings > Advanced > Features and turn off the “Product block editor” toggle.
Method 3: Global Attribute Term Order
Attribute groups are one level – individual attribute values (XS, S, M, L, XL) within those groups are another. Here is how to control term order:
- Go to Products > Attributes.
- Click Configure terms next to the attribute (e.g., Size).
- On the terms list page, find the Default sort order dropdown on the attribute edit screen.
- Choose “Custom ordering” to respect drag-and-drop order, or “Name” for alphabetical, or “Name (numeric)” for numeric attributes like shoe sizes.
- If using Custom ordering: drag the terms in the terms list to your preferred sequence (XS first, then S, M, L, XL).
The drag-and-drop interface for attribute terms requires WooCommerce to have “Custom ordering” selected for that attribute. If you do not see drag handles, check the Default sort order setting.
Attribute Term Sort Options Explained
| Sort Order Option | How It Sorts | Best For |
|---|---|---|
| Custom ordering | Drag-and-drop sequence you define | Apparel sizes (XS, S, M, L, XL), any non-alphabetical sequence |
| Name | A to Z alphabetically | Colors, materials where any order is acceptable |
| Name (numeric) | Numerically ascending | Shoe sizes (6, 7, 8, 9, 10), numeric ring sizes |
| Term ID | Order of term creation | Not recommended for customer-facing display |
Method 4: Plugins for No-Code Attribute Ordering
For stores with many products or complex attribute ordering requirements, plugins provide centralized control without touching each product individually.
Variation Swatches for WooCommerce (RadiusTheme)
Replaces dropdown selects with visual swatches (color, image, button) and includes attribute ordering controls. Drag-and-drop ordering of both attribute groups and individual terms from a central admin panel. Free and premium versions available. WooCommerce 9.x compatible.
Swatchly
Similar to Variation Swatches but with more customization for swatch appearance. Allows setting different swatch styles (color, image, button) per attribute. Includes a drag-and-drop attribute term ordering interface. Free version available.
YITH WooCommerce Product Add-Ons
For stores that need additional custom options beyond standard WooCommerce attributes. Define custom attribute fields and control their display order at the product or category level. Free basic version, premium from $89.99/year.
Plugin Comparison
| Plugin | Drag-Drop Groups | Drag-Drop Terms | Visual Swatches | WC 9.x | Free Version | Best For |
|---|---|---|---|---|---|---|
| Variation Swatches | Yes | Yes | Yes | Yes | Yes | Stores wanting visual swatches + ordering |
| Swatchly | Yes | Yes | Yes | Yes | Yes | Stores needing custom swatch styles per attribute |
| YITH Add-Ons | Yes | No | No | Yes | Yes | Stores adding extra options beyond size/color |
| Product Table by Barn2 | Yes (columns) | No | No | Yes | No | B2B order forms, bulk ordering tables |
| Woo Variation Swatches Pro | Yes | Yes | Yes | Yes | Limited | Large catalogs needing centralized control |
Method 5: PHP Hooks for Programmatic Attribute Order
For developers who need exact control without a plugin, WooCommerce provides filter hooks for attribute ordering. Add these to a custom plugin or your child theme’s functions.php. Never edit core WooCommerce files.
Snippet 01: Change Attribute Sort Order via Filter Hook
Set orderby to menu_order to respect the drag-and-drop order in the product editor, or name for alphabetical sorting.
Snippet 02: Prioritize Specific Attribute Groups
Use when you want Size always first, Color second, and Material third – regardless of creation order across all products.
Snippet 03: Custom Sort Order for Attribute Terms (e.g., Sizes)
The most commonly needed snippet: sorts values like XS then S then M then L then XL instead of alphabetical order (L, M, S, XL, XS). Modify the $size_order array to match your store’s actual size slugs.
Snippet 04: Bulk-Set Attribute Position via WP-CLI
For fixing WooCommerce 9.x attribute position bugs across many products. Run with: wp eval-file 04-block-editor-attribute-position.php
Security note: Always add custom snippets via a child theme or custom plugin, not directly in the parent theme’s functions.php. Parent theme updates overwrite your changes. Use a code snippets manager like WPCode if you are not comfortable with PHP.
WooCommerce 9.x Block Editor vs Classic Editor: Attribute Changes
| Feature | Classic Editor (WC 8.x) | Block Editor (WC 9.x) |
|---|---|---|
| Attribute drag-and-drop | Metabox tab, drag handles visible | Sidebar panel, drag handles on hover |
| Add new global attribute | Dropdown + Add button | Search/select inline |
| Add local attribute | Custom option in dropdown | “Add new attribute” button |
| Set “Used for variations” | Checkbox in attribute row | Toggle in attribute row |
| Term order (within attribute) | Drag in attribute tab | Drag in attribute term panel |
| Attribute position bug | No known issues | Fixed in WC 9.1.2 |
| Bulk edit support | Via WP-CLI or plugin | Via WP-CLI or plugin |
Bulk Attribute Ordering: Managing Large Catalogs
For stores with hundreds or thousands of products, changing attribute order product-by-product is not practical. Here are the bulk approaches:
WooCommerce REST API
The WooCommerce REST API allows bulk updates to product attributes via the Products endpoint. A PUT request to /wp-json/wc/v3/products/{id} with an attributes array in the body can set the position value for each attribute. This approach works well for scheduled or automated catalog updates where you want programmatic control over attribute ordering across large product sets.
WP All Import / WP All Export
If you manage your product catalog via CSV import/export, WP All Import supports writing attribute position values during import. Export your products, add or modify the attribute position columns in the CSV, and reimport. This is the most accessible bulk method for non-developers managing large catalogs. WP All Import’s WooCommerce add-on maps CSV columns to attribute position fields directly.
Direct Database Update (Advanced)
WooCommerce stores product attribute positions in the wp_postmeta table with the meta key _product_attributes. A serialized PHP array holds each attribute’s position value. Direct database edits are possible but risky – always use a staging environment and create a database backup before any direct table manipulation. The WP-CLI snippet in Method 5 is a safer programmatic alternative for most bulk scenarios.
Best Practices for Attribute Order
- Lead with the most important attribute: For apparel, Size first. For electronics, compatibility first. Follow your customers’ decision-making sequence.
- Limit attribute groups per product: More than 4-5 attribute groups create option paralysis. Consolidate where possible.
- Use clear, customer-facing labels: Internal slugs like
pa_colappear as “Col” on the frontend. Set a readable label in Products > Attributes. - Standardize attribute slugs: Use consistent slugs like
pa_sizeandpa_colorstore-wide. Mixingpa_sizeandpa_sizingcreates duplicate attributes in filters. - Test on mobile: Attribute dropdowns and swatches behave differently on small screens. Always verify after making changes.
- Monitor conversion data: After reordering attributes, watch your add-to-cart rate in WooCommerce Analytics.
When to Use Each Method
| Situation | Recommended Method |
|---|---|
| One-off change per product | Drag-and-drop in WC 9.x block editor or classic editor |
| Site-wide attribute group order (no code) | Variation Swatches plugin or YITH Add-Ons |
| Custom term order (XS then S then M then L) | Snippet 03 + Custom ordering attribute setting |
| WC 9.x position not saving bug | Snippet 04 (WP-CLI bulk fix) |
| Priority-based ordering across all products | Snippet 02 (attribute group priority filter) |
| Visual swatches + ordering in one solution | Variation Swatches for WooCommerce |
| 100+ products needing attribute reorder | REST API bulk update or WP All Import CSV method |
| Category-specific attribute order rules | Snippet 02 (modified to check product category) or YITH Add-Ons Premium |
Troubleshooting Attribute Order Issues
Attribute Order Is Not Saving
- If on WooCommerce 9.x, update to 9.1.2 or later. The attribute position saving bug was patched in that release.
- Check for caching: object caching (Redis, Memcached) can serve stale attribute data after saving. Flush your object cache after updating attribute positions.
- Check for plugin conflicts: deactivate all non-essential plugins and test attribute saving. Re-activate one by one to identify the conflicting plugin.
PHP Filter Not Taking Effect
- Verify the snippet is in a file that is actually loaded. If using a child theme, ensure the child theme is active.
- Check for PHP syntax errors: a single syntax error in your theme or plugin will silently break all filters. Activate WP_DEBUG in wp-config.php and check error logs.
- Confirm the hook priority. If another plugin hooks to
woocommerce_product_get_attributeswith a later priority (higher number), it may override your reordering. Use a priority higher than 10 (e.g., 20) to run after the default hooks.
Attributes Display in Wrong Order Despite Correct Settings
- Check if a variation swatches plugin is overriding the order. Some swatch plugins have their own attribute ordering logic that takes precedence over WooCommerce’s native position field.
- If using a page builder (Elementor, WPBakery) to display products, the page builder’s product widget may have its own attribute display logic. Check the widget settings for attribute ordering options.
- Review your theme’s product page template. Some themes hardcode attribute display order rather than reading from WooCommerce’s position field.
Related Product Data Guides
- How to Add Custom Fields to WooCommerce Products – Beyond standard attributes, add any custom data point to your products.
- How to Create WooCommerce Product Bundles – Combine products with shared attribute sets for higher average order value.
- Schema Markup for WooCommerce Products – Make your product attribute data visible in Google rich snippets.
- WooCommerce SEO: The Definitive Guide – Full store SEO including product taxonomy optimization.
- How to Add Product Comparison Tables in WooCommerce – Let customers compare attributes side by side.
Frequently Asked Questions
How do I change the order of product attributes in WooCommerce without a plugin?
In the WooCommerce product editor (both classic and WooCommerce 9.x block editor), open the product and go to the Attributes section. Use the drag-and-drop handles to reorder attribute groups, then save. For store-wide ordering without touching each product, use the woocommerce_product_get_attributes filter hook (Snippet 02 above).
Why is my WooCommerce 9.x attribute order not saving after drag-and-drop?
This is a known bug in early WooCommerce 9.x releases, fixed in version 9.1.2. Update WooCommerce to the latest 9.x patch. As a workaround, use Snippet 04 (WP-CLI bulk position setter) or temporarily switch to the classic product editor by clicking “Switch to classic product form” at the top of the product editor.
How do I sort attribute values in a custom order like XS, S, M, L, XL?
WooCommerce respects the Default sort order set on each attribute taxonomy under Products > Attributes > Edit. For custom order like XS before S before M, set the sort order to “Custom ordering” and then use Snippet 03 to enforce a specific sequence via PHP. Variation Swatches plugins also provide a drag-and-drop interface for term ordering from the admin panel.
Does changing attribute order affect WooCommerce SEO or rich snippets?
Attribute display order does not directly affect SEO rankings. However, well-organized attributes improve time on page and reduce bounce rate, which are indirect ranking signals. For rich snippets, what matters more is having proper product schema markup – attribute order within schema is not significant to search engines. See our guide on WooCommerce schema markup for the full picture.
Can I set different attribute orders for different product categories?
Not natively. WooCommerce does not have category-level attribute ordering. Achieve this with custom code by checking the product’s category in the woocommerce_product_get_attributes filter and applying different sort priorities by category. Some premium attribute plugins like YITH Product Add-Ons support category-level rules.
Will reordering attributes break existing WooCommerce product variations?
No. Attribute order is purely cosmetic – it only affects display sequence on the product page. Variations are linked to attribute terms (values), not to attribute positions. Reordering attributes does not break, duplicate, or remove any variations. Always test on a staging site first if using the bulk WP-CLI script on a large catalog.
I have 500 products that all need the same attribute reordering. Is there a way to do this without editing each product individually?
Yes. Use the WP-CLI script in Snippet 04 to bulk-update attribute positions programmatically. Alternatively, use the WooCommerce REST API to batch update product attributes via a script. For non-developers, WP All Import (with the WooCommerce add-on) allows you to export products to CSV, modify attribute position columns in a spreadsheet, and reimport. All three approaches update hundreds of products in minutes rather than hours.
Why do my attribute swatches appear in the wrong order even after I reorder them in WooCommerce?
Variation swatches plugins often have their own attribute term ordering logic that runs independently of WooCommerce’s native position field. Check your swatches plugin settings for a dedicated term ordering panel. Most swatches plugins (Variation Swatches, Swatchly) include drag-and-drop term ordering within the plugin’s settings, which overrides the WooCommerce default. Set the order there rather than in WooCommerce’s native Attributes screen.
Quick Setup Checklist
- Identify your top 3 product categories and the primary attribute each customer asks about first (usually size for apparel, compatibility for electronics, flavor for food).
- Set global attribute order under Products > Attributes to match that priority for each category.
- For term ordering (S, M, L vs alphabetical), set “Custom ordering” on the attribute taxonomy and arrange terms manually or via Snippet 03.
- Verify on a staging site before applying to production, especially if running WooCommerce 9.x with block editor enabled.
- After deploying changes, flush your object cache and CDN cache, then spot-check 5 products across different categories on both desktop and mobile.
Changing the order of product attributes in WooCommerce is straightforward once you know which method fits your store’s scale. The WooCommerce 9.x block editor brings drag-and-drop inline with product editing. Plugins provide no-code solutions with richer UI options. PHP filter hooks give developers exact control. Start with the built-in editor for one-off changes, reach for a plugin when managing many products, and use code when you need programmatic control across your catalog.
Need hands-on help configuring product attributes or building custom attribute ordering logic for your WooCommerce store? Get in touch to discuss your store’s needs.
