Skip to content

Instantly share code, notes, and snippets.

@kilbot
Last active June 17, 2016 04:23
Show Gist options
  • Save kilbot/4843e5278dfa4b05063a to your computer and use it in GitHub Desktop.
Save kilbot/4843e5278dfa4b05063a to your computer and use it in GitHub Desktop.
Change default order filters to Pending & Processing
/**
* Change default filter of orders in WP admin
* add this to your functions.php file
*/
add_action( 'admin_menu', 'change_default_order_filter', 99 );
function change_default_order_filter() {
global $submenu;
if (isset($submenu['woocommerce'])) {
$submenu['woocommerce'][1][2] = 'edit.php?post_type=shop_order&shop_order_status=pending,processing';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment