request('/woo/api/invoice/list', ['customer_id' => get_current_user_id()]); $invoices = $result['success'] ? ($result['data']['invoices'] ?? []) : []; // Also pull locally stored invoices from WC orders $wc_orders = wc_get_orders([ 'customer' => get_current_user_id(), 'limit' => 50, 'meta_key' => '_odoo_invoice_pdf', ]); ?>