Skip to content
Advertisement

Tag: orders

Sort Orders IDs alphabetically based on the shipping last name in Woocommerce

I need to sort my $order_name (more specifically $order_shipping_last_name) alphabetically. I’ve tried many different basic php sort() methods, in many different places, and can’t get this to work. I’m assuming I’m missing something? In my code, get_all_orders_that_have_a_product_variation( $product_id ); function comes from this answer code that allow to get an array of orders IDs from a variation ID… The list

Advertisement