• Resolved tictubso

    (@tictubso)


    In the “Bulk Actions” dropdown, the “Change status to…” shows each of my custom order status’s. Is there a way to change the order in which they are shown?

    Default appears to be in reverse order to what is shown in the “Custom Order Status” page.

    Why? I have no idea.
    How do I edit that? Again, no idea.

    Can you please assist? Thanks

    • This topic was modified 4 years ago by tictubso.
Viewing 1 replies (of 1 total)
  • shasvat

    (@shasvat)

    Hi @tictubso

    Regarding your query to sort the custom order status in the Bulk Action, you can do that using the filter bulk_actions-edit-shop_order.
    Below is an example of how you can use the filter in your functions.php

    add_filter( 'bulk_actions-edit-shop_order', 'sort_bulk_action', PHP_INT_MAX );
    function sort_bulk_action( $bulk_actions ) {
    	$process = $bulk_actions['mark_processing']; 
    	unset($bulk_actions['mark_processing']);
    	$bulk_actions['mark_processing'] = $process;
    	return $bulk_actions;
    }

    The above example will make the Processing status at the end in the dropdown of Bulk Action.
    You need to add the code in the functions.php file of your active theme.

    Please let us know if you have any queries about this.

    Regards,
    Shasvat shah

Viewing 1 replies (of 1 total)
  • The topic ‘Edit Status Sort Order in Bulk Actions’ is closed to new replies.