Title: Wrong attributes order when sorted numerically
Last modified: November 16, 2020

---

# Wrong attributes order when sorted numerically

 *  [AHOiREKLAMA](https://wordpress.org/support/users/ahoireklama/)
 * (@ahoireklama)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/wrong-attributes-order-when-sorted-numerically/)
 * Hello, I have a size attribute used for variable products. I have set the sorting
   to “Name (numeric)”, it works great for numerical sizes, e.g.:
 * `34, 35, 36, 37`
    `75 B, 75 C, 80 B, 80 D, 120 D`
 * etc., but when using alphabetical sizes, it puts XL before L, which is wrong:
 * `S, M, XL, L`
 * Is there any way to fix this automatically? Setting the sort method to custom
   ordering is out of the question since I am already using almost 300 sizes.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Contributor [Ron Rennick](https://wordpress.org/support/users/wpmuguru/)
 * (@wpmuguru)
 * [5 years, 6 months ago](https://wordpress.org/support/topic/wrong-attributes-order-when-sorted-numerically/#post-13668007)
 * Hi [@ahoireklama](https://wordpress.org/support/users/ahoireklama/),
 * Where are you setting the order? Are you using either of the methods described
   in [this thread]([https://wordpress.org/support/topic/reorder-attributes/](https://wordpress.org/support/topic/reorder-attributes/))?
 *  [Robert Ghetau](https://wordpress.org/support/users/robertghetau/)
 * (@robertghetau)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/wrong-attributes-order-when-sorted-numerically/#post-13738880)
 * We haven’t heard back from you in a while, so I’m going to mark this as resolved–
   if you have any further questions, you can start a new thread.
 *  Thread Starter [AHOiREKLAMA](https://wordpress.org/support/users/ahoireklama/)
 * (@ahoireklama)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/wrong-attributes-order-when-sorted-numerically/#post-13738932)
 * [@robertghetau](https://wordpress.org/support/users/robertghetau/) [@wpmuguru](https://wordpress.org/support/users/wpmuguru/)
   Sorry, I haven’t noticed you replied.
 * Yes, I’ve set the attribute order directly in Products > Attributes. I’ve set
   the ordering of the ‘size’ attribute to “Name (numeric)”.
 * I know it can be done manually on product level, but as I said, I have thousands
   of products and hundrends of sizes defined in the store, so this is probably 
   out of the question.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Wrong attributes order when sorted numerically’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [attribute](https://wordpress.org/support/topic-tag/attribute/)
 * [number](https://wordpress.org/support/topic-tag/number/)
 * [numeric](https://wordpress.org/support/topic-tag/numeric/)
 * [order](https://wordpress.org/support/topic-tag/order/)
 * [size](https://wordpress.org/support/topic-tag/size/)
 * [sort](https://wordpress.org/support/topic-tag/sort/)

 * 3 replies
 * 3 participants
 * Last reply from: [AHOiREKLAMA](https://wordpress.org/support/users/ahoireklama/)
 * Last activity: [5 years, 5 months ago](https://wordpress.org/support/topic/wrong-attributes-order-when-sorted-numerically/#post-13738932)
 * Status: not resolved