• Resolved purceaflorentin

    (@purceaflorentin)


    I see the orders in random order.

    I know I can click on the order column to sort them by date. But how do I make it the default to be sorted by date. So whenever I land on wp-admin/edit.php?post_type=shop_order the list of orders should show the latest order at top.
    I shouldn’t need to click on the order column to show it, I have this problem for a wille and I upgraded and updated and still have it, what should I do to fix it ?

    Thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support con

    (@conschneider)

    Engineer

    Hi there,

    I see the orders in random order.

    I know I can click on the order column to sort them by date. But how do I make it the default to be sorted by date.

    WooCommerce sorts per date by default. Something else is causing the random order.

    what should I do to fix it ?

    Try this. Backup your site before you do.

    add_action( 'admin_menu', 'yoursite_admin_orders_url' );
    function yoursite_admin_orders_url() {
    
      global $submenu; // Get submenu array
    
      // Verify the target menu url and append the date query
      if ( isset( $submenu["woocommerce"][1][2] ) && "edit.php?post_type=shop_order" == $submenu["woocommerce"][1][2] ) {
        $submenu["woocommerce"][1][2] .= "&orderby=date&order=desc";
      }
    }

    Kind regards,

    AJ a11n

    (@amandasjackson)

    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘I see the orders in random order’ is closed to new replies.