Hi Con,
Thanks for your reply. I’m aware that the default is date, but it simply wasn’t. I also have no clue what plugin could’ve caused it, since I use all the plugins in multiple websites.
In the end, your stackoverflow link helped a lot!
I changed the code to this (which works):
if( is_admin() && $_GET['post_type'] === 'shop_order' ){
if(!isset($_GET['orderby'])) $_GET['orderby'] = 'date';
if(!isset($_GET['order'])) $_GET['order'] = 'desc';
}
Thanks and have a nice day!
Okay, in my case it seems to be a problem with the theme (Hestia). When I deleted this line: 'Hestia_Gutenberg' => HESTIA_PHP_INCLUDE . 'compatibility', from /inc/core/class-hestia-autoloader.php it worked.
Same here… Indeed very annoying.