diff --git a/admin/woocommerce-admin-reports.php b/admin/woocommerce-admin-reports.php index 07acbf9f22b..41cbe470b19 100644 --- a/admin/woocommerce-admin-reports.php +++ b/admin/woocommerce-admin-reports.php @@ -1918,7 +1918,7 @@ function woocommerce_category_sales() { $current_year = isset( $_POST['show_year'] ) ? $_POST['show_year'] : date( 'Y', current_time( 'timestamp' ) ); $start_date = strtotime( $current_year . '0101' ); - $categories = get_terms( 'product_cat', array( 'parent' => 0 ) ); + $categories = get_terms( 'product_cat', array( 'orderby' => 'name' ) ); ?>

@@ -1932,14 +1932,16 @@ function woocommerce_category_sales() { diff --git a/classes/walkers/class-product-cat-dropdown-walker.php b/classes/walkers/class-product-cat-dropdown-walker.php index fdd77cfb987..346c0f23e9b 100644 --- a/classes/walkers/class-product-cat-dropdown-walker.php +++ b/classes/walkers/class-product-cat-dropdown-walker.php @@ -29,16 +29,19 @@ class WC_Product_Cat_Dropdown_Walker extends Walker { $pad = str_repeat(' ', $depth * 3); $cat_name = apply_filters( 'list_product_cats', $cat->name, $cat ); - $output .= "\t\n";