Stack Exchange
Change Woocommerce category dropdown order
I am using this to display a dropdown of product categories on specific Woocommerce pages:
add_action( 'woocommerce_before_shop_loop', 'get_product_subcategories_list', 1 );
function get_product_subcategories_list( $category_slug ){
$cat = get_queried_object();
                    $cat_id = $cat->term_id;
                    $args = array(
                        'taxonomy' => 'product_cat',
                        'title_li' => '',
                        'child_of' => $cat_id,
                    );
   if ( is_product_category(array( 17,25 )  )  ) {     
                    ?><div class="subcategories"><?php wc_product_dropdown_categories($args);  ?></div><?php
       wc_enqueue_js( "
  $('#product_cat').change(function () {
     location.href = '/?product_cat=/'+$(this).val();
  });
  " );
}}

The dropdown is displaying the categories in alphabetical order, but I need them to be displayed in the sorting that I have set in the backend. How can I change this?

I had a similar problem but the code I'm using is a bit different.
Does it work if you add
'orderby' => 'order'

to your args list?
So like this
     $args = array(
    'taxonomy' => 'product_cat',
    'title_li' => '',
    'child_of' => $cat_id,
    'orderby'  => 'order',
                );

