Sorting order items via a hooked function in WooCommerce
问题 In WooCommerce, I have a product attribute pa_location for "location" with which I sort my order items. When order items have the same location, I'd like to sort them by SKU. So, sort first by location and then by SKU. I looked to "PHP usort sorting multiple fields" but I am unable to figure out how it applies and would work for my function. I have this custom function that works to sort by pa_location , but cannot get it to also sort by _sku . I tried implementing some of the examples in the