Fix PHPCS

This commit is contained in:
Tomek Wytrębowicz 2024-09-19 23:10:59 +02:00
parent ca8049dd52
commit 51d9d4ab13
7 changed files with 31 additions and 26 deletions

View File

@ -306,7 +306,7 @@ class WC_Report_Customer_List extends WP_List_Table {
'exclude' => array_merge( $admin_users->get_results(), $manager_users->get_results() ), 'exclude' => array_merge( $admin_users->get_results(), $manager_users->get_results() ),
'number' => $per_page, 'number' => $per_page,
'offset' => ( $current_page - 1 ) * $per_page, 'offset' => ( $current_page - 1 ) * $per_page,
) ),
), ),
'9.5.0', '9.5.0',
null, null,

View File

@ -53,7 +53,7 @@ class WC_Report_Low_In_Stock extends WC_Report_Stock {
", ",
$stock, $stock,
$nostock $nostock
) ),
), ),
'9.5.0', '9.5.0',
null, null,

View File

@ -43,7 +43,7 @@ class WC_Report_Most_Stocked extends WC_Report_Stock {
AND lookup.stock_quantity > %d AND lookup.stock_quantity > %d
", ",
$stock $stock
) ),
), ),
'9.5.0', '9.5.0',
null, null,

View File

@ -50,7 +50,7 @@ class WC_Report_Out_Of_Stock extends WC_Report_Stock {
AND lookup.stock_quantity <= %d AND lookup.stock_quantity <= %d
", ",
$stock $stock
) ),
), ),
'9.5.0', '9.5.0',
null, null,

View File

@ -68,7 +68,7 @@ class WC_Report_Sales_By_Category extends WC_Admin_Report {
return array_unique( return array_unique(
apply_filters_deprecated( apply_filters_deprecated(
'woocommerce_report_sales_by_category_get_products_in_category', 'woocommerce_report_sales_by_category_get_products_in_category',
array( $product_ids, $category_id ) , array( $product_ids, $category_id ),
'9.5.0', '9.5.0',
null, null,
'Reports are deprecated and will be removed in future versions. Use Analytics instead.', 'Reports are deprecated and will be removed in future versions. Use Analytics instead.',

View File

@ -150,7 +150,7 @@ class WC_Report_Stock extends WP_List_Table {
'9.5.0', '9.5.0',
null, null,
'Reports are deprecated and will be removed in future versions. Use Analytics instead.', 'Reports are deprecated and will be removed in future versions. Use Analytics instead.',
); );
foreach ( $actions as $action ) { foreach ( $actions as $action ) {
printf( printf(

View File

@ -208,26 +208,31 @@ class WC_Report_Taxes_By_Code extends WC_Admin_Report {
$rate = $wpdb->get_var( $wpdb->prepare( "SELECT tax_rate FROM {$wpdb->prefix}woocommerce_tax_rates WHERE tax_rate_id = %d;", $rate_id ) ); $rate = $wpdb->get_var( $wpdb->prepare( "SELECT tax_rate FROM {$wpdb->prefix}woocommerce_tax_rates WHERE tax_rate_id = %d;", $rate_id ) );
?> ?>
<tr> <tr>
<th scope="row"><?php <th scope="row">
echo wp_kses_post( <?php
apply_filters_deprecated( echo wp_kses_post(
'woocommerce_reports_taxes_tax_rate', apply_filters_deprecated(
array( $tax_row->tax_rate, $rate_id, $tax_row ), 'woocommerce_reports_taxes_tax_rate',
'9.5.0', array( $tax_row->tax_rate, $rate_id, $tax_row ),
null, '9.5.0',
'Reports are deprecated and will be removed in future versions. Use Analytics instead.', null,
) 'Reports are deprecated and will be removed in future versions. Use Analytics instead.',
); ?></th> )
<td><?php );
echo wp_kses_post( ?>
apply_filters_deprecated( </th>
'woocommerce_reports_taxes_rate', <td>
array( $rate, $rate_id, $tax_row ), <?php
'9.5.0', echo wp_kses_post(
null, apply_filters_deprecated(
'Reports are deprecated and will be removed in future versions. Use Analytics instead.', 'woocommerce_reports_taxes_rate',
) array( $rate, $rate_id, $tax_row ),
); ?>%</td> '9.5.0',
null,
'Reports are deprecated and will be removed in future versions. Use Analytics instead.',
)
);
// phpcs:ignore?>%</td>
<td class="total_row"><?php echo esc_html( $tax_row->total_orders ); ?></td> <td class="total_row"><?php echo esc_html( $tax_row->total_orders ); ?></td>
<td class="total_row"><?php echo wc_price( $tax_row->tax_amount ); // phpcs:ignore ?></td> <td class="total_row"><?php echo wc_price( $tax_row->tax_amount ); // phpcs:ignore ?></td>
<td class="total_row"><?php echo wc_price( $tax_row->shipping_tax_amount ); // phpcs:ignore ?></td> <td class="total_row"><?php echo wc_price( $tax_row->shipping_tax_amount ); // phpcs:ignore ?></td>