first commit

This commit is contained in:
2026-03-05 13:07:40 +01:00
commit 64ba0721ee
25709 changed files with 4691006 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
import { addFilter } from '@wordpress/hooks';
addFilter(
'woocommerce_admin_report_table',
'wpo-wc-admin-invoice-column',
(reportTableData) => {
if (reportTableData.endpoint !== 'orders') {
return reportTableData;
}
reportTableData.headers = [
...reportTableData.headers,
{
label: wpo_wcpdf_analytics_order.label,
key: 'order_invoice_number',
screenReaderLabel: wpo_wcpdf_analytics_order.label,
isSortable: false,
},
];
if (
! reportTableData.items ||
! reportTableData.items.data ||
! reportTableData.items.data.length
) {
return reportTableData;
}
reportTableData.rows = reportTableData.rows.map((row, index) => {
const order = reportTableData.items.data[index];
return [
...row,
{
display: order.invoice_number,
value: order.invoice_number,
},
];
});
return reportTableData;
}
);