Address code sniff issues

This commit is contained in:
Jonathan Sadowski 2021-04-07 14:51:48 -05:00
parent 4e8629e8c8
commit 98b4968ec2
3 changed files with 10 additions and 11 deletions

View File

@ -3,8 +3,6 @@
* Adds settings to the permalinks admin settings page * Adds settings to the permalinks admin settings page
* *
* @class WC_Admin_Permalink_Settings * @class WC_Admin_Permalink_Settings
* @author WooThemes
* @category Admin
* @package WooCommerce\Admin * @package WooCommerce\Admin
* @version 2.3.0 * @version 2.3.0
*/ */

View File

@ -12,8 +12,6 @@ if ( ! defined( 'ABSPATH' ) ) {
/** /**
* WC_Report_Sales_By_Category * WC_Report_Sales_By_Category
* *
* @author WooThemes
* @category Admin
* @package WooCommerce\Admin\Reports * @package WooCommerce\Admin\Reports
* @version 2.1.0 * @version 2.1.0
*/ */
@ -171,11 +169,11 @@ class WC_Report_Sales_By_Category extends WC_Admin_Report {
switch ( $this->chart_groupby ) { switch ( $this->chart_groupby ) {
case 'day': case 'day':
$time = strtotime( date( 'Ymd', strtotime( $order_item->post_date ) ) ) * 1000; $time = strtotime( gmdate( 'Ymd', strtotime( $order_item->post_date ) ) ) * 1000;
break; break;
case 'month': case 'month':
default: default:
$time = strtotime( date( 'Ym', strtotime( $order_item->post_date ) ) . '01' ) * 1000; $time = strtotime( gmdate( 'Ym', strtotime( $order_item->post_date ) ) . '01' ) * 1000;
break; break;
} }
@ -307,11 +305,11 @@ class WC_Report_Sales_By_Category extends WC_Admin_Report {
switch ( $this->chart_groupby ) { switch ( $this->chart_groupby ) {
case 'day': case 'day':
$time = strtotime( date( 'Ymd', strtotime( "+{$i} DAY", $this->start_date ) ) ) * 1000; $time = strtotime( gmdate( 'Ymd', strtotime( "+{$i} DAY", $this->start_date ) ) ) * 1000;
break; break;
case 'month': case 'month':
default: default:
$time = strtotime( date( 'Ym', strtotime( "+{$i} MONTH", $this->start_date ) ) . '01' ) * 1000; $time = strtotime( gmdate( 'Ym', strtotime( "+{$i} MONTH", $this->start_date ) ) . '01' ) * 1000;
break; break;
} }

View File

@ -63,7 +63,8 @@ if ( ! defined( 'ABSPATH' ) ) {
$topic_data = WC_Admin_Webhooks::get_topic_data( $webhook ); $topic_data = WC_Admin_Webhooks::get_topic_data( $webhook );
$topics = apply_filters( $topics = apply_filters(
'woocommerce_webhook_topics', array( 'woocommerce_webhook_topics',
array(
'' => __( 'Select an option…', 'woocommerce' ), '' => __( 'Select an option…', 'woocommerce' ),
'coupon.created' => __( 'Coupon created', 'woocommerce' ), 'coupon.created' => __( 'Coupon created', 'woocommerce' ),
'coupon.updated' => __( 'Coupon updated', 'woocommerce' ), 'coupon.updated' => __( 'Coupon updated', 'woocommerce' ),
@ -197,8 +198,10 @@ if ( ! defined( 'ABSPATH' ) ) {
add_query_arg( add_query_arg(
array( array(
'delete' => $webhook->get_id(), 'delete' => $webhook->get_id(),
), admin_url( 'admin.php?page=wc-settings&tab=advanced&section=webhooks' ) ),
), 'delete-webhook' admin_url( 'admin.php?page=wc-settings&tab=advanced&section=webhooks' )
),
'delete-webhook'
); );
?> ?>
<a style="color: #a00; text-decoration: none; margin-left: 10px;" href="<?php echo esc_url( $delete_url ); ?>"><?php esc_html_e( 'Delete permanently', 'woocommerce' ); ?></a> <a style="color: #a00; text-decoration: none; margin-left: 10px;" href="<?php echo esc_url( $delete_url ); ?>"><?php esc_html_e( 'Delete permanently', 'woocommerce' ); ?></a>