Use PHP 7.4 featers and PHP 8 polyfills

This commit is contained in:
David Stone
2025-02-08 13:57:32 -07:00
parent 8bea6067cd
commit b41dc2b2eb
550 changed files with 15270 additions and 14627 deletions

View File

@ -11,32 +11,32 @@
<?php
$data = array();
$data = [];
$slug = 'taxes_by_code';
$headers = array(
$headers = [
__('Tax', 'wp-ultimo'),
__('Rate', 'wp-ultimo'),
__('Orders', 'wp-ultimo'),
__('Tax Total', 'wp-ultimo'),
);
];
foreach ($taxes_by_rate as $tax_line) {
$line = array(
$line = [
wu_get_isset($tax_line, 'title', 'No Name'),
$tax_line['tax_rate'],
$tax_line['order_count'],
wu_format_currency($tax_line['tax_total']),
);
];
$data[] = $line;
} // end foreach;
$page->render_csv_button(
array(
[
'headers' => $headers,
'data' => $data,
'slug' => $slug,
)
]
);
?>