WooCommerce custom report: Get orders with completed status
问题 im making a custom reports for woocommerce im trying to add a report for all delivered orders here is what im doing $orders = wc_get_orders( array('numberposts' => -1) ); foreach( $orders as $order ){ if ( $order->get_status() === completed){ $order_data = $order->get_data(); // The Order data $items = $order->get_items(); foreach ( $items as $item ) { $product_name = $item->get_name(); $product_id = $item->get_product_id(); } $orders_completed .= '<tr><td>' . $order->get_order_number() . '<