Don’t do this!

The wrong way: asking ChatGPT. It gives the following answer, which is completely incorrect. Because there is no Display sub-tab as mentioned in point #4 below. So don’t believe everything you read. Rather skip to the right ways below.

To change the default product sorting in WooCommerce, you can follow these steps:

  1. Log in to your WordPress admin dashboard.
  2. Navigate to “WooCommerce” in the left-hand menu and click on “Settings.”
  3. In the “Settings” page, click on the “Products” tab.
  4. Within the “Products” tab, click on the “Display” sub-tab.
  5. Scroll down to the “Default Product Sorting” section.
  6. Here, you can choose from the available options to set the default sorting for your products. The available options may include:
    • Default sorting (custom ordering + name)
    • Popularity (sales)
    • Average rating
    • Latest
    • Price: Low to High
    • Price: High to Low
  7. Select the desired default sorting option from the dropdown menu.
  8. Click on the “Save changes” button at the bottom of the page to apply the new default sorting.

Once you’ve saved the changes, the default product sorting on your WooCommerce shop will be updated according to the option you selected. Visitors to your site will see the products listed in the newly defined order by default.

Try this instead

Three Right ways to change the product sort order. Have a look at https://rudrastyh.com/woocommerce/change-defaut-product-sorting.html

In short:

  1. You can use a plugin to drag and drop the sort order in the Products list in the WordPress backend
  2. You can change to product sort order in the standard WordPress Settings with the sidebar Customizer (found on the top bar), as I did — quick and easy
  3. You can write a hook by inserting the following into functions.php. There are many different variables and you can also do so for categories only.
add_filter( 'woocommerce_default_catalog_orderby', 'misha_default_catalog_orderby' );

function misha_default_catalog_orderby( $sort_by ) {
return 'date';
}