Set a default sort order for wishlist items

It is possible to sort the items in the wishlist table by specific columns when the table is first displayed, as shown above. For example, to sort them by favourite status:

add_filter( 'nmgr_section_args', 'my_nmgr_set_sort_order', 10, 2 );

function my_nmgr_set_sort_order( $args, $section ) {
	if ( 'items' === $section ) {
		$args[ 'orderby' ] = 'favourite';
		$args[ 'order' ] = 'desc'; // Optional (values are 'desc' or 'asc')
	}
	return $args;
}