Title: Sorting variations issue
Last modified: July 7, 2020

---

# Sorting variations issue

 *  Resolved [frankies83](https://wordpress.org/support/users/frankies83/)
 * (@frankies83)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/sorting-variations-issue/)
 * Hello, i’ve found that the plugin doesn’t follow the variations order shown in
   woocommerce. Ex.If i got 1,2,3,4 as variations in woocommerce, after your plugin
   enabled it will look like 2,4,3,1.
    Using OceanWp and woocommerce latest version.
 * Thanks for your help!
    FC

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

 *  Plugin Author [Dotstore](https://wordpress.org/support/users/dots/)
 * (@dots)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/sorting-variations-issue/#post-13115766)
 * Hello frankies83,
 * Thanks for reaching out to us.
 * I have reviewed your query that, you have some query regarding the order of the
   product variations right?
 * Actually, in our plugin all the variations display order by ASC variation ID 
   From Higher to lower.
 * [Click here](https://pasteboard.co/JhrNPnz.png) to review the screen for order
   of variation.
 * Please add the variations in same order as mentioned in the screen and let us
   know still if any.
 * Thanks,
 *  Thread Starter [frankies83](https://wordpress.org/support/users/frankies83/)
 * (@frankies83)
 * [5 years, 11 months ago](https://wordpress.org/support/topic/sorting-variations-issue/#post-13120159)
 * Hello, thanks for your quick reply!
    Actually still having the issue, the order
   is from higher to lower id, also i tried to move it and play, but there is always
   some variation that doesn’t follow the order.
 * Thanks again,
    FC
 *  [devopwebculture](https://wordpress.org/support/users/devopwebculture/)
 * (@devopwebculture)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/sorting-variations-issue/#post-13134516)
 * Same issue here, wouldn’t be better to order the variations using the “Default
   sort order -> Custom ordering” setting so that it doesn’t rely on the ID of the
   variations anymore?
    For example I have some IDs of a size attribute that don’t
   follow the logical order of S, M, L, XL, etc. and on the website the table looks
   ordered something like M, XL, L, S, etc. which is not the best.
 * Thanks
 *  Plugin Author [Dotstore](https://wordpress.org/support/users/dots/)
 * (@dots)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/sorting-variations-issue/#post-13145389)
 * Hello devopwebculture, frankies83,
 * Thanks for reaching out to us.
 * Sorry to say but, we can’t change that default our plugins orders as we from 
   the starting we keep that changes and from many users set their site based on
   that orders.
 * So, it would be good that you can change your order as mentioned in the previous
   screen with variation ID.
 * [Click here](https://pasteboard.co/JhrNPnz.png) to review that screen again.
 * Thanks,
 *  [devopwebculture](https://wordpress.org/support/users/devopwebculture/)
 * (@devopwebculture)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/sorting-variations-issue/#post-13148982)
 * I understand that, but I still have some problems. See this [screenshot](https://pasteboard.co/JiEeaxy.png),
   the IDs are in order but once I go to the product page the order is [not correct](https://pasteboard.co/JiEeDJZ.png),
   there is no 75, 80 and 85 size of the Turquoise belt, they are way lower mixed
   with other colors and sizes… do you know why is this happening? Then IDs seems
   to be correct.
 * Thank you
 *  [Dominik](https://wordpress.org/support/users/domkawulagmailcom/)
 * (@domkawulagmailcom)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/sorting-variations-issue/#post-13174821)
 * It will be great if you could add a simple option of how to sort variables:
    –
   ID asc, – ID desc, – Name asc, – Name desc. (at least). It will solve all of 
   above problems, I guess.
 *  [delanthear](https://wordpress.org/support/users/delanthear/)
 * (@delanthear)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/sorting-variations-issue/#post-13202958)
 * The variation order described in those screenshots doesn’t seem to match teh 
   functionality. We are seeing products not matching the variation order at all.
 * Order in Woocommerce: [https://pasteboard.co/JkDH7SV.png](https://pasteboard.co/JkDH7SV.png)
   
   Last page of ordering (so should be bottom): [https://pasteboard.co/JkDHpZZ.png](https://pasteboard.co/JkDHpZZ.png)
   How it actually orders: [https://pasteboard.co/JkDHB5R.png](https://pasteboard.co/JkDHB5R.png)
 * They aren’t in ID order, or sorting order. Very odd!
 *  [delanthear](https://wordpress.org/support/users/delanthear/)
 * (@delanthear)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/sorting-variations-issue/#post-13203002)
 * There is a “menu_order” attribute on the variations which should probably be 
   the default value of ordering as I think this is how you order them in the admin
   screen?
 *  Plugin Author [Dotstore](https://wordpress.org/support/users/dots/)
 * (@dots)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/sorting-variations-issue/#post-13231584)
 * Hello delanthear,
 * Thanks for your suggestions.
 * Yes, we can do that thing that, use can display own order same as admin area.
 * Please do below changes to display the same order.
 * **File path:** “plugins\woo-quick-cart-for-multiple-variations\includes\variant_purchase_extended_functions.
   php”
 * **function name:** “wqcmv_conditional_logic_variation”
 * **Line no:** 361 approx in our latest version.
 * Update below array variable arguments in which added the last two line which 
   order the variations with admin side saved order.
 *     ```
       $variation_args = array(
       		'post_type'      => 'product_variation',
       		'posts_per_page' => $variations_per_page,
       		'post_status'    => 'publish',
       		'post_parent'    => $product_id,
       		'fields'         => 'ids',
       		'paged'          => $paged,
       		'orderby'        =>'menu_order',
       		'order'          => 'ASC',
       	);
       ```
   
 * Save the settings and let us know how it works,
 * Based on your feedback, we will also update this code in our upcoming version.
 * Thanks,
 *  [delanthear](https://wordpress.org/support/users/delanthear/)
 * (@delanthear)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/sorting-variations-issue/#post-13242893)
 * That has worked!
 * Thank you!
 *  Plugin Author [Dotstore](https://wordpress.org/support/users/dots/)
 * (@dots)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/sorting-variations-issue/#post-13423730)
 * Hello there,
 * This thread has been inactive for a while so we’re going to go ahead and mark
   it Resolved.
 * Please feel free to open a new thread if any other questions come up and we’d
   be happy to help. 🙂
 * Thanks,

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

The topic ‘Sorting variations issue’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/woo-quick-cart-for-multiple-variations_c8e3df.
   svg)
 * [Quick Bulk Variations Checkout for WooCommerce](https://wordpress.org/plugins/woo-quick-cart-for-multiple-variations/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woo-quick-cart-for-multiple-variations/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woo-quick-cart-for-multiple-variations/)
 * [Active Topics](https://wordpress.org/support/plugin/woo-quick-cart-for-multiple-variations/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woo-quick-cart-for-multiple-variations/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woo-quick-cart-for-multiple-variations/reviews/)

 * 11 replies
 * 5 participants
 * Last reply from: [Dotstore](https://wordpress.org/support/users/dots/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/sorting-variations-issue/#post-13423730)
 * Status: resolved