diff --git a/includes/admin/reports/class-wc-report-sales-by-product.php b/includes/admin/reports/class-wc-report-sales-by-product.php
index bee24a871ef..208116b3ad6 100644
--- a/includes/admin/reports/class-wc-report-sales-by-product.php
+++ b/includes/admin/reports/class-wc-report-sales-by-product.php
@@ -64,8 +64,8 @@ class WC_Report_Sales_By_Product extends WC_Admin_Report {
'type' => 'order_item_meta',
'order_item_type' => 'line_item',
'function' => 'SUM',
- 'name' => 'order_item_amount'
- )
+ 'name' => 'order_item_amount',
+ ),
),
'where_meta' => array(
'relation' => 'OR',
@@ -73,11 +73,11 @@ class WC_Report_Sales_By_Product extends WC_Admin_Report {
'type' => 'order_item_meta',
'meta_key' => array( '_product_id', '_variation_id' ),
'meta_value' => $this->product_ids,
- 'operator' => 'IN'
+ 'operator' => 'IN',
)
),
'query_type' => 'get_var',
- 'filter_range' => true
+ 'filter_range' => true,
) );
$total_items = absint( $this->get_order_report_data( array(
@@ -86,8 +86,8 @@ class WC_Report_Sales_By_Product extends WC_Admin_Report {
'type' => 'order_item_meta',
'order_item_type' => 'line_item',
'function' => 'SUM',
- 'name' => 'order_item_count'
- )
+ 'name' => 'order_item_count',
+ ),
),
'where_meta' => array(
'relation' => 'OR',
@@ -95,23 +95,23 @@ class WC_Report_Sales_By_Product extends WC_Admin_Report {
'type' => 'order_item_meta',
'meta_key' => array( '_product_id', '_variation_id' ),
'meta_value' => $this->product_ids,
- 'operator' => 'IN'
+ 'operator' => 'IN',
)
),
'query_type' => 'get_var',
- 'filter_range' => true
+ 'filter_range' => true,
) ) );
$legend[] = array(
'title' => sprintf( __( '%s sales for the selected items', 'woocommerce' ), '
' ),
'color' => $this->chart_colours['sales_amount'],
- 'highlight_series' => 1
+ 'highlight_series' => 1,
);
$legend[] = array(
'title' => sprintf( __( '%s purchases for the selected items', 'woocommerce' ), '
' ),
'color' => $this->chart_colours['item_count'],
- 'highlight_series' => 0
+ 'highlight_series' => 0,
);
return $legend;
@@ -126,7 +126,7 @@ class WC_Report_Sales_By_Product extends WC_Admin_Report {
'year' => __( 'Year', 'woocommerce' ),
'last_month' => __( 'Last Month', 'woocommerce' ),
'month' => __( 'This Month', 'woocommerce' ),
- '7day' => __( 'Last 7 Days', 'woocommerce' )
+ '7day' => __( 'Last 7 Days', 'woocommerce' ),
);
$this->chart_colours = array(
@@ -156,13 +156,13 @@ class WC_Report_Sales_By_Product extends WC_Admin_Report {
if ( ! empty( $this->product_ids ) ) {
$widgets[] = array(
'title' => __( 'Showing reports for:', 'woocommerce' ),
- 'callback' => array( $this, 'current_filters' )
+ 'callback' => array( $this, 'current_filters' ),
);
}
$widgets[] = array(
'title' => '',
- 'callback' => array( $this, 'products_widget' )
+ 'callback' => array( $this, 'products_widget' ),
);
return $widgets;
@@ -220,20 +220,20 @@ class WC_Report_Sales_By_Product extends WC_Admin_Report {
'type' => 'order_item_meta',
'order_item_type' => 'line_item',
'function' => '',
- 'name' => 'product_id'
+ 'name' => 'product_id',
),
'_qty' => array(
'type' => 'order_item_meta',
'order_item_type' => 'line_item',
'function' => 'SUM',
- 'name' => 'order_item_qty'
- )
+ 'name' => 'order_item_qty',
+ ),
),
'order_by' => 'order_item_qty DESC',
'group_by' => 'product_id',
'limit' => 12,
'query_type' => 'get_results',
- 'filter_range' => true
+ 'filter_range' => true,
) );
if ( $top_sellers ) {
@@ -260,28 +260,28 @@ class WC_Report_Sales_By_Product extends WC_Admin_Report {
'type' => 'order_item_meta',
'order_item_type' => 'line_item',
'function' => '',
- 'name' => 'product_id'
+ 'name' => 'product_id',
),
'_qty' => array(
'type' => 'order_item_meta',
'order_item_type' => 'line_item',
'function' => 'SUM',
- 'name' => 'order_item_qty'
- )
+ 'name' => 'order_item_qty',
+ ),
),
'where_meta' => array(
array(
'type' => 'order_item_meta',
'meta_key' => '_line_subtotal',
'meta_value' => '0',
- 'operator' => '='
+ 'operator' => '=',
)
),
'order_by' => 'order_item_qty DESC',
'group_by' => 'product_id',
'limit' => 12,
'query_type' => 'get_results',
- 'filter_range' => true
+ 'filter_range' => true,
) );
if ( $top_freebies ) {
@@ -308,20 +308,20 @@ class WC_Report_Sales_By_Product extends WC_Admin_Report {
'type' => 'order_item_meta',
'order_item_type' => 'line_item',
'function' => '',
- 'name' => 'product_id'
+ 'name' => 'product_id',
),
'_line_total' => array(
'type' => 'order_item_meta',
'order_item_type' => 'line_item',
'function' => 'SUM',
- 'name' => 'order_item_total'
- )
+ 'name' => 'order_item_total',
+ ),
),
'order_by' => 'order_item_total DESC',
'group_by' => 'product_id',
'limit' => 12,
'query_type' => 'get_results',
- 'filter_range' => true
+ 'filter_range' => true,
) );
if ( $top_earners ) {
@@ -402,19 +402,19 @@ class WC_Report_Sales_By_Product extends WC_Admin_Report {
'type' => 'order_item_meta',
'order_item_type' => 'line_item',
'function' => 'SUM',
- 'name' => 'order_item_count'
+ 'name' => 'order_item_count',
),
'post_date' => array(
'type' => 'post_data',
'function' => '',
- 'name' => 'post_date'
+ 'name' => 'post_date',
),
'_product_id' => array(
'type' => 'order_item_meta',
'order_item_type' => 'line_item',
'function' => '',
- 'name' => 'product_id'
- )
+ 'name' => 'product_id',
+ ),
),
'where_meta' => array(
'relation' => 'OR',
@@ -422,13 +422,13 @@ class WC_Report_Sales_By_Product extends WC_Admin_Report {
'type' => 'order_item_meta',
'meta_key' => array( '_product_id', '_variation_id' ),
'meta_value' => $this->product_ids,
- 'operator' => 'IN'
+ 'operator' => 'IN',
),
),
'group_by' => 'product_id,' . $this->group_by_query,
'order_by' => 'post_date ASC',
'query_type' => 'get_results',
- 'filter_range' => true
+ 'filter_range' => true,
) );
$order_item_amounts = $this->get_order_report_data( array(
@@ -437,18 +437,18 @@ class WC_Report_Sales_By_Product extends WC_Admin_Report {
'type' => 'order_item_meta',
'order_item_type' => 'line_item',
'function' => 'SUM',
- 'name' => 'order_item_amount'
+ 'name' => 'order_item_amount',
),
'post_date' => array(
'type' => 'post_data',
'function' => '',
- 'name' => 'post_date'
+ 'name' => 'post_date',
),
'_product_id' => array(
'type' => 'order_item_meta',
'order_item_type' => 'line_item',
'function' => '',
- 'name' => 'product_id'
+ 'name' => 'product_id',
),
),
'where_meta' => array(
@@ -457,13 +457,13 @@ class WC_Report_Sales_By_Product extends WC_Admin_Report {
'type' => 'order_item_meta',
'meta_key' => array( '_product_id', '_variation_id' ),
'meta_value' => $this->product_ids,
- 'operator' => 'IN'
+ 'operator' => 'IN',
),
),
'group_by' => 'product_id, ' . $this->group_by_query,
'order_by' => 'post_date ASC',
'query_type' => 'get_results',
- 'filter_range' => true
+ 'filter_range' => true,
) );
// Prepare data for report
@@ -473,7 +473,7 @@ class WC_Report_Sales_By_Product extends WC_Admin_Report {
// Encode in json format
$chart_data = json_encode( array(
'order_item_counts' => array_values( $order_item_counts ),
- 'order_item_amounts' => array_values( $order_item_amounts )
+ 'order_item_amounts' => array_values( $order_item_amounts ),
) );
?>
diff --git a/includes/admin/reports/class-wc-report-stock.php b/includes/admin/reports/class-wc-report-stock.php
index 174b63925da..064eca42970 100644
--- a/includes/admin/reports/class-wc-report-stock.php
+++ b/includes/admin/reports/class-wc-report-stock.php
@@ -33,7 +33,7 @@ class WC_Report_Stock extends WP_List_Table {
parent::__construct( array(
'singular' => __( 'Stock', 'woocommerce' ),
'plural' => __( 'Stock', 'woocommerce' ),
- 'ajax' => false
+ 'ajax' => false,
) );
}
@@ -132,14 +132,14 @@ class WC_Report_Stock extends WP_List_Table {
$actions['edit'] = array(
'url' => admin_url( 'post.php?post=' . $action_id . '&action=edit' ),
'name' => __( 'Edit', 'woocommerce' ),
- 'action' => "edit"
+ 'action' => "edit",
);
if ( $product->is_visible() ) {
$actions['view'] = array(
'url' => get_permalink( $action_id ),
'name' => __( 'View', 'woocommerce' ),
- 'action' => "view"
+ 'action' => "view",
);
}
@@ -189,7 +189,7 @@ class WC_Report_Stock extends WP_List_Table {
$this->set_pagination_args( array(
'total_items' => $this->max_items,
'per_page' => $per_page,
- 'total_pages' => ceil( $this->max_items / $per_page )
+ 'total_pages' => ceil( $this->max_items / $per_page ),
) );
}
}
diff --git a/includes/admin/reports/class-wc-report-taxes-by-code.php b/includes/admin/reports/class-wc-report-taxes-by-code.php
index 1b0c9f3ee6c..6245a38b529 100644
--- a/includes/admin/reports/class-wc-report-taxes-by-code.php
+++ b/includes/admin/reports/class-wc-report-taxes-by-code.php
@@ -76,30 +76,30 @@ class WC_Report_Taxes_By_Code extends WC_Admin_Report {
'order_item_name' => array(
'type' => 'order_item',
'function' => '',
- 'name' => 'tax_rate'
+ 'name' => 'tax_rate',
),
'tax_amount' => array(
'type' => 'order_item_meta',
'order_item_type' => 'tax',
'function' => '',
- 'name' => 'tax_amount'
+ 'name' => 'tax_amount',
),
'shipping_tax_amount' => array(
'type' => 'order_item_meta',
'order_item_type' => 'tax',
'function' => '',
- 'name' => 'shipping_tax_amount'
+ 'name' => 'shipping_tax_amount',
),
'rate_id' => array(
'type' => 'order_item_meta',
'order_item_type' => 'tax',
'function' => '',
- 'name' => 'rate_id'
+ 'name' => 'rate_id',
),
'ID' => array(
'type' => 'post_data',
'function' => '',
- 'name' => 'post_id'
+ 'name' => 'post_id',
),
);
@@ -107,12 +107,12 @@ class WC_Report_Taxes_By_Code extends WC_Admin_Report {
array(
'key' => 'order_item_type',
'value' => 'tax',
- 'operator' => '='
+ 'operator' => '=',
),
array(
'key' => 'order_item_name',
'value' => '',
- 'operator' => '!='
+ 'operator' => '!=',
)
);
@@ -124,7 +124,7 @@ class WC_Report_Taxes_By_Code extends WC_Admin_Report {
'filter_range' => true,
'order_types' => array_merge( wc_get_order_types( 'sales-reports' ), array( 'shop_order_refund' ) ),
'order_status' => array( 'completed', 'processing', 'on-hold' ),
- 'parent_order_status' => array( 'completed', 'processing', 'on-hold' ) // Partial refunds inside refunded orders should be ignored
+ 'parent_order_status' => array( 'completed', 'processing', 'on-hold' ), // Partial refunds inside refunded orders should be ignored
) );
// Merge
diff --git a/includes/admin/reports/class-wc-report-taxes-by-date.php b/includes/admin/reports/class-wc-report-taxes-by-date.php
index 6b80f6d1f5c..eabfe908ca3 100644
--- a/includes/admin/reports/class-wc-report-taxes-by-date.php
+++ b/includes/admin/reports/class-wc-report-taxes-by-date.php
@@ -74,22 +74,22 @@ class WC_Report_Taxes_By_Date extends WC_Admin_Report {
'_order_tax' => array(
'type' => 'meta',
'function' => 'SUM',
- 'name' => 'tax_amount'
+ 'name' => 'tax_amount',
),
'_order_shipping_tax' => array(
'type' => 'meta',
'function' => 'SUM',
- 'name' => 'shipping_tax_amount'
+ 'name' => 'shipping_tax_amount',
),
'_order_total' => array(
'type' => 'meta',
'function' => 'SUM',
- 'name' => 'total_sales'
+ 'name' => 'total_sales',
),
'_order_shipping' => array(
'type' => 'meta',
'function' => 'SUM',
- 'name' => 'total_shipping'
+ 'name' => 'total_shipping',
),
'ID' => array(
'type' => 'post_data',
@@ -100,7 +100,7 @@ class WC_Report_Taxes_By_Date extends WC_Admin_Report {
'post_date' => array(
'type' => 'post_data',
'function' => '',
- 'name' => 'post_date'
+ 'name' => 'post_date',
),
);
@@ -111,7 +111,7 @@ class WC_Report_Taxes_By_Date extends WC_Admin_Report {
'query_type' => 'get_results',
'filter_range' => true,
'order_types' => wc_get_order_types( 'sales-reports' ),
- 'order_status' => array( 'completed', 'processing', 'on-hold' )
+ 'order_status' => array( 'completed', 'processing', 'on-hold' ),
) );
$tax_rows_partial_refunds = $this->get_order_report_data( array(
@@ -121,7 +121,7 @@ class WC_Report_Taxes_By_Date extends WC_Admin_Report {
'query_type' => 'get_results',
'filter_range' => true,
'order_types' => array( 'shop_order_refund' ),
- 'parent_order_status' => array( 'completed', 'processing', 'on-hold' ) // Partial refunds inside refunded orders should be ignored
+ 'parent_order_status' => array( 'completed', 'processing', 'on-hold' ) ,// Partial refunds inside refunded orders should be ignored
) );
// Merge
diff --git a/includes/admin/settings/class-wc-settings-accounts.php b/includes/admin/settings/class-wc-settings-accounts.php
index e5e5e6b81fc..314d26f4142 100644
--- a/includes/admin/settings/class-wc-settings-accounts.php
+++ b/includes/admin/settings/class-wc-settings-accounts.php
@@ -64,7 +64,7 @@ class WC_Settings_Accounts extends WC_Settings_Page {
'default' => 'yes',
'type' => 'checkbox',
'checkboxgroup' => 'start',
- 'autoload' => false
+ 'autoload' => false,
),
array(
@@ -73,7 +73,7 @@ class WC_Settings_Accounts extends WC_Settings_Page {
'default' => 'no',
'type' => 'checkbox',
'checkboxgroup' => 'end',
- 'autoload' => false
+ 'autoload' => false,
),
array(
@@ -83,7 +83,7 @@ class WC_Settings_Accounts extends WC_Settings_Page {
'default' => 'yes',
'type' => 'checkbox',
'checkboxgroup' => 'start',
- 'autoload' => false
+ 'autoload' => false,
),
array(
@@ -93,7 +93,7 @@ class WC_Settings_Accounts extends WC_Settings_Page {
'default' => 'yes',
'type' => 'checkbox',
'checkboxgroup' => 'start',
- 'autoload' => false
+ 'autoload' => false,
),
array(
@@ -102,7 +102,7 @@ class WC_Settings_Accounts extends WC_Settings_Page {
'default' => 'no',
'type' => 'checkbox',
'checkboxgroup' => 'end',
- 'autoload' => false
+ 'autoload' => false,
),
array( 'type' => 'sectionend', 'id' => 'account_registration_options' ),
diff --git a/includes/admin/settings/class-wc-settings-api.php b/includes/admin/settings/class-wc-settings-api.php
index 2f22a515cde..13a24bdb8da 100644
--- a/includes/admin/settings/class-wc-settings-api.php
+++ b/includes/admin/settings/class-wc-settings-api.php
@@ -44,7 +44,7 @@ class WC_Settings_Rest_API extends WC_Settings_Page {
$sections = array(
'' => __( 'Settings', 'woocommerce' ),
'keys' => __( 'Keys/Apps', 'woocommerce' ),
- 'webhooks' => __( 'Webhooks', 'woocommerce' )
+ 'webhooks' => __( 'Webhooks', 'woocommerce' ),
);
return apply_filters( 'woocommerce_get_sections_' . $this->id, $sections );
@@ -61,7 +61,7 @@ class WC_Settings_Rest_API extends WC_Settings_Page {
'title' => __( 'General Options', 'woocommerce' ),
'type' => 'title',
'desc' => '',
- 'id' => 'general_options'
+ 'id' => 'general_options',
),
array(
@@ -74,7 +74,7 @@ class WC_Settings_Rest_API extends WC_Settings_Page {
array(
'type' => 'sectionend',
- 'id' => 'general_options'
+ 'id' => 'general_options',
),
) );
diff --git a/includes/admin/settings/class-wc-settings-checkout.php b/includes/admin/settings/class-wc-settings-checkout.php
index 6e8247e614d..a28384ac2ca 100644
--- a/includes/admin/settings/class-wc-settings-checkout.php
+++ b/includes/admin/settings/class-wc-settings-checkout.php
@@ -41,7 +41,7 @@ class WC_Settings_Payment_Gateways extends WC_Settings_Page {
*/
public function get_sections() {
$sections = array(
- '' => __( 'Checkout Options', 'woocommerce' )
+ '' => __( 'Checkout Options', 'woocommerce' ),
);
if ( ! defined( 'WC_INSTALLING' ) ) {
@@ -289,7 +289,7 @@ class WC_Settings_Payment_Gateways extends WC_Settings_Page {
'sort' => '',
'name' => __( 'Gateway', 'woocommerce' ),
'id' => __( 'Gateway ID', 'woocommerce' ),
- 'status' => __( 'Enabled', 'woocommerce' )
+ 'status' => __( 'Enabled', 'woocommerce' ),
) );
foreach ( $columns as $key => $column ) {
diff --git a/includes/admin/settings/class-wc-settings-emails.php b/includes/admin/settings/class-wc-settings-emails.php
index 1192432acbf..537a8df77de 100644
--- a/includes/admin/settings/class-wc-settings-emails.php
+++ b/includes/admin/settings/class-wc-settings-emails.php
@@ -40,7 +40,7 @@ class WC_Settings_Emails extends WC_Settings_Page {
*/
public function get_sections() {
$sections = array(
- '' => __( 'Email Options', 'woocommerce' )
+ '' => __( 'Email Options', 'woocommerce' ),
);
return apply_filters( 'woocommerce_get_sections_' . $this->id, $sections );
}
@@ -71,7 +71,7 @@ class WC_Settings_Emails extends WC_Settings_Page {
'css' => 'min-width:300px;',
'default' => esc_attr( get_bloginfo( 'name', 'display' ) ),
'autoload' => false,
- 'desc_tip' => true
+ 'desc_tip' => true,
),
array(
@@ -80,12 +80,12 @@ class WC_Settings_Emails extends WC_Settings_Page {
'id' => 'woocommerce_email_from_address',
'type' => 'email',
'custom_attributes' => array(
- 'multiple' => 'multiple'
+ 'multiple' => 'multiple',
),
'css' => 'min-width:300px;',
'default' => get_option( 'admin_email' ),
'autoload' => false,
- 'desc_tip' => true
+ 'desc_tip' => true,
),
array( 'type' => 'sectionend', 'id' => 'email_options' ),
@@ -101,7 +101,7 @@ class WC_Settings_Emails extends WC_Settings_Page {
'placeholder' => __( 'N/A', 'woocommerce' ),
'default' => '',
'autoload' => false,
- 'desc_tip' => true
+ 'desc_tip' => true,
),
array(
@@ -113,7 +113,7 @@ class WC_Settings_Emails extends WC_Settings_Page {
'type' => 'textarea',
'default' => get_bloginfo( 'name', 'display' ) . ' - ' . __( 'Powered by WooCommerce', 'woocommerce' ),
'autoload' => false,
- 'desc_tip' => true
+ 'desc_tip' => true,
),
array(
@@ -124,7 +124,7 @@ class WC_Settings_Emails extends WC_Settings_Page {
'css' => 'width:6em;',
'default' => '#96588a',
'autoload' => false,
- 'desc_tip' => true
+ 'desc_tip' => true,
),
array(
@@ -135,7 +135,7 @@ class WC_Settings_Emails extends WC_Settings_Page {
'css' => 'width:6em;',
'default' => '#f7f7f7',
'autoload' => false,
- 'desc_tip' => true
+ 'desc_tip' => true,
),
array(
@@ -146,7 +146,7 @@ class WC_Settings_Emails extends WC_Settings_Page {
'css' => 'width:6em;',
'default' => '#ffffff',
'autoload' => false,
- 'desc_tip' => true
+ 'desc_tip' => true,
),
array(
@@ -157,7 +157,7 @@ class WC_Settings_Emails extends WC_Settings_Page {
'css' => 'width:6em;',
'default' => '#3c3c3c',
'autoload' => false,
- 'desc_tip' => true
+ 'desc_tip' => true,
),
array( 'type' => 'sectionend', 'id' => 'email_notification_settings' ),
@@ -233,7 +233,7 @@ class WC_Settings_Emails extends WC_Settings_Page {
'name' => __( 'Email', 'woocommerce' ),
'email_type' => __( 'Content Type', 'woocommerce' ),
'recipient' => __( 'Recipient(s)', 'woocommerce' ),
- 'actions' => ''
+ 'actions' => '',
) );
foreach ( $columns as $key => $column ) {
echo '
' . esc_html( $column ) . ' ';
diff --git a/includes/admin/settings/class-wc-settings-general.php b/includes/admin/settings/class-wc-settings-general.php
index e63203406e2..656ae524dc3 100644
--- a/includes/admin/settings/class-wc-settings-general.php
+++ b/includes/admin/settings/class-wc-settings-general.php
@@ -71,8 +71,8 @@ class WC_Settings_General extends WC_Settings_Page {
'options' => array(
'all' => __( 'Sell to All Countries', 'woocommerce' ),
'all_except' => __( 'Sell to All Countries, Except For…', 'woocommerce' ),
- 'specific' => __( 'Sell to Specific Countries', 'woocommerce' )
- )
+ 'specific' => __( 'Sell to Specific Countries', 'woocommerce' ),
+ ),
),
array(
@@ -81,7 +81,7 @@ class WC_Settings_General extends WC_Settings_Page {
'id' => 'woocommerce_all_except_countries',
'css' => 'min-width: 350px;',
'default' => '',
- 'type' => 'multi_select_countries'
+ 'type' => 'multi_select_countries',
),
array(
@@ -90,7 +90,7 @@ class WC_Settings_General extends WC_Settings_Page {
'id' => 'woocommerce_specific_allowed_countries',
'css' => 'min-width: 350px;',
'default' => '',
- 'type' => 'multi_select_countries'
+ 'type' => 'multi_select_countries',
),
array(
@@ -106,7 +106,7 @@ class WC_Settings_General extends WC_Settings_Page {
'all' => __( 'Ship to all countries', 'woocommerce' ),
'specific' => __( 'Ship to specific countries only', 'woocommerce' ),
'disabled' => __( 'Disable shipping & shipping calculations', 'woocommerce' ),
- )
+ ),
),
array(
@@ -115,7 +115,7 @@ class WC_Settings_General extends WC_Settings_Page {
'id' => 'woocommerce_specific_ship_to_countries',
'css' => '',
'default' => '',
- 'type' => 'multi_select_countries'
+ 'type' => 'multi_select_countries',
),
array(
@@ -138,7 +138,7 @@ class WC_Settings_General extends WC_Settings_Page {
'desc' => __( 'Enable taxes and tax calculations', 'woocommerce' ),
'id' => 'woocommerce_calc_taxes',
'default' => 'no',
- 'type' => 'checkbox'
+ 'type' => 'checkbox',
),
array(
@@ -146,7 +146,7 @@ class WC_Settings_General extends WC_Settings_Page {
'desc' => __( 'Enable site-wide store notice text', 'woocommerce' ),
'id' => 'woocommerce_demo_store',
'default' => 'no',
- 'type' => 'checkbox'
+ 'type' => 'checkbox',
),
array(
@@ -156,7 +156,7 @@ class WC_Settings_General extends WC_Settings_Page {
'default' => __( 'This is a demo store for testing purposes — no orders shall be fulfilled.', 'woocommerce' ),
'type' => 'textarea',
'css' => 'width:350px; height: 65px;',
- 'autoload' => false
+ 'autoload' => false,
),
array( 'type' => 'sectionend', 'id' => 'general_options'),
@@ -172,7 +172,7 @@ class WC_Settings_General extends WC_Settings_Page {
'type' => 'select',
'class' => 'wc-enhanced-select',
'desc_tip' => true,
- 'options' => $currency_code_options
+ 'options' => $currency_code_options,
),
array(
@@ -187,7 +187,7 @@ class WC_Settings_General extends WC_Settings_Page {
'left' => __( 'Left', 'woocommerce' ) . ' (' . get_woocommerce_currency_symbol() . '99.99)',
'right' => __( 'Right', 'woocommerce' ) . ' (99.99' . get_woocommerce_currency_symbol() . ')',
'left_space' => __( 'Left with space', 'woocommerce' ) . ' (' . get_woocommerce_currency_symbol() . ' 99.99)',
- 'right_space' => __( 'Right with space', 'woocommerce' ) . ' (99.99 ' . get_woocommerce_currency_symbol() . ')'
+ 'right_space' => __( 'Right with space', 'woocommerce' ) . ' (99.99 ' . get_woocommerce_currency_symbol() . ')',
),
'desc_tip' => true,
),
@@ -222,8 +222,8 @@ class WC_Settings_General extends WC_Settings_Page {
'type' => 'number',
'custom_attributes' => array(
'min' => 0,
- 'step' => 1
- )
+ 'step' => 1,
+ ),
),
array( 'type' => 'sectionend', 'id' => 'pricing_options' )
diff --git a/includes/admin/settings/class-wc-settings-products.php b/includes/admin/settings/class-wc-settings-products.php
index 88cf34f2f08..754965e3259 100644
--- a/includes/admin/settings/class-wc-settings-products.php
+++ b/includes/admin/settings/class-wc-settings-products.php
@@ -85,7 +85,7 @@ class WC_Settings_Products extends WC_Settings_Page {
'title' => __( 'Shop & Product Pages', 'woocommerce' ),
'type' => 'title',
'desc' => '',
- 'id' => 'catalog_options'
+ 'id' => 'catalog_options',
),
array(
@@ -156,7 +156,7 @@ class WC_Settings_Products extends WC_Settings_Page {
'id' => 'woocommerce_cart_redirect_after_add',
'default' => 'no',
'type' => 'checkbox',
- 'checkboxgroup' => 'start'
+ 'checkboxgroup' => 'start',
),
array(
@@ -164,19 +164,19 @@ class WC_Settings_Products extends WC_Settings_Page {
'id' => 'woocommerce_enable_ajax_add_to_cart',
'default' => 'yes',
'type' => 'checkbox',
- 'checkboxgroup' => 'end'
+ 'checkboxgroup' => 'end',
),
array(
'type' => 'sectionend',
- 'id' => 'catalog_options'
+ 'id' => 'catalog_options',
),
array(
'title' => __( 'Product Images', 'woocommerce' ),
'type' => 'title',
'desc' => sprintf( __( 'These settings affect the display and dimensions of images in your catalog - the display on the front-end will still be affected by CSS styles. After changing these settings you may need to
regenerate your thumbnails .', 'woocommerce' ), 'https://wordpress.org/extend/plugins/regenerate-thumbnails/' ),
- 'id' => 'image_options'
+ 'id' => 'image_options',
),
array(
@@ -188,7 +188,7 @@ class WC_Settings_Products extends WC_Settings_Page {
'default' => array(
'width' => '300',
'height' => '300',
- 'crop' => 1
+ 'crop' => 1,
),
'desc_tip' => true,
),
@@ -202,7 +202,7 @@ class WC_Settings_Products extends WC_Settings_Page {
'default' => array(
'width' => '600',
'height' => '600',
- 'crop' => 1
+ 'crop' => 1,
),
'desc_tip' => true,
),
@@ -216,7 +216,7 @@ class WC_Settings_Products extends WC_Settings_Page {
'default' => array(
'width' => '180',
'height' => '180',
- 'crop' => 1
+ 'crop' => 1,
),
'desc_tip' => true,
),
@@ -227,12 +227,12 @@ class WC_Settings_Products extends WC_Settings_Page {
'id' => 'woocommerce_enable_lightbox',
'default' => 'yes',
'desc_tip' => __( 'Include WooCommerce\'s lightbox. Product gallery images will open in a lightbox.', 'woocommerce' ),
- 'type' => 'checkbox'
+ 'type' => 'checkbox',
),
array(
'type' => 'sectionend',
- 'id' => 'image_options'
+ 'id' => 'image_options',
)
));
@@ -244,7 +244,7 @@ class WC_Settings_Products extends WC_Settings_Page {
'title' => __( 'Inventory', 'woocommerce' ),
'type' => 'title',
'desc' => '',
- 'id' => 'product_inventory_options'
+ 'id' => 'product_inventory_options',
),
array(
@@ -252,7 +252,7 @@ class WC_Settings_Products extends WC_Settings_Page {
'desc' => __( 'Enable stock management', 'woocommerce' ),
'id' => 'woocommerce_manage_stock',
'default' => 'yes',
- 'type' => 'checkbox'
+ 'type' => 'checkbox',
),
array(
@@ -262,11 +262,11 @@ class WC_Settings_Products extends WC_Settings_Page {
'type' => 'number',
'custom_attributes' => array(
'min' => 0,
- 'step' => 1
+ 'step' => 1,
),
'css' => 'width: 80px;',
'default' => '60',
- 'autoload' => false
+ 'autoload' => false,
),
array(
@@ -276,7 +276,7 @@ class WC_Settings_Products extends WC_Settings_Page {
'default' => 'yes',
'type' => 'checkbox',
'checkboxgroup' => 'start',
- 'autoload' => false
+ 'autoload' => false,
),
array(
@@ -285,7 +285,7 @@ class WC_Settings_Products extends WC_Settings_Page {
'default' => 'yes',
'type' => 'checkbox',
'checkboxgroup' => 'end',
- 'autoload' => false
+ 'autoload' => false,
),
array(
@@ -296,7 +296,7 @@ class WC_Settings_Products extends WC_Settings_Page {
'default' => get_option( 'admin_email' ),
'css' => 'width: 250px;',
'autoload' => false,
- 'desc_tip' => true
+ 'desc_tip' => true,
),
array(
@@ -307,7 +307,7 @@ class WC_Settings_Products extends WC_Settings_Page {
'type' => 'number',
'custom_attributes' => array(
'min' => 0,
- 'step' => 1
+ 'step' => 1,
),
'default' => '2',
'autoload' => false,
@@ -322,7 +322,7 @@ class WC_Settings_Products extends WC_Settings_Page {
'type' => 'number',
'custom_attributes' => array(
'min' => 0,
- 'step' => 1
+ 'step' => 1,
),
'default' => '0',
'desc_tip' => true,
@@ -333,7 +333,7 @@ class WC_Settings_Products extends WC_Settings_Page {
'desc' => __( 'Hide out of stock items from the catalog', 'woocommerce' ),
'id' => 'woocommerce_hide_out_of_stock_items',
'default' => 'no',
- 'type' => 'checkbox'
+ 'type' => 'checkbox',
),
array(
@@ -354,7 +354,7 @@ class WC_Settings_Products extends WC_Settings_Page {
array(
'type' => 'sectionend',
- 'id' => 'product_inventory_options'
+ 'id' => 'product_inventory_options',
),
));
@@ -364,7 +364,7 @@ class WC_Settings_Products extends WC_Settings_Page {
array(
'title' => __( 'Downloadable Products', 'woocommerce' ),
'type' => 'title',
- 'id' => 'digital_download_options'
+ 'id' => 'digital_download_options',
),
array(
@@ -381,7 +381,7 @@ class WC_Settings_Products extends WC_Settings_Page {
'xsendfile' => __( 'X-Accel-Redirect/X-Sendfile', 'woocommerce' ),
'redirect' => __( 'Redirect only', 'woocommerce' ),
),
- 'autoload' => false
+ 'autoload' => false,
),
array(
@@ -392,7 +392,7 @@ class WC_Settings_Products extends WC_Settings_Page {
'default' => 'no',
'desc_tip' => __( 'This setting does not apply to guest purchases.', 'woocommerce' ),
'checkboxgroup' => 'start',
- 'autoload' => false
+ 'autoload' => false,
),
array(
@@ -402,12 +402,12 @@ class WC_Settings_Products extends WC_Settings_Page {
'default' => 'yes',
'desc_tip' => __( 'Enable this option to grant access to downloads when orders are "processing", rather than "completed".', 'woocommerce' ),
'checkboxgroup' => 'end',
- 'autoload' => false
+ 'autoload' => false,
),
array(
'type' => 'sectionend',
- 'id' => 'digital_download_options'
+ 'id' => 'digital_download_options',
),
));
@@ -417,7 +417,7 @@ class WC_Settings_Products extends WC_Settings_Page {
array(
'title' => __( 'Measurements', 'woocommerce' ),
'type' => 'title',
- 'id' => 'product_measurement_options'
+ 'id' => 'product_measurement_options',
),
array(
@@ -509,7 +509,7 @@ class WC_Settings_Products extends WC_Settings_Page {
array(
'type' => 'sectionend',
- 'id' => 'product_rating_options'
+ 'id' => 'product_rating_options',
),
));
diff --git a/includes/admin/settings/class-wc-settings-shipping.php b/includes/admin/settings/class-wc-settings-shipping.php
index 044f1a7f823..f0625239d1e 100644
--- a/includes/admin/settings/class-wc-settings-shipping.php
+++ b/includes/admin/settings/class-wc-settings-shipping.php
@@ -47,7 +47,7 @@ class WC_Settings_Shipping extends WC_Settings_Page {
$sections = array(
'' => __( 'Shipping Zones', 'woocommerce' ),
'options' => __( 'Shipping Options', 'woocommerce' ),
- 'classes' => __( 'Shipping Classes', 'woocommerce' )
+ 'classes' => __( 'Shipping Classes', 'woocommerce' ),
);
if ( ! defined( 'WC_INSTALLING' ) ) {
@@ -83,7 +83,7 @@ class WC_Settings_Shipping extends WC_Settings_Page {
'default' => 'yes',
'type' => 'checkbox',
'checkboxgroup' => 'start',
- 'autoload' => false
+ 'autoload' => false,
),
array(
@@ -92,7 +92,7 @@ class WC_Settings_Shipping extends WC_Settings_Page {
'default' => 'no',
'type' => 'checkbox',
'checkboxgroup' => 'end',
- 'autoload' => false
+ 'autoload' => false,
),
array(
@@ -118,7 +118,7 @@ class WC_Settings_Shipping extends WC_Settings_Page {
'id' => 'woocommerce_shipping_debug_mode',
'default' => 'no',
'type' => 'checkbox',
- 'autoload' => false
+ 'autoload' => false,
),
array( 'type' => 'sectionend', 'id' => 'shipping_options' ),
@@ -305,7 +305,7 @@ class WC_Settings_Shipping extends WC_Settings_Page {
'wc_shipping_classes_nonce' => wp_create_nonce( 'wc_shipping_classes_nonce' ),
'strings' => array(
'unload_confirmation_msg' => __( 'Your changed data will be lost if you leave this page without saving.', 'woocommerce' ),
- 'save_failed' => __( 'Your changes were not saved. Please retry.', 'woocommerce' )
+ 'save_failed' => __( 'Your changes were not saved. Please retry.', 'woocommerce' ),
),
) );
wp_enqueue_script( 'wc-shipping-classes' );
diff --git a/includes/admin/settings/class-wc-settings-tax.php b/includes/admin/settings/class-wc-settings-tax.php
index 86463aad912..a1bbed1d209 100644
--- a/includes/admin/settings/class-wc-settings-tax.php
+++ b/includes/admin/settings/class-wc-settings-tax.php
@@ -53,7 +53,7 @@ class WC_Settings_Tax extends WC_Settings_Page {
public function get_sections() {
$sections = array(
'' => __( 'Tax Options', 'woocommerce' ),
- 'standard' => __( 'Standard Rates', 'woocommerce' )
+ 'standard' => __( 'Standard Rates', 'woocommerce' ),
);
// Get tax classes and display as links
@@ -225,7 +225,7 @@ class WC_Settings_Tax extends WC_Settings_Page {
'tax_rate_state',
'tax_rate',
'tax_rate_name',
- 'tax_rate_priority'
+ 'tax_rate_priority',
);
foreach ( $tax_rate_keys as $tax_rate_key ) {
diff --git a/includes/admin/settings/views/html-webhooks-edit.php b/includes/admin/settings/views/html-webhooks-edit.php
index 27b9f8aae25..c12a759138c 100644
--- a/includes/admin/settings/views/html-webhooks-edit.php
+++ b/includes/admin/settings/views/html-webhooks-edit.php
@@ -61,7 +61,7 @@ if ( ! defined( 'ABSPATH' ) ) {
'product.updated' => __( 'Product Updated', 'woocommerce' ),
'product.deleted' => __( 'Product Deleted', 'woocommerce' ),
'action' => __( 'Action', 'woocommerce' ),
- 'custom' => __( 'Custom', 'woocommerce' )
+ 'custom' => __( 'Custom', 'woocommerce' ),
) );
foreach ( $topics as $topic_slug => $topic_name ) : ?>
diff --git a/includes/admin/settings/views/settings-tax.php b/includes/admin/settings/views/settings-tax.php
index 235166b44b8..153f329241a 100644
--- a/includes/admin/settings/views/settings-tax.php
+++ b/includes/admin/settings/views/settings-tax.php
@@ -16,7 +16,7 @@ return apply_filters( 'woocommerce_tax_settings', array(
'desc_tip' => __( 'This option is important as it will affect how you input prices. Changing it will not update existing products.', 'woocommerce' ),
'options' => array(
'yes' => __( 'Yes, I will enter prices inclusive of tax', 'woocommerce' ),
- 'no' => __( 'No, I will enter prices exclusive of tax', 'woocommerce' )
+ 'no' => __( 'No, I will enter prices exclusive of tax', 'woocommerce' ),
),
),
@@ -30,7 +30,7 @@ return apply_filters( 'woocommerce_tax_settings', array(
'options' => array(
'shipping' => __( 'Customer shipping address', 'woocommerce' ),
'billing' => __( 'Customer billing address', 'woocommerce' ),
- 'base' => __( 'Shop base address', 'woocommerce' )
+ 'base' => __( 'Shop base address', 'woocommerce' ),
),
),
@@ -60,7 +60,7 @@ return apply_filters( 'woocommerce_tax_settings', array(
'id' => 'woocommerce_tax_classes',
'css' => 'width:100%; height: 65px;',
'type' => 'textarea',
- 'default' => sprintf( __( 'Reduced Rate%sZero Rate', 'woocommerce' ), PHP_EOL )
+ 'default' => sprintf( __( 'Reduced Rate%sZero Rate', 'woocommerce' ), PHP_EOL ),
),
array(
@@ -72,7 +72,7 @@ return apply_filters( 'woocommerce_tax_settings', array(
'options' => array(
'incl' => __( 'Including tax', 'woocommerce' ),
'excl' => __( 'Excluding tax', 'woocommerce' ),
- )
+ ),
),
array(
@@ -85,7 +85,7 @@ return apply_filters( 'woocommerce_tax_settings', array(
'incl' => __( 'Including tax', 'woocommerce' ),
'excl' => __( 'Excluding tax', 'woocommerce' ),
),
- 'autoload' => false
+ 'autoload' => false,
),
array(
@@ -107,7 +107,7 @@ return apply_filters( 'woocommerce_tax_settings', array(
'single' => __( 'As a single total', 'woocommerce' ),
'itemized' => __( 'Itemized', 'woocommerce' ),
),
- 'autoload' => false
+ 'autoload' => false,
),
array( 'type' => 'sectionend', 'id' => 'tax_options' ),
diff --git a/includes/admin/views/html-bulk-edit-product.php b/includes/admin/views/html-bulk-edit-product.php
index a98b2a56929..333a71c84b0 100644
--- a/includes/admin/views/html-bulk-edit-product.php
+++ b/includes/admin/views/html-bulk-edit-product.php
@@ -26,7 +26,7 @@ if ( ! defined( 'ABSPATH' ) ) {
'' => __( '— No Change —', 'woocommerce' ),
'1' => __( 'Change to:', 'woocommerce' ),
'2' => __( 'Increase by (fixed amount or %):', 'woocommerce' ),
- '3' => __( 'Decrease by (fixed amount or %):', 'woocommerce' )
+ '3' => __( 'Decrease by (fixed amount or %):', 'woocommerce' ),
);
foreach ($options as $key => $value) {
echo '
' . $value . ' ';
@@ -51,7 +51,7 @@ if ( ! defined( 'ABSPATH' ) ) {
'1' => __( 'Change to:', 'woocommerce' ),
'2' => __( 'Increase by (fixed amount or %):', 'woocommerce' ),
'3' => __( 'Decrease by (fixed amount or %):', 'woocommerce' ),
- '4' => __( 'Decrease regular price by (fixed amount or %):', 'woocommerce' )
+ '4' => __( 'Decrease regular price by (fixed amount or %):', 'woocommerce' ),
);
foreach ( $options as $key => $value ) {
echo '
' . $value . ' ';
@@ -75,7 +75,7 @@ if ( ! defined( 'ABSPATH' ) ) {
'' => __( '— No Change —', 'woocommerce' ),
'taxable' => __( 'Taxable', 'woocommerce' ),
'shipping' => __( 'Shipping only', 'woocommerce' ),
- 'none' => _x( 'None', 'Tax status', 'woocommerce' )
+ 'none' => _x( 'None', 'Tax status', 'woocommerce' ),
);
foreach ($options as $key => $value) {
echo '
' . $value . ' ';
@@ -92,7 +92,7 @@ if ( ! defined( 'ABSPATH' ) ) {
__( '— No Change —', 'woocommerce' ),
- 'standard' => __( 'Standard', 'woocommerce' )
+ 'standard' => __( 'Standard', 'woocommerce' ),
);
$tax_classes = WC_Tax::get_tax_classes();
@@ -120,7 +120,7 @@ if ( ! defined( 'ABSPATH' ) ) {
__( '— No Change —', 'woocommerce' ),
- '1' => __( 'Change to:', 'woocommerce' )
+ '1' => __( 'Change to:', 'woocommerce' ),
);
foreach ( $options as $key => $value ) {
echo '
'. $value .' ';
@@ -144,7 +144,7 @@ if ( ! defined( 'ABSPATH' ) ) {
__( '— No Change —', 'woocommerce' ),
- '1' => __( 'Change to:', 'woocommerce' )
+ '1' => __( 'Change to:', 'woocommerce' ),
);
foreach ( $options as $key => $value ) {
echo '
'. $value .' ';
@@ -186,7 +186,7 @@ if ( ! defined( 'ABSPATH' ) ) {
'visible' => __( 'Catalog & search', 'woocommerce' ),
'catalog' => __( 'Catalog', 'woocommerce' ),
'search' => __( 'Search', 'woocommerce' ),
- 'hidden' => __( 'Hidden', 'woocommerce' )
+ 'hidden' => __( 'Hidden', 'woocommerce' ),
);
foreach ( $options as $key => $value ) {
echo '
'. $value .' ';
@@ -203,7 +203,7 @@ if ( ! defined( 'ABSPATH' ) ) {
$options = array(
'' => __( '— No Change —', 'woocommerce' ),
'yes' => __( 'Yes', 'woocommerce' ),
- 'no' => __( 'No', 'woocommerce' )
+ 'no' => __( 'No', 'woocommerce' ),
);
foreach ($options as $key => $value) {
echo '
'. $value .' ';
@@ -221,7 +221,7 @@ if ( ! defined( 'ABSPATH' ) ) {
$options = array(
'' => __( '— No Change —', 'woocommerce' ),
'instock' => __( 'In stock', 'woocommerce' ),
- 'outofstock' => __( 'Out of stock', 'woocommerce' )
+ 'outofstock' => __( 'Out of stock', 'woocommerce' ),
);
foreach ( $options as $key => $value ) {
echo '
'. $value .' ';
@@ -240,7 +240,7 @@ if ( ! defined( 'ABSPATH' ) ) {
$options = array(
'' => __( '— No Change —', 'woocommerce' ),
'yes' => __( 'Yes', 'woocommerce' ),
- 'no' => __( 'No', 'woocommerce' )
+ 'no' => __( 'No', 'woocommerce' ),
);
foreach ( $options as $key => $value ) {
echo '
'. $value .' ';
@@ -258,7 +258,7 @@ if ( ! defined( 'ABSPATH' ) ) {
__( '— No Change —', 'woocommerce' ),
- '1' => __( 'Change to:', 'woocommerce' )
+ '1' => __( 'Change to:', 'woocommerce' ),
);
foreach ( $options as $key => $value ) {
echo '
'. $value .' ';
@@ -281,7 +281,7 @@ if ( ! defined( 'ABSPATH' ) ) {
'' => __( '— No Change —', 'woocommerce' ),
'no' => __( 'Do not allow', 'woocommerce' ),
'notify' => __( 'Allow, but notify customer', 'woocommerce' ),
- 'yes' => __( 'Allow', 'woocommerce' )
+ 'yes' => __( 'Allow', 'woocommerce' ),
);
foreach ( $options as $key => $value ) {
echo '
'. $value .' ';
@@ -301,7 +301,7 @@ if ( ! defined( 'ABSPATH' ) ) {
$options = array(
'' => __( '— No Change —', 'woocommerce' ),
'yes' => __( 'Yes', 'woocommerce' ),
- 'no' => __( 'No', 'woocommerce' )
+ 'no' => __( 'No', 'woocommerce' ),
);
foreach ( $options as $key => $value ) {
echo '
' . esc_html( $value ) . ' ';
diff --git a/includes/admin/views/html-quick-edit-product.php b/includes/admin/views/html-quick-edit-product.php
index 782aa8c1e14..819cfbdd030 100644
--- a/includes/admin/views/html-quick-edit-product.php
+++ b/includes/admin/views/html-quick-edit-product.php
@@ -54,7 +54,7 @@ if ( ! defined( 'ABSPATH' ) ) {
$options = array(
'taxable' => __( 'Taxable', 'woocommerce' ),
'shipping' => __( 'Shipping only', 'woocommerce' ),
- 'none' => _x( 'None', 'Tax status', 'woocommerce' )
+ 'none' => _x( 'None', 'Tax status', 'woocommerce' ),
);
foreach ( $options as $key => $value ) {
echo '
' . $value . ' ';
@@ -70,7 +70,7 @@ if ( ! defined( 'ABSPATH' ) ) {
__( 'Standard', 'woocommerce' )
+ '' => __( 'Standard', 'woocommerce' ),
);
$tax_classes = WC_Tax::get_tax_classes();
@@ -143,7 +143,7 @@ if ( ! defined( 'ABSPATH' ) ) {
'visible' => __( 'Catalog & search', 'woocommerce' ),
'catalog' => __( 'Catalog', 'woocommerce' ),
'search' => __( 'Search', 'woocommerce' ),
- 'hidden' => __( 'Hidden', 'woocommerce' )
+ 'hidden' => __( 'Hidden', 'woocommerce' ),
) );
foreach ( $options as $key => $value ) {
echo ''. $value .' ';
@@ -164,7 +164,7 @@ if ( ! defined( 'ABSPATH' ) ) {
__( 'In stock', 'woocommerce' ),
- 'outofstock' => __( 'Out of stock', 'woocommerce' )
+ 'outofstock' => __( 'Out of stock', 'woocommerce' ),
);
foreach ( $options as $key => $value ) {
echo ''. $value .' ';
@@ -200,7 +200,7 @@ if ( ! defined( 'ABSPATH' ) ) {
$options = array(
'no' => __( 'Do not allow', 'woocommerce' ),
'notify' => __( 'Allow, but notify customer', 'woocommerce' ),
- 'yes' => __( 'Allow', 'woocommerce' )
+ 'yes' => __( 'Allow', 'woocommerce' ),
);
foreach ( $options as $key => $value ) {
echo ''. $value .' ';
diff --git a/includes/admin/wc-admin-functions.php b/includes/admin/wc-admin-functions.php
index e06b25046b2..b45068b673a 100644
--- a/includes/admin/wc-admin-functions.php
+++ b/includes/admin/wc-admin-functions.php
@@ -111,7 +111,7 @@ function wc_create_page( $slug, $option = '', $page_title = '', $page_content =
'post_title' => $page_title,
'post_content' => $page_content,
'post_parent' => $post_parent,
- 'comment_status' => 'closed'
+ 'comment_status' => 'closed',
);
$page_id = wp_insert_post( $page_data );
}
diff --git a/includes/api/class-wc-rest-coupons-controller.php b/includes/api/class-wc-rest-coupons-controller.php
index 8be3a3f45d6..a7c50d8f1cb 100644
--- a/includes/api/class-wc-rest-coupons-controller.php
+++ b/includes/api/class-wc-rest-coupons-controller.php
@@ -385,7 +385,7 @@ class WC_REST_Coupons_Controller extends WC_REST_Posts_Controller {
'minimum_amount' => '',
'maximum_amount' => '',
'email_restrictions' => array(),
- 'description' => ''
+ 'description' => '',
);
$data = wp_parse_args( $data, $defaults );
diff --git a/includes/api/class-wc-rest-products-controller.php b/includes/api/class-wc-rest-products-controller.php
index 084430e5d3e..66f4a79870a 100644
--- a/includes/api/class-wc-rest-products-controller.php
+++ b/includes/api/class-wc-rest-products-controller.php
@@ -193,7 +193,7 @@ class WC_REST_Products_Controller extends WC_REST_Posts_Controller {
$args['meta_query'][] = array(
'key' => '_sku',
'value' => $request['sku'],
- 'compare' => '='
+ 'compare' => '=',
);
$args['post_type'] = array( 'product', 'product_variation' );
@@ -1107,7 +1107,7 @@ class WC_REST_Products_Controller extends WC_REST_Posts_Controller {
'meta_key' => '_price',
'posts_per_page' => 1,
'post_type' => 'product',
- 'fields' => 'ids'
+ 'fields' => 'ids',
) );
if ( $children_by_price ) {
@@ -2396,7 +2396,7 @@ class WC_REST_Products_Controller extends WC_REST_Posts_Controller {
'visible' => array(
'description' => __( 'If the variation is visible.', 'woocommerce' ),
'type' => 'boolean',
- 'context' => array( 'view', 'edit' )
+ 'context' => array( 'view', 'edit' ),
),
'virtual' => array(
'description' => __( 'If the variation is virtual.', 'woocommerce' ),
diff --git a/includes/api/class-wc-rest-report-top-sellers-controller.php b/includes/api/class-wc-rest-report-top-sellers-controller.php
index 4239e64d0ce..4c099a2cacd 100644
--- a/includes/api/class-wc-rest-report-top-sellers-controller.php
+++ b/includes/api/class-wc-rest-report-top-sellers-controller.php
@@ -64,7 +64,7 @@ class WC_REST_Report_Top_Sellers_Controller extends WC_REST_Report_Sales_Control
'order_item_type' => 'line_item',
'function' => 'SUM',
'name' => 'order_item_qty',
- )
+ ),
),
'order_by' => 'order_item_qty DESC',
'group_by' => 'product_id',
diff --git a/includes/api/class-wc-rest-system-status-controller.php b/includes/api/class-wc-rest-system-status-controller.php
index 17f610e4b48..a284760d622 100644
--- a/includes/api/class-wc-rest-system-status-controller.php
+++ b/includes/api/class-wc-rest-system-status-controller.php
@@ -281,7 +281,7 @@ class WC_REST_System_Status_Controller extends WC_REST_Controller {
'type' => 'array',
'context' => array( 'view', 'edit' ),
),
- )
+ ),
),
'active_plugins' => array(
'description' => __( 'Active Plugins', 'woocommerce' ),
@@ -355,7 +355,7 @@ class WC_REST_System_Status_Controller extends WC_REST_Controller {
'format' => 'uri',
'context' => array( 'view', 'edit' ),
),
- )
+ ),
),
'settings' => array(
'description' => __( 'Settings', 'woocommerce' ),
@@ -412,14 +412,14 @@ class WC_REST_System_Status_Controller extends WC_REST_Controller {
'type' => 'array',
'context' => array( 'view', 'edit' ),
),
- )
+ ),
),
'pages' => array(
'description' => __( 'WooCommerce Pages', 'woocommerce' ),
'type' => 'array',
'context' => array( 'view', 'edit' ),
),
- )
+ ),
);
return $this->add_additional_fields_schema( $schema );
@@ -469,8 +469,8 @@ class WC_REST_System_Status_Controller extends WC_REST_Controller {
'user-agent' => 'WooCommerce/' . WC()->version,
'httpversion' => '1.1',
'body' => array(
- 'cmd' => '_notify-validate'
- )
+ 'cmd' => '_notify-validate',
+ ),
) );
$post_response_successful = false;
if ( ! is_wp_error( $post_response ) && $post_response['response']['code'] >= 200 && $post_response['response']['code'] < 300 ) {
@@ -610,7 +610,7 @@ class WC_REST_System_Status_Controller extends WC_REST_Controller {
'fields' => array(
'sections' => false,
'tags' => false,
- )
+ ),
) );
if ( is_object( $api ) && ! is_wp_error( $api ) ) {
diff --git a/includes/api/class-wc-rest-system-status-tools-controller.php b/includes/api/class-wc-rest-system-status-tools-controller.php
index deb31bb76d0..dfc6fb69f48 100644
--- a/includes/api/class-wc-rest-system-status-tools-controller.php
+++ b/includes/api/class-wc-rest-system-status-tools-controller.php
@@ -150,7 +150,7 @@ class WC_REST_System_Status_Tools_Controller extends WC_REST_Controller {
'name' => __( 'Reset Usage Tracking Settings', 'woocommerce' ),
'button' => __( 'Reset usage tracking settings', 'woocommerce' ),
'desc' => __( 'This will reset your usage tracking settings, causing it to show the opt-in banner again and not sending any data.', 'woocommerce' ),
- )
+ ),
);
return apply_filters( 'woocommerce_debug_tools', $tools );
diff --git a/includes/api/legacy/v1/class-wc-api-orders.php b/includes/api/legacy/v1/class-wc-api-orders.php
index 080e3297adf..2c64106cbcd 100644
--- a/includes/api/legacy/v1/class-wc-api-orders.php
+++ b/includes/api/legacy/v1/class-wc-api-orders.php
@@ -315,7 +315,7 @@ class WC_API_Orders extends WC_API_Resource {
$args = array(
'post_id' => $id,
'approve' => 'approve',
- 'type' => 'order_note'
+ 'type' => 'order_note',
);
remove_filter( 'comments_clauses', array( 'WC_Comments', 'exclude_order_comments' ), 10, 1 );
@@ -352,7 +352,7 @@ class WC_API_Orders extends WC_API_Resource {
$query_args = array(
'fields' => 'ids',
'post_type' => 'shop_order',
- 'post_status' => array_keys( wc_get_order_statuses() )
+ 'post_status' => array_keys( wc_get_order_statuses() ),
);
// add status argument
diff --git a/includes/api/legacy/v1/class-wc-api-reports.php b/includes/api/legacy/v1/class-wc-api-reports.php
index c8be0cd31bc..5a9775d93ef 100644
--- a/includes/api/legacy/v1/class-wc-api-reports.php
+++ b/includes/api/legacy/v1/class-wc-api-reports.php
@@ -89,28 +89,28 @@ class WC_API_Reports extends WC_API_Resource {
'_order_total' => array(
'type' => 'meta',
'function' => 'SUM',
- 'name' => 'sales'
+ 'name' => 'sales',
),
'_order_tax' => array(
'type' => 'meta',
'function' => 'SUM',
- 'name' => 'tax'
+ 'name' => 'tax',
),
'_order_shipping_tax' => array(
'type' => 'meta',
'function' => 'SUM',
- 'name' => 'shipping_tax'
+ 'name' => 'shipping_tax',
),
'_order_shipping' => array(
'type' => 'meta',
'function' => 'SUM',
- 'name' => 'shipping'
+ 'name' => 'shipping',
),
'ID' => array(
'type' => 'post_data',
'function' => 'COUNT',
- 'name' => 'order_count'
- )
+ 'name' => 'order_count',
+ ),
),
'filter_range' => true,
) );
@@ -122,8 +122,8 @@ class WC_API_Reports extends WC_API_Resource {
'type' => 'order_item_meta',
'order_item_type' => 'line_item',
'function' => 'SUM',
- 'name' => 'order_item_qty'
- )
+ 'name' => 'order_item_qty',
+ ),
),
'query_type' => 'get_var',
'filter_range' => true,
@@ -136,14 +136,14 @@ class WC_API_Reports extends WC_API_Resource {
'type' => 'order_item_meta',
'order_item_type' => 'coupon',
'function' => 'SUM',
- 'name' => 'discount_amount'
- )
+ 'name' => 'discount_amount',
+ ),
),
'where' => array(
array(
'key' => 'order_item_type',
'value' => 'coupon',
- 'operator' => '='
+ 'operator' => '=',
)
),
'query_type' => 'get_var',
@@ -173,22 +173,22 @@ class WC_API_Reports extends WC_API_Resource {
'_order_total' => array(
'type' => 'meta',
'function' => 'SUM',
- 'name' => 'total_sales'
+ 'name' => 'total_sales',
),
'_order_shipping' => array(
'type' => 'meta',
'function' => 'SUM',
- 'name' => 'total_shipping'
+ 'name' => 'total_shipping',
),
'_order_tax' => array(
'type' => 'meta',
'function' => 'SUM',
- 'name' => 'total_tax'
+ 'name' => 'total_tax',
),
'_order_shipping_tax' => array(
'type' => 'meta',
'function' => 'SUM',
- 'name' => 'total_shipping_tax'
+ 'name' => 'total_shipping_tax',
),
'ID' => array(
'type' => 'post_data',
@@ -199,7 +199,7 @@ class WC_API_Reports extends WC_API_Resource {
'post_date' => array(
'type' => 'post_data',
'function' => '',
- 'name' => 'post_date'
+ 'name' => 'post_date',
),
),
'group_by' => $this->report->group_by_query,
@@ -215,19 +215,19 @@ class WC_API_Reports extends WC_API_Resource {
'type' => 'order_item_meta',
'order_item_type' => 'line_item',
'function' => 'SUM',
- 'name' => 'order_item_count'
+ 'name' => 'order_item_count',
),
'post_date' => array(
'type' => 'post_data',
'function' => '',
- 'name' => 'post_date'
+ 'name' => 'post_date',
),
),
'where' => array(
array(
'key' => 'order_item_type',
'value' => 'line_item',
- 'operator' => '='
+ 'operator' => '=',
)
),
'group_by' => $this->report->group_by_query,
@@ -243,19 +243,19 @@ class WC_API_Reports extends WC_API_Resource {
'type' => 'order_item_meta',
'order_item_type' => 'coupon',
'function' => 'SUM',
- 'name' => 'discount_amount'
+ 'name' => 'discount_amount',
),
'post_date' => array(
'type' => 'post_data',
'function' => '',
- 'name' => 'post_date'
+ 'name' => 'post_date',
),
),
'where' => array(
array(
'key' => 'order_item_type',
'value' => 'coupon',
- 'operator' => '='
+ 'operator' => '=',
)
),
'group_by' => $this->report->group_by_query . ', order_item_name',
@@ -376,14 +376,14 @@ class WC_API_Reports extends WC_API_Resource {
'type' => 'order_item_meta',
'order_item_type' => 'line_item',
'function' => '',
- 'name' => 'product_id'
+ 'name' => 'product_id',
),
'_qty' => array(
'type' => 'order_item_meta',
'order_item_type' => 'line_item',
'function' => 'SUM',
- 'name' => 'order_item_qty'
- )
+ 'name' => 'order_item_qty',
+ ),
),
'order_by' => 'order_item_qty DESC',
'group_by' => 'product_id',
diff --git a/includes/api/legacy/v1/class-wc-api-xml-handler.php b/includes/api/legacy/v1/class-wc-api-xml-handler.php
index 4cde9132fd3..68c9706f296 100644
--- a/includes/api/legacy/v1/class-wc-api-xml-handler.php
+++ b/includes/api/legacy/v1/class-wc-api-xml-handler.php
@@ -255,7 +255,7 @@ class WC_API_XML_Handler implements WC_API_Handler {
'upsell_ids' => 'upsell_id',
'cross_sell_ids' => 'cross_sell_id',
'categories' => 'category',
- 'tags' => 'tag'
+ 'tags' => 'tag',
);
foreach ( $fields_to_fix as $parent_field_name => $child_field_name ) {
diff --git a/includes/api/legacy/v2/class-wc-api-coupons.php b/includes/api/legacy/v2/class-wc-api-coupons.php
index 9252923c88d..e729850494c 100644
--- a/includes/api/legacy/v2/class-wc-api-coupons.php
+++ b/includes/api/legacy/v2/class-wc-api-coupons.php
@@ -258,7 +258,7 @@ class WC_API_Coupons extends WC_API_Resource {
'minimum_amount' => '',
'maximum_amount' => '',
'customer_emails' => array(),
- 'description' => ''
+ 'description' => '',
);
$coupon_data = wp_parse_args( $data, $defaults );
@@ -274,7 +274,7 @@ class WC_API_Coupons extends WC_API_Resource {
'post_status' => 'publish',
'post_author' => get_current_user_id(),
'post_type' => 'shop_coupon',
- 'post_excerpt' => $coupon_data['description']
+ 'post_excerpt' => $coupon_data['description'],
);
$id = wp_insert_post( $new_coupon, true );
@@ -549,7 +549,7 @@ class WC_API_Coupons extends WC_API_Resource {
if ( is_wp_error( $edit ) ) {
$coupons[] = array(
'id' => $coupon_id,
- 'error' => array( 'code' => $edit->get_error_code(), 'message' => $edit->get_error_message() )
+ 'error' => array( 'code' => $edit->get_error_code(), 'message' => $edit->get_error_message() ),
);
} else {
$coupons[] = $edit['coupon'];
@@ -563,7 +563,7 @@ class WC_API_Coupons extends WC_API_Resource {
if ( is_wp_error( $new ) ) {
$coupons[] = array(
'id' => $coupon_id,
- 'error' => array( 'code' => $new->get_error_code(), 'message' => $new->get_error_message() )
+ 'error' => array( 'code' => $new->get_error_code(), 'message' => $new->get_error_message() ),
);
} else {
$coupons[] = $new['coupon'];
diff --git a/includes/api/legacy/v2/class-wc-api-customers.php b/includes/api/legacy/v2/class-wc-api-customers.php
index 3739e8e4135..0c86dce0468 100644
--- a/includes/api/legacy/v2/class-wc-api-customers.php
+++ b/includes/api/legacy/v2/class-wc-api-customers.php
@@ -816,7 +816,7 @@ class WC_API_Customers extends WC_API_Resource {
if ( is_wp_error( $edit ) ) {
$customers[] = array(
'id' => $customer_id,
- 'error' => array( 'code' => $edit->get_error_code(), 'message' => $edit->get_error_message() )
+ 'error' => array( 'code' => $edit->get_error_code(), 'message' => $edit->get_error_message() ),
);
} else {
$customers[] = $edit['customer'];
@@ -830,7 +830,7 @@ class WC_API_Customers extends WC_API_Resource {
if ( is_wp_error( $new ) ) {
$customers[] = array(
'id' => $customer_id,
- 'error' => array( 'code' => $new->get_error_code(), 'message' => $new->get_error_message() )
+ 'error' => array( 'code' => $new->get_error_code(), 'message' => $new->get_error_message() ),
);
} else {
$customers[] = $new['customer'];
diff --git a/includes/api/legacy/v2/class-wc-api-orders.php b/includes/api/legacy/v2/class-wc-api-orders.php
index aeec5e3ffa1..de18f23a2f4 100644
--- a/includes/api/legacy/v2/class-wc-api-orders.php
+++ b/includes/api/legacy/v2/class-wc-api-orders.php
@@ -668,7 +668,7 @@ class WC_API_Orders extends WC_API_Resource {
$query_args = array(
'fields' => 'ids',
'post_type' => $this->post_type,
- 'post_status' => array_keys( wc_get_order_statuses() )
+ 'post_status' => array_keys( wc_get_order_statuses() ),
);
// add status argument
@@ -1198,7 +1198,7 @@ class WC_API_Orders extends WC_API_Resource {
$args = array(
'post_id' => $order_id,
'approve' => 'approve',
- 'type' => 'order_note'
+ 'type' => 'order_note',
);
remove_filter( 'comments_clauses', array( 'WC_Comments', 'exclude_order_comments' ), 10, 1 );
@@ -1540,7 +1540,7 @@ class WC_API_Orders extends WC_API_Resource {
'created_at' => $this->server->format_datetime( get_gmt_from_date( date( 'Y-m-d H:i:s', $refund->get_date_created() ) ) ),
'amount' => wc_format_decimal( $refund->get_amount(), 2 ),
'reason' => $refund->get_reason(),
- 'line_items' => $line_items
+ 'line_items' => $line_items,
);
return array( 'order_refund' => apply_filters( 'woocommerce_api_order_refund_response', $order_refund, $id, $fields, $refund, $order_id, $this ) );
@@ -1783,7 +1783,7 @@ class WC_API_Orders extends WC_API_Resource {
if ( is_wp_error( $edit ) ) {
$orders[] = array(
'id' => $order_id,
- 'error' => array( 'code' => $edit->get_error_code(), 'message' => $edit->get_error_message() )
+ 'error' => array( 'code' => $edit->get_error_code(), 'message' => $edit->get_error_message() ),
);
} else {
$orders[] = $edit['order'];
@@ -1797,7 +1797,7 @@ class WC_API_Orders extends WC_API_Resource {
if ( is_wp_error( $new ) ) {
$orders[] = array(
'id' => $order_id,
- 'error' => array( 'code' => $new->get_error_code(), 'message' => $new->get_error_message() )
+ 'error' => array( 'code' => $new->get_error_code(), 'message' => $new->get_error_message() ),
);
} else {
$orders[] = $new['order'];
diff --git a/includes/api/legacy/v2/class-wc-api-products.php b/includes/api/legacy/v2/class-wc-api-products.php
index eb91cf0b63d..039adc6d258 100644
--- a/includes/api/legacy/v2/class-wc-api-products.php
+++ b/includes/api/legacy/v2/class-wc-api-products.php
@@ -518,7 +518,7 @@ class WC_API_Products extends WC_API_Resource {
}
$filter = array_merge( $filter, array(
- 'in' => implode( ',', $order_ids )
+ 'in' => implode( ',', $order_ids ),
) );
$orders = WC()->api->WC_API_Orders->get_orders( $fields, $filter, $status, $page );
@@ -601,7 +601,7 @@ class WC_API_Products extends WC_API_Resource {
'description' => $term->description,
'display' => $display_type ? $display_type : 'default',
'image' => $image ? esc_url( $image ) : '',
- 'count' => intval( $term->count )
+ 'count' => intval( $term->count ),
);
return array( 'product_category' => apply_filters( 'woocommerce_api_product_category_response', $product_category, $id, $fields, $term, $this ) );
@@ -656,7 +656,7 @@ class WC_API_Products extends WC_API_Resource {
$query_args['meta_query'][] = array(
'key' => '_sku',
'value' => $args['sku'],
- 'compare' => '='
+ 'compare' => '=',
);
$query_args['post_type'] = array( 'product', 'product_variation' );
@@ -940,7 +940,7 @@ class WC_API_Products extends WC_API_Resource {
'position' => isset( $attribute['position'] ) ? (string) absint( $attribute['position'] ) : '0',
'is_visible' => ( isset( $attribute['visible'] ) && $attribute['visible'] ) ? 1 : 0,
'is_variation' => ( isset( $attribute['variation'] ) && $attribute['variation'] ) ? 1 : 0,
- 'is_taxonomy' => $is_taxonomy
+ 'is_taxonomy' => $is_taxonomy,
);
}
@@ -961,7 +961,7 @@ class WC_API_Products extends WC_API_Resource {
'position' => isset( $attribute['position'] ) ? (string) absint( $attribute['position'] ) : '0',
'is_visible' => ( isset( $attribute['visible'] ) && $attribute['visible'] ) ? 1 : 0,
'is_variation' => ( isset( $attribute['variation'] ) && $attribute['variation'] ) ? 1 : 0,
- 'is_taxonomy' => $is_taxonomy
+ 'is_taxonomy' => $is_taxonomy,
);
}
}
@@ -1044,7 +1044,7 @@ class WC_API_Products extends WC_API_Resource {
'meta_key' => '_price',
'posts_per_page' => 1,
'post_type' => 'product',
- 'fields' => 'ids'
+ 'fields' => 'ids',
) );
if ( $children_by_price ) {
@@ -1273,7 +1273,7 @@ class WC_API_Products extends WC_API_Resource {
'post_author' => get_current_user_id(),
'post_parent' => $id,
'post_type' => 'product_variation',
- 'menu_order' => $menu_order
+ 'menu_order' => $menu_order,
);
$variation_id = wp_insert_post( $new_variation );
@@ -1631,7 +1631,7 @@ class WC_API_Products extends WC_API_Resource {
$files[ md5( $file_url ) ] = array(
'name' => $file_name,
- 'file' => $file_url
+ 'file' => $file_url,
);
}
@@ -1817,7 +1817,7 @@ class WC_API_Products extends WC_API_Resource {
// Get the file
$response = wp_safe_remote_get( $image_url, array(
- 'timeout' => 10
+ 'timeout' => 10,
) );
if ( is_wp_error( $response ) ) {
@@ -1896,7 +1896,7 @@ class WC_API_Products extends WC_API_Resource {
'guid' => $upload['url'],
'post_parent' => $id,
'post_title' => $title,
- 'post_content' => $content
+ 'post_content' => $content,
);
$attachment_id = wp_insert_attachment( $attachment, $upload['file'], $id );
@@ -2015,7 +2015,7 @@ class WC_API_Products extends WC_API_Resource {
'slug' => wc_attribute_taxonomy_name( $attribute->attribute_name ),
'type' => $attribute->attribute_type,
'order_by' => $attribute->attribute_orderby,
- 'has_archives' => (bool) $attribute->attribute_public
+ 'has_archives' => (bool) $attribute->attribute_public,
);
}
@@ -2065,7 +2065,7 @@ class WC_API_Products extends WC_API_Resource {
'slug' => wc_attribute_taxonomy_name( $attribute->attribute_name ),
'type' => $attribute->attribute_type,
'order_by' => $attribute->attribute_orderby,
- 'has_archives' => (bool) $attribute->attribute_public
+ 'has_archives' => (bool) $attribute->attribute_public,
);
return array( 'product_attribute' => apply_filters( 'woocommerce_api_product_attribute_response', $product_attribute, $id, $fields, $attribute, $this ) );
@@ -2167,7 +2167,7 @@ class WC_API_Products extends WC_API_Resource {
'attribute_name' => $data['slug'],
'attribute_type' => $data['type'],
'attribute_orderby' => $data['order_by'],
- 'attribute_public' => isset( $data['has_archives'] ) && true === $data['has_archives'] ? 1 : 0
+ 'attribute_public' => isset( $data['has_archives'] ) && true === $data['has_archives'] ? 1 : 0,
),
array( '%s', '%s', '%s', '%s', '%d' )
);
@@ -2250,7 +2250,7 @@ class WC_API_Products extends WC_API_Resource {
'attribute_name' => $attribute_slug,
'attribute_type' => $attribute_type,
'attribute_orderby' => $attribute_order_by,
- 'attribute_public' => $attribute_public
+ 'attribute_public' => $attribute_public,
),
array( 'attribute_id' => $id ),
array( '%s', '%s', '%s', '%s', '%d' ),
@@ -2427,7 +2427,7 @@ class WC_API_Products extends WC_API_Resource {
$products[] = array(
'id' => $product_id,
'sku' => $product_sku,
- 'error' => array( 'code' => $edit->get_error_code(), 'message' => $edit->get_error_message() )
+ 'error' => array( 'code' => $edit->get_error_code(), 'message' => $edit->get_error_message() ),
);
} else {
$products[] = $edit['product'];
@@ -2442,7 +2442,7 @@ class WC_API_Products extends WC_API_Resource {
$products[] = array(
'id' => $product_id,
'sku' => $product_sku,
- 'error' => array( 'code' => $new->get_error_code(), 'message' => $new->get_error_message() )
+ 'error' => array( 'code' => $new->get_error_code(), 'message' => $new->get_error_message() ),
);
} else {
$products[] = $new['product'];
diff --git a/includes/api/legacy/v2/class-wc-api-reports.php b/includes/api/legacy/v2/class-wc-api-reports.php
index e981f8b7307..ed589de1dd2 100644
--- a/includes/api/legacy/v2/class-wc-api-reports.php
+++ b/includes/api/legacy/v2/class-wc-api-reports.php
@@ -223,14 +223,14 @@ class WC_API_Reports extends WC_API_Resource {
'type' => 'order_item_meta',
'order_item_type' => 'line_item',
'function' => '',
- 'name' => 'product_id'
+ 'name' => 'product_id',
),
'_qty' => array(
'type' => 'order_item_meta',
'order_item_type' => 'line_item',
'function' => 'SUM',
- 'name' => 'order_item_qty'
- )
+ 'name' => 'order_item_qty',
+ ),
),
'order_by' => 'order_item_qty DESC',
'group_by' => 'product_id',
diff --git a/includes/api/legacy/v2/class-wc-api-webhooks.php b/includes/api/legacy/v2/class-wc-api-webhooks.php
index 9299f2bd202..1b84727391a 100644
--- a/includes/api/legacy/v2/class-wc-api-webhooks.php
+++ b/includes/api/legacy/v2/class-wc-api-webhooks.php
@@ -293,7 +293,7 @@ class WC_API_Webhooks extends WC_API_Resource {
// update user ID
$webhook_data = array(
'ID' => $webhook->id,
- 'post_author' => get_current_user_id()
+ 'post_author' => get_current_user_id(),
);
// update name
diff --git a/includes/api/legacy/v3/class-wc-api-coupons.php b/includes/api/legacy/v3/class-wc-api-coupons.php
index 9252923c88d..e729850494c 100644
--- a/includes/api/legacy/v3/class-wc-api-coupons.php
+++ b/includes/api/legacy/v3/class-wc-api-coupons.php
@@ -258,7 +258,7 @@ class WC_API_Coupons extends WC_API_Resource {
'minimum_amount' => '',
'maximum_amount' => '',
'customer_emails' => array(),
- 'description' => ''
+ 'description' => '',
);
$coupon_data = wp_parse_args( $data, $defaults );
@@ -274,7 +274,7 @@ class WC_API_Coupons extends WC_API_Resource {
'post_status' => 'publish',
'post_author' => get_current_user_id(),
'post_type' => 'shop_coupon',
- 'post_excerpt' => $coupon_data['description']
+ 'post_excerpt' => $coupon_data['description'],
);
$id = wp_insert_post( $new_coupon, true );
@@ -549,7 +549,7 @@ class WC_API_Coupons extends WC_API_Resource {
if ( is_wp_error( $edit ) ) {
$coupons[] = array(
'id' => $coupon_id,
- 'error' => array( 'code' => $edit->get_error_code(), 'message' => $edit->get_error_message() )
+ 'error' => array( 'code' => $edit->get_error_code(), 'message' => $edit->get_error_message() ),
);
} else {
$coupons[] = $edit['coupon'];
@@ -563,7 +563,7 @@ class WC_API_Coupons extends WC_API_Resource {
if ( is_wp_error( $new ) ) {
$coupons[] = array(
'id' => $coupon_id,
- 'error' => array( 'code' => $new->get_error_code(), 'message' => $new->get_error_message() )
+ 'error' => array( 'code' => $new->get_error_code(), 'message' => $new->get_error_message() ),
);
} else {
$coupons[] = $new['coupon'];
diff --git a/includes/api/legacy/v3/class-wc-api-customers.php b/includes/api/legacy/v3/class-wc-api-customers.php
index aa118258ca7..801ea49de41 100644
--- a/includes/api/legacy/v3/class-wc-api-customers.php
+++ b/includes/api/legacy/v3/class-wc-api-customers.php
@@ -805,7 +805,7 @@ class WC_API_Customers extends WC_API_Resource {
if ( is_wp_error( $edit ) ) {
$customers[] = array(
'id' => $customer_id,
- 'error' => array( 'code' => $edit->get_error_code(), 'message' => $edit->get_error_message() )
+ 'error' => array( 'code' => $edit->get_error_code(), 'message' => $edit->get_error_message() ),
);
} else {
$customers[] = $edit['customer'];
@@ -819,7 +819,7 @@ class WC_API_Customers extends WC_API_Resource {
if ( is_wp_error( $new ) ) {
$customers[] = array(
'id' => $customer_id,
- 'error' => array( 'code' => $new->get_error_code(), 'message' => $new->get_error_message() )
+ 'error' => array( 'code' => $new->get_error_code(), 'message' => $new->get_error_message() ),
);
} else {
$customers[] = $new['customer'];
diff --git a/includes/api/legacy/v3/class-wc-api-orders.php b/includes/api/legacy/v3/class-wc-api-orders.php
index 4e6fbcfb04f..905fe777523 100644
--- a/includes/api/legacy/v3/class-wc-api-orders.php
+++ b/includes/api/legacy/v3/class-wc-api-orders.php
@@ -707,7 +707,7 @@ class WC_API_Orders extends WC_API_Resource {
$query_args = array(
'fields' => 'ids',
'post_type' => $this->post_type,
- 'post_status' => array_keys( wc_get_order_statuses() )
+ 'post_status' => array_keys( wc_get_order_statuses() ),
);
// add status argument
@@ -724,7 +724,7 @@ class WC_API_Orders extends WC_API_Resource {
array(
'key' => '_customer_user',
'value' => absint( $args['customer_id'] ),
- 'compare' => '='
+ 'compare' => '=',
)
);
}
@@ -1243,7 +1243,7 @@ class WC_API_Orders extends WC_API_Resource {
$args = array(
'post_id' => $order_id,
'approve' => 'approve',
- 'type' => 'order_note'
+ 'type' => 'order_note',
);
remove_filter( 'comments_clauses', array( 'WC_Comments', 'exclude_order_comments' ), 10, 1 );
@@ -1585,7 +1585,7 @@ class WC_API_Orders extends WC_API_Resource {
'created_at' => $this->server->format_datetime( get_gmt_from_date( date( 'Y-m-d H:i:s', $refund->get_date_created() ) ) ),
'amount' => wc_format_decimal( $refund->get_amount(), 2 ),
'reason' => $refund->get_reason(),
- 'line_items' => $line_items
+ 'line_items' => $line_items,
);
return array( 'order_refund' => apply_filters( 'woocommerce_api_order_refund_response', $order_refund, $id, $fields, $refund, $order_id, $this ) );
@@ -1828,7 +1828,7 @@ class WC_API_Orders extends WC_API_Resource {
if ( is_wp_error( $edit ) ) {
$orders[] = array(
'id' => $order_id,
- 'error' => array( 'code' => $edit->get_error_code(), 'message' => $edit->get_error_message() )
+ 'error' => array( 'code' => $edit->get_error_code(), 'message' => $edit->get_error_message() ),
);
} else {
$orders[] = $edit['order'];
@@ -1842,7 +1842,7 @@ class WC_API_Orders extends WC_API_Resource {
if ( is_wp_error( $new ) ) {
$orders[] = array(
'id' => $order_id,
- 'error' => array( 'code' => $new->get_error_code(), 'message' => $new->get_error_message() )
+ 'error' => array( 'code' => $new->get_error_code(), 'message' => $new->get_error_message() ),
);
} else {
$orders[] = $new['order'];
diff --git a/includes/api/legacy/v3/class-wc-api-products.php b/includes/api/legacy/v3/class-wc-api-products.php
index f21530e1c32..90cd80ecb0d 100644
--- a/includes/api/legacy/v3/class-wc-api-products.php
+++ b/includes/api/legacy/v3/class-wc-api-products.php
@@ -573,7 +573,7 @@ class WC_API_Products extends WC_API_Resource {
}
$filter = array_merge( $filter, array(
- 'in' => implode( ',', $order_ids )
+ 'in' => implode( ',', $order_ids ),
) );
$orders = WC()->api->WC_API_Orders->get_orders( $fields, $filter, $status, $page );
@@ -656,7 +656,7 @@ class WC_API_Products extends WC_API_Resource {
'description' => $term->description,
'display' => $display_type ? $display_type : 'default',
'image' => $image ? esc_url( $image ) : '',
- 'count' => intval( $term->count )
+ 'count' => intval( $term->count ),
);
return array( 'product_category' => apply_filters( 'woocommerce_api_product_category_response', $product_category, $id, $fields, $term, $this ) );
@@ -911,7 +911,7 @@ class WC_API_Products extends WC_API_Resource {
'name' => $term->name,
'slug' => $term->slug,
'description' => $term->description,
- 'count' => intval( $term->count )
+ 'count' => intval( $term->count ),
);
return array( 'product_tag' => apply_filters( 'woocommerce_api_product_tag_response', $tag, $id, $fields, $term, $this ) );
@@ -1098,7 +1098,7 @@ class WC_API_Products extends WC_API_Resource {
$query_args['meta_query'][] = array(
'key' => '_sku',
'value' => $args['sku'],
- 'compare' => '='
+ 'compare' => '=',
);
$query_args['post_type'] = array( 'product', 'product_variation' );
@@ -1425,7 +1425,7 @@ class WC_API_Products extends WC_API_Resource {
'position' => isset( $attribute['position'] ) ? (string) absint( $attribute['position'] ) : '0',
'is_visible' => ( isset( $attribute['visible'] ) && $attribute['visible'] ) ? 1 : 0,
'is_variation' => ( isset( $attribute['variation'] ) && $attribute['variation'] ) ? 1 : 0,
- 'is_taxonomy' => $is_taxonomy
+ 'is_taxonomy' => $is_taxonomy,
);
}
@@ -1446,7 +1446,7 @@ class WC_API_Products extends WC_API_Resource {
'position' => isset( $attribute['position'] ) ? (string) absint( $attribute['position'] ) : '0',
'is_visible' => ( isset( $attribute['visible'] ) && $attribute['visible'] ) ? 1 : 0,
'is_variation' => ( isset( $attribute['variation'] ) && $attribute['variation'] ) ? 1 : 0,
- 'is_taxonomy' => $is_taxonomy
+ 'is_taxonomy' => $is_taxonomy,
);
}
}
@@ -1529,7 +1529,7 @@ class WC_API_Products extends WC_API_Resource {
'meta_key' => '_price',
'posts_per_page' => 1,
'post_type' => 'product',
- 'fields' => 'ids'
+ 'fields' => 'ids',
) );
if ( $children_by_price ) {
@@ -1768,7 +1768,7 @@ class WC_API_Products extends WC_API_Resource {
'post_author' => get_current_user_id(),
'post_parent' => $id,
'post_type' => 'product_variation',
- 'menu_order' => $menu_order
+ 'menu_order' => $menu_order,
);
$variation_id = wp_insert_post( $new_variation );
@@ -2153,7 +2153,7 @@ class WC_API_Products extends WC_API_Resource {
$files[ md5( $file_url ) ] = array(
'name' => $file_name,
- 'file' => $file_url
+ 'file' => $file_url,
);
}
@@ -2373,7 +2373,7 @@ class WC_API_Products extends WC_API_Resource {
// Get the file.
$response = wp_safe_remote_get( $image_url, array(
- 'timeout' => 10
+ 'timeout' => 10,
) );
if ( is_wp_error( $response ) ) {
@@ -2477,7 +2477,7 @@ class WC_API_Products extends WC_API_Resource {
'guid' => $upload['url'],
'post_parent' => $id,
'post_title' => $title,
- 'post_content' => $content
+ 'post_content' => $content,
);
$attachment_id = wp_insert_attachment( $attachment, $upload['file'], $id );
@@ -2596,7 +2596,7 @@ class WC_API_Products extends WC_API_Resource {
'slug' => wc_attribute_taxonomy_name( $attribute->attribute_name ),
'type' => $attribute->attribute_type,
'order_by' => $attribute->attribute_orderby,
- 'has_archives' => (bool) $attribute->attribute_public
+ 'has_archives' => (bool) $attribute->attribute_public,
);
}
@@ -2646,7 +2646,7 @@ class WC_API_Products extends WC_API_Resource {
'slug' => wc_attribute_taxonomy_name( $attribute->attribute_name ),
'type' => $attribute->attribute_type,
'order_by' => $attribute->attribute_orderby,
- 'has_archives' => (bool) $attribute->attribute_public
+ 'has_archives' => (bool) $attribute->attribute_public,
);
return array( 'product_attribute' => apply_filters( 'woocommerce_api_product_attribute_response', $product_attribute, $id, $fields, $attribute, $this ) );
@@ -2748,7 +2748,7 @@ class WC_API_Products extends WC_API_Resource {
'attribute_name' => $data['slug'],
'attribute_type' => $data['type'],
'attribute_orderby' => $data['order_by'],
- 'attribute_public' => isset( $data['has_archives'] ) && true === $data['has_archives'] ? 1 : 0
+ 'attribute_public' => isset( $data['has_archives'] ) && true === $data['has_archives'] ? 1 : 0,
),
array( '%s', '%s', '%s', '%s', '%d' )
);
@@ -2832,7 +2832,7 @@ class WC_API_Products extends WC_API_Resource {
'attribute_name' => $attribute_slug,
'attribute_type' => $attribute_type,
'attribute_orderby' => $attribute_order_by,
- 'attribute_public' => $attribute_public
+ 'attribute_public' => $attribute_public,
),
array( 'attribute_id' => $id ),
array( '%s', '%s', '%s', '%s', '%d' ),
@@ -3255,7 +3255,7 @@ class WC_API_Products extends WC_API_Resource {
$products[] = array(
'id' => $product_id,
'sku' => $product_sku,
- 'error' => array( 'code' => $edit->get_error_code(), 'message' => $edit->get_error_message() )
+ 'error' => array( 'code' => $edit->get_error_code(), 'message' => $edit->get_error_message() ),
);
} else {
$products[] = $edit['product'];
@@ -3270,7 +3270,7 @@ class WC_API_Products extends WC_API_Resource {
$products[] = array(
'id' => $product_id,
'sku' => $product_sku,
- 'error' => array( 'code' => $new->get_error_code(), 'message' => $new->get_error_message() )
+ 'error' => array( 'code' => $new->get_error_code(), 'message' => $new->get_error_message() ),
);
} else {
$products[] = $new['product'];
@@ -3348,7 +3348,7 @@ class WC_API_Products extends WC_API_Resource {
'slug' => $term->slug,
'parent' => $term->parent,
'description' => $term->description,
- 'count' => intval( $term->count )
+ 'count' => intval( $term->count ),
);
return array( 'product_shipping_class' => apply_filters( 'woocommerce_api_product_shipping_class_response', $product_shipping_class, $id, $fields, $term, $this ) );
diff --git a/includes/api/legacy/v3/class-wc-api-reports.php b/includes/api/legacy/v3/class-wc-api-reports.php
index e981f8b7307..ed589de1dd2 100644
--- a/includes/api/legacy/v3/class-wc-api-reports.php
+++ b/includes/api/legacy/v3/class-wc-api-reports.php
@@ -223,14 +223,14 @@ class WC_API_Reports extends WC_API_Resource {
'type' => 'order_item_meta',
'order_item_type' => 'line_item',
'function' => '',
- 'name' => 'product_id'
+ 'name' => 'product_id',
),
'_qty' => array(
'type' => 'order_item_meta',
'order_item_type' => 'line_item',
'function' => 'SUM',
- 'name' => 'order_item_qty'
- )
+ 'name' => 'order_item_qty',
+ ),
),
'order_by' => 'order_item_qty DESC',
'group_by' => 'product_id',
diff --git a/includes/api/legacy/v3/class-wc-api-taxes.php b/includes/api/legacy/v3/class-wc-api-taxes.php
index 11c50152486..04fe9c43d4c 100644
--- a/includes/api/legacy/v3/class-wc-api-taxes.php
+++ b/includes/api/legacy/v3/class-wc-api-taxes.php
@@ -147,7 +147,7 @@ class WC_API_Taxes extends WC_API_Resource {
'compound' => (bool) $tax['tax_rate_compound'],
'shipping' => (bool) $tax['tax_rate_shipping'],
'order' => (int) $tax['tax_rate_order'],
- 'class' => $tax['tax_rate_class'] ? $tax['tax_rate_class'] : 'standard'
+ 'class' => $tax['tax_rate_class'] ? $tax['tax_rate_class'] : 'standard',
);
// Get locales from a tax rate
@@ -436,7 +436,7 @@ class WC_API_Taxes extends WC_API_Resource {
return array(
'results' => $results,
- 'headers' => $headers
+ 'headers' => $headers,
);
}
@@ -482,7 +482,7 @@ class WC_API_Taxes extends WC_API_Resource {
if ( is_wp_error( $edit ) ) {
$taxes[] = array(
'id' => $tax_id,
- 'error' => array( 'code' => $edit->get_error_code(), 'message' => $edit->get_error_message() )
+ 'error' => array( 'code' => $edit->get_error_code(), 'message' => $edit->get_error_message() ),
);
} else {
$taxes[] = $edit['tax'];
@@ -496,7 +496,7 @@ class WC_API_Taxes extends WC_API_Resource {
if ( is_wp_error( $new ) ) {
$taxes[] = array(
'id' => $tax_id,
- 'error' => array( 'code' => $new->get_error_code(), 'message' => $new->get_error_message() )
+ 'error' => array( 'code' => $new->get_error_code(), 'message' => $new->get_error_message() ),
);
} else {
$taxes[] = $new['tax'];
@@ -531,7 +531,7 @@ class WC_API_Taxes extends WC_API_Resource {
// Add standard class
$tax_classes[] = array(
'slug' => 'standard',
- 'name' => __( 'Standard Rate', 'woocommerce' )
+ 'name' => __( 'Standard Rate', 'woocommerce' ),
);
$classes = WC_Tax::get_tax_classes();
@@ -539,7 +539,7 @@ class WC_API_Taxes extends WC_API_Resource {
foreach ( $classes as $class ) {
$tax_classes[] = apply_filters( 'woocommerce_api_tax_class_response', array(
'slug' => sanitize_title( $class ),
- 'name' => $class
+ 'name' => $class,
), $class, $fields, $this );
}
@@ -605,8 +605,8 @@ class WC_API_Taxes extends WC_API_Resource {
return array(
'tax_class' => array(
'slug' => $slug,
- 'name' => $name
- )
+ 'name' => $name,
+ ),
);
} catch ( WC_API_Exception $e ) {
return new WP_Error( $e->getErrorCode(), $e->getMessage(), array( 'status' => $e->getCode() ) );
diff --git a/includes/api/legacy/v3/class-wc-api-webhooks.php b/includes/api/legacy/v3/class-wc-api-webhooks.php
index 7bd1ab8f543..ea731f2b585 100644
--- a/includes/api/legacy/v3/class-wc-api-webhooks.php
+++ b/includes/api/legacy/v3/class-wc-api-webhooks.php
@@ -293,7 +293,7 @@ class WC_API_Webhooks extends WC_API_Resource {
// update user ID
$webhook_data = array(
'ID' => $webhook->id,
- 'post_author' => get_current_user_id()
+ 'post_author' => get_current_user_id(),
);
// update name
diff --git a/includes/class-wc-ajax.php b/includes/class-wc-ajax.php
index 55bac6db1f9..481b4ea8b93 100644
--- a/includes/class-wc-ajax.php
+++ b/includes/class-wc-ajax.php
@@ -176,10 +176,10 @@ class WC_AJAX {
// Fragments and mini cart are returned
$data = array(
'fragments' => apply_filters( 'woocommerce_add_to_cart_fragments', array(
- 'div.widget_shopping_cart_content' => '' . $mini_cart . '
'
+ 'div.widget_shopping_cart_content' => '' . $mini_cart . '
',
)
),
- 'cart_hash' => apply_filters( 'woocommerce_add_to_cart_hash', WC()->cart->get_cart_for_session() ? md5( json_encode( WC()->cart->get_cart_for_session() ) ) : '', WC()->cart->get_cart_for_session() )
+ 'cart_hash' => apply_filters( 'woocommerce_add_to_cart_hash', WC()->cart->get_cart_for_session() ? md5( json_encode( WC()->cart->get_cart_for_session() ) ) : '', WC()->cart->get_cart_for_session() ),
);
wp_send_json( $data );
@@ -287,8 +287,8 @@ class WC_AJAX {
if ( WC()->cart->is_empty() ) {
$data = array(
'fragments' => apply_filters( 'woocommerce_update_order_review_fragments', array(
- 'form.woocommerce-checkout' => ''
- ) )
+ 'form.woocommerce-checkout' => '',
+ ) ),
);
wp_send_json( $data );
@@ -414,8 +414,8 @@ class WC_AJAX {
'reload' => isset( WC()->session->reload_checkout ) ? 'true' : 'false',
'fragments' => apply_filters( 'woocommerce_update_order_review_fragments', array(
'.woocommerce-checkout-review-order-table' => $woocommerce_order_review,
- '.woocommerce-checkout-payment' => $woocommerce_checkout_payment
- ) )
+ '.woocommerce-checkout-payment' => $woocommerce_checkout_payment,
+ ) ),
);
unset( WC()->session->refresh_totals, WC()->session->reload_checkout );
@@ -452,7 +452,7 @@ class WC_AJAX {
// If there was an error adding to the cart, redirect to the product page to show any errors
$data = array(
'error' => true,
- 'product_url' => apply_filters( 'woocommerce_cart_redirect_after_error', get_permalink( $product_id ), $product_id )
+ 'product_url' => apply_filters( 'woocommerce_cart_redirect_after_error', get_permalink( $product_id ), $product_id ),
);
wp_send_json( $data );
@@ -559,7 +559,7 @@ class WC_AJAX {
'value' => '',
'is_visible' => apply_filters( 'woocommerce_attribute_default_visibility', 1 ),
'is_variation' => apply_filters( 'woocommerce_attribute_default_is_variation', 0 ),
- 'is_taxonomy' => $taxonomy ? 1 : 0
+ 'is_taxonomy' => $taxonomy ? 1 : 0,
);
if ( $taxonomy ) {
@@ -596,14 +596,14 @@ class WC_AJAX {
if ( is_wp_error( $result ) ) {
wp_send_json( array(
- 'error' => $result->get_error_message()
+ 'error' => $result->get_error_message(),
) );
} else {
$term = get_term_by( 'id', $result['term_id'], $taxonomy );
wp_send_json( array(
'term_id' => $term->term_id,
'name' => $term->name,
- 'slug' => $term->slug
+ 'slug' => $term->slug,
) );
}
}
@@ -725,7 +725,7 @@ class WC_AJAX {
'position' => $attribute_position[ $i ],
'is_visible' => $is_visible,
'is_variation' => $is_variation,
- 'is_taxonomy' => $is_taxonomy
+ 'is_taxonomy' => $is_taxonomy,
);
}
@@ -742,7 +742,7 @@ class WC_AJAX {
'position' => $attribute_position[ $i ],
'is_visible' => $is_visible,
'is_variation' => $is_variation,
- 'is_taxonomy' => $is_taxonomy
+ 'is_taxonomy' => $is_taxonomy,
);
}
@@ -780,7 +780,7 @@ class WC_AJAX {
'post_author' => get_current_user_id(),
'post_parent' => $post_id,
'post_type' => 'product_variation',
- 'menu_order' => -1
+ 'menu_order' => -1,
);
$variation_id = wp_insert_post( $variation );
@@ -813,7 +813,7 @@ class WC_AJAX {
'_stock_status' => '',
'_backorders' => null,
'_tax_class' => null,
- '_variation_description' => ''
+ '_variation_description' => '',
);
foreach ( $variation_fields as $field => $value ) {
@@ -851,13 +851,13 @@ class WC_AJAX {
$backorder_options = array(
'no' => __( 'Do not allow', 'woocommerce' ),
'notify' => __( 'Allow, but notify customer', 'woocommerce' ),
- 'yes' => __( 'Allow', 'woocommerce' )
+ 'yes' => __( 'Allow', 'woocommerce' ),
);
// set stock status options
$stock_status_options = array(
'instock' => __( 'In stock', 'woocommerce' ),
- 'outofstock' => __( 'Out of stock', 'woocommerce' )
+ 'outofstock' => __( 'Out of stock', 'woocommerce' ),
);
// Get attributes
@@ -874,7 +874,7 @@ class WC_AJAX {
'height' => wc_format_localized_decimal( get_post_meta( $post_id, '_height', true ) ),
'tax_class' => get_post_meta( $post_id, '_tax_class', true ),
'backorder_options' => $backorder_options,
- 'stock_status_options' => $stock_status_options
+ 'stock_status_options' => $stock_status_options,
);
if ( ! $parent_data['weight'] ) {
@@ -968,7 +968,7 @@ class WC_AJAX {
'post_status' => 'publish',
'post_author' => get_current_user_id(),
'post_parent' => $post_id,
- 'post_type' => 'product_variation'
+ 'post_type' => 'product_variation',
);
$variation_ids = array();
@@ -1683,7 +1683,7 @@ class WC_AJAX {
'include' => $posts_in,
's' => $term,
'fields' => 'ids',
- 'exclude' => $exclude
+ 'exclude' => $exclude,
);
$posts = get_posts( $args );
@@ -1733,11 +1733,11 @@ class WC_AJAX {
'meta_query' => array(
array(
'key' => '_downloadable',
- 'value' => 'yes'
+ 'value' => 'yes',
)
),
's' => $term,
- 'exclude' => $exclude
+ 'exclude' => $exclude,
);
$posts = get_posts( $args );
@@ -1789,7 +1789,7 @@ class WC_AJAX {
'fields' => 'all',
'orderby' => 'display_name',
'search' => '*' . $term . '*',
- 'search_columns' => array( 'ID', 'user_login', 'user_email', 'user_nicename' )
+ 'search_columns' => array( 'ID', 'user_login', 'user_email', 'user_nicename' ),
) ) );
remove_action( 'pre_user_query', array( __CLASS__, 'json_search_customer_name' ) );
@@ -1898,7 +1898,7 @@ class WC_AJAX {
$wpdb->update(
$wpdb->posts,
array(
- 'menu_order' => $menu_order
+ 'menu_order' => $menu_order,
),
array( 'ID' => $post->ID ),
array( '%d' ),
@@ -1917,7 +1917,7 @@ class WC_AJAX {
$wpdb->update(
$wpdb->posts,
array(
- 'menu_order' => $menu_order
+ 'menu_order' => $menu_order,
),
array( 'ID' => $sibling->ID ),
array( '%d' ),
@@ -1930,7 +1930,7 @@ class WC_AJAX {
$wpdb->update(
$wpdb->posts,
array(
- 'menu_order' => $menu_order
+ 'menu_order' => $menu_order,
),
array( 'ID' => $post->ID ),
array( '%d' ),
@@ -2143,7 +2143,7 @@ class WC_AJAX {
$data = array(
'user_id' => $user_id,
'description' => $description,
- 'permissions' => $permissions
+ 'permissions' => $permissions,
);
$wpdb->update(
@@ -2171,7 +2171,7 @@ class WC_AJAX {
'permissions' => $permissions,
'consumer_key' => wc_api_hash( $consumer_key ),
'consumer_secret' => $consumer_secret,
- 'truncated_key' => substr( $consumer_key, -7 )
+ 'truncated_key' => substr( $consumer_key, -7 ),
);
$wpdb->insert(
@@ -2251,13 +2251,13 @@ class WC_AJAX {
$backorder_options = array(
'no' => __( 'Do not allow', 'woocommerce' ),
'notify' => __( 'Allow, but notify customer', 'woocommerce' ),
- 'yes' => __( 'Allow', 'woocommerce' )
+ 'yes' => __( 'Allow', 'woocommerce' ),
);
// set stock status options
$stock_status_options = array(
'instock' => __( 'In stock', 'woocommerce' ),
- 'outofstock' => __( 'Out of stock', 'woocommerce' )
+ 'outofstock' => __( 'Out of stock', 'woocommerce' ),
);
$parent_data = array(
@@ -2271,7 +2271,7 @@ class WC_AJAX {
'height' => wc_format_localized_decimal( get_post_meta( $product_id, '_height', true ) ),
'tax_class' => get_post_meta( $product_id, '_tax_class', true ),
'backorder_options' => $backorder_options,
- 'stock_status_options' => $stock_status_options
+ 'stock_status_options' => $stock_status_options,
);
if ( ! $parent_data['weight'] ) {
@@ -2297,7 +2297,7 @@ class WC_AJAX {
'posts_per_page' => $per_page,
'paged' => $page,
'orderby' => array( 'menu_order' => 'ASC', 'ID' => 'DESC' ),
- 'post_parent' => $product_id
+ 'post_parent' => $product_id,
), $product_id );
$variations = get_posts( $args );
@@ -2331,7 +2331,7 @@ class WC_AJAX {
'_stock_status' => '',
'_backorders' => null,
'_tax_class' => null,
- '_variation_description' => ''
+ '_variation_description' => '',
);
foreach ( $variation_fields as $field => $value ) {
@@ -2800,7 +2800,7 @@ class WC_AJAX {
'posts_per_page' => -1,
'post_type' => 'product_variation',
'fields' => 'ids',
- 'post_status' => array( 'publish', 'private' )
+ 'post_status' => array( 'publish', 'private' ),
) );
}
@@ -2925,7 +2925,7 @@ class WC_AJAX {
'zone_name' => 1,
'zone_order' => 1,
'zone_locations' => 1,
- 'zone_postcodes' => 1
+ 'zone_postcodes' => 1,
) );
if ( isset( $zone_data['zone_id'] ) ) {
@@ -2972,7 +2972,7 @@ class WC_AJAX {
}
wp_send_json_success( array(
- 'zones' => WC_Shipping_Zones::get_zones()
+ 'zones' => WC_Shipping_Zones::get_zones(),
) );
}
@@ -3003,7 +3003,7 @@ class WC_AJAX {
wp_send_json_success( array(
'instance_id' => $instance_id,
'zone_id' => $zone_id,
- 'methods' => $zone->get_shipping_methods()
+ 'methods' => $zone->get_shipping_methods(),
) );
}
@@ -3047,7 +3047,7 @@ class WC_AJAX {
$method_data = array_intersect_key( $data, array(
'method_order' => 1,
- 'enabled' => 1
+ 'enabled' => 1,
) );
if ( isset( $method_data['method_order'] ) ) {
@@ -3063,7 +3063,7 @@ class WC_AJAX {
}
wp_send_json_success( array(
- 'methods' => $zone->get_shipping_methods()
+ 'methods' => $zone->get_shipping_methods(),
) );
}
@@ -3162,7 +3162,7 @@ class WC_AJAX {
$wc_shipping = WC_Shipping::instance();
wp_send_json_success( array(
- 'shipping_classes' => $wc_shipping->get_shipping_classes()
+ 'shipping_classes' => $wc_shipping->get_shipping_classes(),
) );
}
}
diff --git a/includes/class-wc-auth.php b/includes/class-wc-auth.php
index 2276771995f..b5a85c2ffbf 100644
--- a/includes/class-wc-auth.php
+++ b/includes/class-wc-auth.php
@@ -226,7 +226,7 @@ class WC_Auth {
'permissions' => $permissions,
'consumer_key' => wc_api_hash( $consumer_key ),
'consumer_secret' => $consumer_secret,
- 'truncated_key' => substr( $consumer_key, -7 )
+ 'truncated_key' => substr( $consumer_key, -7 ),
),
array(
'%d',
@@ -243,7 +243,7 @@ class WC_Auth {
'user_id' => $app_user_id,
'consumer_key' => $consumer_key,
'consumer_secret' => $consumer_secret,
- 'key_permissions' => $permissions
+ 'key_permissions' => $permissions,
);
}
@@ -264,7 +264,7 @@ class WC_Auth {
'timeout' => 60,
'headers' => array(
'Content-Type' => 'application/json;charset=' . get_bloginfo( 'charset' ),
- )
+ ),
);
$response = wp_safe_remote_post( esc_url_raw( $url ), $params );
@@ -349,7 +349,7 @@ class WC_Auth {
'permissions' => $this->get_permissions_in_scope( wc_clean( $_REQUEST['scope'] ) ),
'granted_url' => wp_nonce_url( $this->build_url( $_REQUEST, 'access_granted' ), 'wc_auth_grant_access', 'wc_auth_nonce' ),
'logout_url' => wp_logout_url( $this->build_url( $_REQUEST, 'login' ) ),
- 'user' => wp_get_current_user()
+ 'user' => wp_get_current_user(),
) );
exit;
diff --git a/includes/class-wc-cart.php b/includes/class-wc-cart.php
index 17fc3bb40ed..bba7a687e05 100644
--- a/includes/class-wc-cart.php
+++ b/includes/class-wc-cart.php
@@ -91,7 +91,7 @@ class WC_Cart {
'coupon_discount_amounts' => array(),
'coupon_discount_tax_amounts' => array(),
'fee_total' => 0,
- 'fees' => array()
+ 'fees' => array(),
);
/**
@@ -313,7 +313,7 @@ class WC_Cart {
*/
public function persistent_cart_update() {
update_user_meta( get_current_user_id(), '_woocommerce_persistent_cart', array(
- 'cart' => WC()->session->get( 'cart' )
+ 'cart' => WC()->session->get( 'cart' ),
) );
}
@@ -579,7 +579,7 @@ class WC_Cart {
$item_data[] = array(
'key' => $label,
- 'value' => $value
+ 'value' => $value,
);
}
}
@@ -976,7 +976,7 @@ class WC_Cart {
'variation_id' => $variation_id,
'variation' => $variation,
'quantity' => $quantity,
- 'data' => $product_data
+ 'data' => $product_data,
) ), $cart_item_key );
}
diff --git a/includes/class-wc-checkout.php b/includes/class-wc-checkout.php
index 63e73aa5020..4a42c09e144 100644
--- a/includes/class-wc-checkout.php
+++ b/includes/class-wc-checkout.php
@@ -105,7 +105,7 @@ class WC_Checkout {
'type' => 'text',
'label' => __( 'Account username', 'woocommerce' ),
'required' => true,
- 'placeholder' => _x( 'Username', 'placeholder', 'woocommerce' )
+ 'placeholder' => _x( 'Username', 'placeholder', 'woocommerce' ),
);
}
@@ -114,7 +114,7 @@ class WC_Checkout {
'type' => 'password',
'label' => __( 'Account password', 'woocommerce' ),
'required' => true,
- 'placeholder' => _x( 'Password', 'placeholder', 'woocommerce' )
+ 'placeholder' => _x( 'Password', 'placeholder', 'woocommerce' ),
);
}
@@ -123,8 +123,8 @@ class WC_Checkout {
'type' => 'textarea',
'class' => array('notes'),
'label' => __( 'Order Notes', 'woocommerce' ),
- 'placeholder' => _x('Notes about your order, e.g. special notes for delivery.', 'placeholder', 'woocommerce')
- )
+ 'placeholder' => _x('Notes about your order, e.g. special notes for delivery.', 'placeholder', 'woocommerce'),
+ ),
);
$this->checkout_fields = apply_filters( 'woocommerce_checkout_fields', $this->checkout_fields );
@@ -654,7 +654,7 @@ class WC_Checkout {
'ID' => $this->customer_id,
'first_name' => $this->posted['billing_first_name'] ? $this->posted['billing_first_name'] : '',
'last_name' => $this->posted['billing_last_name'] ? $this->posted['billing_last_name'] : '',
- 'display_name' => $this->posted['billing_first_name'] ? $this->posted['billing_first_name'] : ''
+ 'display_name' => $this->posted['billing_first_name'] ? $this->posted['billing_first_name'] : '',
);
wp_update_user( apply_filters( 'woocommerce_checkout_customer_userdata', $userdata, $this ) );
}
@@ -718,7 +718,7 @@ class WC_Checkout {
if ( is_ajax() ) {
wp_send_json( array(
'result' => 'success',
- 'redirect' => apply_filters( 'woocommerce_checkout_no_payment_needed_redirect', $return_url, $order )
+ 'redirect' => apply_filters( 'woocommerce_checkout_no_payment_needed_redirect', $return_url, $order ),
) );
} else {
wp_safe_redirect(
@@ -751,7 +751,7 @@ class WC_Checkout {
'result' => 'failure',
'messages' => isset( $messages ) ? $messages : '',
'refresh' => isset( WC()->session->refresh_totals ) ? 'true' : 'false',
- 'reload' => isset( WC()->session->reload_checkout ) ? 'true' : 'false'
+ 'reload' => isset( WC()->session->reload_checkout ) ? 'true' : 'false',
);
unset( WC()->session->refresh_totals, WC()->session->reload_checkout );
diff --git a/includes/class-wc-countries.php b/includes/class-wc-countries.php
index 5733e478539..3ed80c94db3 100644
--- a/includes/class-wc-countries.php
+++ b/includes/class-wc-countries.php
@@ -377,13 +377,13 @@ class WC_Countries {
if ( $states = $this->get_states( $key ) ) :
echo '';
foreach ( $states as $state_key => $state_value ) :
- echo '' . $value . ' — ' . ( $escape ? esc_js( $state_value ) : $state_value ) . ' ';
+ echo '>' . $value . ' — ' . ( $escape ? esc_js( $state_value ) : $state_value ) . '';
endforeach;
echo ' ';
else :
@@ -463,7 +463,7 @@ class WC_Countries {
'city' => '',
'state' => '',
'postcode' => '',
- 'country' => ''
+ 'country' => '',
);
$args = array_map( 'trim', wp_parse_args( $args, $default_args ) );
@@ -636,7 +636,7 @@ class WC_Countries {
'AE' => array(
'postcode' => array(
'required' => false,
- 'hidden' => true
+ 'hidden' => true,
),
),
'AF' => array(
@@ -647,8 +647,8 @@ class WC_Countries {
'AT' => array(
'postcode_before_city' => true,
'state' => array(
- 'required' => false
- )
+ 'required' => false,
+ ),
),
'AU' => array(
'city' => array(
@@ -659,7 +659,7 @@ class WC_Countries {
),
'state' => array(
'label' => __( 'State', 'woocommerce' ),
- )
+ ),
),
'AX' => array(
'postcode_before_city' => true,
@@ -669,11 +669,11 @@ class WC_Countries {
),
'BD' => array(
'postcode' => array(
- 'required' => false
+ 'required' => false,
),
'state' => array(
'label' => __( 'District', 'woocommerce' ),
- )
+ ),
),
'BE' => array(
'postcode_before_city' => true,
@@ -690,103 +690,103 @@ class WC_Countries {
'BO' => array(
'postcode' => array(
'required' => false,
- 'hidden' => true
+ 'hidden' => true,
),
),
'BS' => array(
'postcode' => array(
'required' => false,
- 'hidden' => true
+ 'hidden' => true,
),
),
'CA' => array(
'state' => array(
'label' => __( 'Province', 'woocommerce' ),
- )
+ ),
),
'CH' => array(
'postcode_before_city' => true,
'state' => array(
'label' => __( 'Canton', 'woocommerce' ),
- 'required' => false
- )
+ 'required' => false,
+ ),
),
'CL' => array(
'city' => array(
'required' => true,
),
'postcode' => array(
- 'required' => false
+ 'required' => false,
),
'state' => array(
'label' => __( 'Region', 'woocommerce' ),
- )
+ ),
),
'CN' => array(
'state' => array(
'label' => __( 'Province', 'woocommerce' ),
- )
+ ),
),
'CO' => array(
'postcode' => array(
- 'required' => false
- )
+ 'required' => false,
+ ),
),
'CZ' => array(
'state' => array(
- 'required' => false
- )
+ 'required' => false,
+ ),
),
'DE' => array(
'postcode_before_city' => true,
'state' => array(
- 'required' => false
- )
+ 'required' => false,
+ ),
),
'DK' => array(
'postcode_before_city' => true,
'state' => array(
- 'required' => false
- )
+ 'required' => false,
+ ),
),
'EE' => array(
'postcode_before_city' => true,
'state' => array(
- 'required' => false
- )
+ 'required' => false,
+ ),
),
'FI' => array(
'postcode_before_city' => true,
'state' => array(
- 'required' => false
- )
+ 'required' => false,
+ ),
),
'FR' => array(
'postcode_before_city' => true,
'state' => array(
- 'required' => false
- )
+ 'required' => false,
+ ),
),
'HK' => array(
'postcode' => array(
- 'required' => false
+ 'required' => false,
),
'city' => array(
'label' => __( 'Town / District', 'woocommerce' ),
),
'state' => array(
'label' => __( 'Region', 'woocommerce' ),
- )
+ ),
),
'HU' => array(
'state' => array(
'label' => __( 'County', 'woocommerce' ),
- )
+ ),
),
'ID' => array(
'state' => array(
'label' => __( 'Province', 'woocommerce' ),
- )
+ ),
),
'IE' => array(
'postcode' => array(
@@ -797,124 +797,124 @@ class WC_Countries {
'IS' => array(
'postcode_before_city' => true,
'state' => array(
- 'required' => false
- )
+ 'required' => false,
+ ),
),
'IL' => array(
'postcode_before_city' => true,
'state' => array(
- 'required' => false
- )
+ 'required' => false,
+ ),
),
'IT' => array(
'postcode_before_city' => true,
'state' => array(
'required' => true,
'label' => __( 'Province', 'woocommerce' ),
- )
+ ),
),
'JP' => array(
'state' => array(
- 'label' => __( 'Prefecture', 'woocommerce' )
- )
+ 'label' => __( 'Prefecture', 'woocommerce' ),
+ ),
),
'KR' => array(
'state' => array(
- 'required' => false
- )
+ 'required' => false,
+ ),
),
'NL' => array(
'postcode_before_city' => true,
'state' => array(
'required' => false,
'label' => __( 'Province', 'woocommerce' ),
- )
+ ),
),
'NZ' => array(
'postcode' => array(
- 'label' => __( 'Postcode', 'woocommerce' )
+ 'label' => __( 'Postcode', 'woocommerce' ),
),
'state' => array(
'required' => false,
- 'label' => __( 'Region', 'woocommerce' )
- )
+ 'label' => __( 'Region', 'woocommerce' ),
+ ),
),
'NO' => array(
'postcode_before_city' => true,
'state' => array(
- 'required' => false
- )
+ 'required' => false,
+ ),
),
'NP' => array(
'state' => array(
'label' => __( 'State / Zone', 'woocommerce' ),
),
'postcode' => array(
- 'required' => false
- )
+ 'required' => false,
+ ),
),
'PL' => array(
'postcode_before_city' => true,
'state' => array(
- 'required' => false
- )
+ 'required' => false,
+ ),
),
'PT' => array(
'state' => array(
- 'required' => false
- )
+ 'required' => false,
+ ),
),
'RO' => array(
'state' => array(
- 'required' => false
- )
+ 'required' => false,
+ ),
),
'SG' => array(
'state' => array(
- 'required' => false
- )
+ 'required' => false,
+ ),
),
'SK' => array(
'postcode_before_city' => true,
'state' => array(
- 'required' => false
- )
+ 'required' => false,
+ ),
),
'SI' => array(
'postcode_before_city' => true,
'state' => array(
- 'required' => false
- )
+ 'required' => false,
+ ),
),
'ES' => array(
'postcode_before_city' => true,
'state' => array(
'label' => __( 'Province', 'woocommerce' ),
- )
+ ),
),
'LI' => array(
'postcode_before_city' => true,
'state' => array(
'label' => __( 'Municipality', 'woocommerce' ),
- 'required' => false
- )
+ 'required' => false,
+ ),
),
'LK' => array(
'state' => array(
- 'required' => false
- )
+ 'required' => false,
+ ),
),
'SE' => array(
'postcode_before_city' => true,
'state' => array(
- 'required' => false
- )
+ 'required' => false,
+ ),
),
'TR' => array(
'postcode_before_city' => true,
'state' => array(
'label' => __( 'Province', 'woocommerce' ),
- )
+ ),
),
'US' => array(
'postcode' => array(
@@ -922,7 +922,7 @@ class WC_Countries {
),
'state' => array(
'label' => __( 'State', 'woocommerce' ),
- )
+ ),
),
'GB' => array(
'postcode' => array(
@@ -930,38 +930,38 @@ class WC_Countries {
),
'state' => array(
'label' => __( 'County', 'woocommerce' ),
- 'required' => false
- )
+ 'required' => false,
+ ),
),
'VN' => array(
'postcode_before_city' => true,
'state' => array(
- 'required' => false
+ 'required' => false,
),
'postcode' => array(
'required' => false,
- 'hidden' => false
+ 'hidden' => false,
),
'address_2' => array(
'required' => false,
- 'hidden' => true
- )
+ 'hidden' => true,
+ ),
),
'WS' => array(
'postcode' => array(
'required' => false,
- 'hidden' => true
+ 'hidden' => true,
),
),
'ZA' => array(
'state' => array(
'label' => __( 'Province', 'woocommerce' ),
- )
+ ),
),
'ZW' => array(
'postcode' => array(
'required' => false,
- 'hidden' => true
+ 'hidden' => true,
),
),
));
diff --git a/includes/class-wc-download-handler.php b/includes/class-wc-download-handler.php
index 2dd8d286427..6fc09b639bb 100644
--- a/includes/class-wc-download-handler.php
+++ b/includes/class-wc-download-handler.php
@@ -39,7 +39,7 @@ class WC_Download_Handler {
'product_id' => $product_id,
'order_key' => wc_clean( $_GET['order'] ),
'email' => sanitize_email( str_replace( ' ', '+', $_GET['email'] ) ),
- 'download_id' => wc_clean( isset( $_GET['key'] ) ? preg_replace( '/\s+/', ' ', $_GET['key'] ) : '' )
+ 'download_id' => wc_clean( isset( $_GET['key'] ) ? preg_replace( '/\s+/', ' ', $_GET['key'] ) : '' ),
) );
if ( $_product && $download_data ) {
@@ -216,7 +216,7 @@ class WC_Download_Handler {
network_site_url( '/', 'https' ) => ABSPATH,
network_site_url( '/', 'http' ) => ABSPATH,
site_url( '/', 'https' ) => ABSPATH,
- site_url( '/', 'http' ) => ABSPATH
+ site_url( '/', 'http' ) => ABSPATH,
);
$file_path = str_replace( array_keys( $replacements ), array_values( $replacements ), $file_path );
@@ -236,7 +236,7 @@ class WC_Download_Handler {
return array(
'remote_file' => $remote_file,
- 'file_path' => $file_path
+ 'file_path' => $file_path,
);
}
diff --git a/includes/class-wc-emails.php b/includes/class-wc-emails.php
index 00ee6a39d52..12599b6de11 100644
--- a/includes/class-wc-emails.php
+++ b/includes/class-wc-emails.php
@@ -321,7 +321,7 @@ class WC_Emails {
'priceCurrency' => $order->get_currency(),
'eligibleQuantity' => (object) array(
'@type' => 'QuantitativeValue',
- 'value' => apply_filters( 'woocommerce_email_order_item_quantity', $item->get_quantity(), $item )
+ 'value' => apply_filters( 'woocommerce_email_order_item_quantity', $item->get_quantity(), $item ),
),
'url' => get_home_url(),
);
@@ -405,7 +405,7 @@ class WC_Emails {
$fields[ $key ] = array(
'label' => wptexturize( $key ),
- 'value' => wptexturize( get_post_meta( $order->get_id(), $field, true ) )
+ 'value' => wptexturize( get_post_meta( $order->get_id(), $field, true ) ),
);
}
}
@@ -454,21 +454,21 @@ class WC_Emails {
if ( $order->get_customer_note() ) {
$fields['customer_note'] = array(
'label' => __( 'Note', 'woocommerce' ),
- 'value' => wptexturize( $order->get_customer_note() )
+ 'value' => wptexturize( $order->get_customer_note() ),
);
}
if ( $order->get_billing_email() ) {
$fields['billing_email'] = array(
'label' => __( 'Email', 'woocommerce' ),
- 'value' => wptexturize( $order->get_billing_email() )
+ 'value' => wptexturize( $order->get_billing_email() ),
);
}
if ( $order->get_billing_phone() ) {
$fields['billing_phone'] = array(
'label' => __( 'Tel', 'woocommerce' ),
- 'value' => wptexturize( $order->get_billing_phone() )
+ 'value' => wptexturize( $order->get_billing_phone() ),
);
}
@@ -545,7 +545,7 @@ class WC_Emails {
$args = wp_parse_args( $args, array(
'product' => '',
'quantity' => '',
- 'order_id' => ''
+ 'order_id' => '',
) );
extract( $args );
diff --git a/includes/class-wc-frontend-scripts.php b/includes/class-wc-frontend-scripts.php
index dca14b11f5a..caba879e6b1 100644
--- a/includes/class-wc-frontend-scripts.php
+++ b/includes/class-wc-frontend-scripts.php
@@ -56,19 +56,19 @@ class WC_Frontend_Scripts {
'src' => str_replace( array( 'http:', 'https:' ), '', WC()->plugin_url() ) . '/assets/css/woocommerce-layout.css',
'deps' => '',
'version' => WC_VERSION,
- 'media' => 'all'
+ 'media' => 'all',
),
'woocommerce-smallscreen' => array(
'src' => str_replace( array( 'http:', 'https:' ), '', WC()->plugin_url() ) . '/assets/css/woocommerce-smallscreen.css',
'deps' => 'woocommerce-layout',
'version' => WC_VERSION,
- 'media' => 'only screen and (max-width: ' . apply_filters( 'woocommerce_style_smallscreen_breakpoint', $breakpoint = '768px' ) . ')'
+ 'media' => 'only screen and (max-width: ' . apply_filters( 'woocommerce_style_smallscreen_breakpoint', $breakpoint = '768px' ) . ')',
),
'woocommerce-general' => array(
'src' => str_replace( array( 'http:', 'https:' ), '', WC()->plugin_url() ) . '/assets/css/woocommerce.css',
'deps' => '',
'version' => WC_VERSION,
- 'media' => 'all'
+ 'media' => 'all',
),
) );
}
@@ -251,7 +251,7 @@ class WC_Frontend_Scripts {
case 'woocommerce' :
return array(
'ajax_url' => WC()->ajax_url(),
- 'wc_ajax_url' => WC_AJAX::get_endpoint( "%%endpoint%%" )
+ 'wc_ajax_url' => WC_AJAX::get_endpoint( "%%endpoint%%" ),
);
break;
case 'wc-geolocation' :
@@ -259,7 +259,7 @@ class WC_Frontend_Scripts {
'wc_ajax_url' => WC_AJAX::get_endpoint( "%%endpoint%%" ),
'home_url' => home_url(),
'is_available' => ! ( is_cart() || is_account_page() || is_checkout() || is_customize_preview() ) ? '1' : '0',
- 'hash' => isset( $_GET['v'] ) ? wc_clean( $_GET['v'] ) : ''
+ 'hash' => isset( $_GET['v'] ) ? wc_clean( $_GET['v'] ) : '',
);
break;
case 'wc-single-product' :
@@ -302,7 +302,7 @@ class WC_Frontend_Scripts {
return array(
'ajax_url' => WC()->ajax_url(),
'wc_ajax_url' => WC_AJAX::get_endpoint( "%%endpoint%%" ),
- 'fragment_name' => apply_filters( 'woocommerce_cart_fragment_name', 'wc_fragments' )
+ 'fragment_name' => apply_filters( 'woocommerce_cart_fragment_name', 'wc_fragments' ),
);
break;
case 'wc-add-to-cart' :
@@ -312,7 +312,7 @@ class WC_Frontend_Scripts {
'i18n_view_cart' => esc_attr__( 'View Cart', 'woocommerce' ),
'cart_url' => apply_filters( 'woocommerce_add_to_cart_redirect', wc_get_cart_url() ),
'is_cart' => is_cart(),
- 'cart_redirect_after_add' => get_option( 'woocommerce_cart_redirect_after_add' )
+ 'cart_redirect_after_add' => get_option( 'woocommerce_cart_redirect_after_add' ),
);
break;
case 'wc-add-to-cart-variation' :
@@ -323,7 +323,7 @@ class WC_Frontend_Scripts {
'wc_ajax_url' => WC_AJAX::get_endpoint( "%%endpoint%%" ),
'i18n_no_matching_variations_text' => esc_attr__( 'Sorry, no products matched your selection. Please choose a different combination.', 'woocommerce' ),
'i18n_make_a_selection_text' => esc_attr__( 'Please select some product options before adding this product to your cart.', 'woocommerce' ),
- 'i18n_unavailable_text' => esc_attr__( 'Sorry, this product is unavailable. Please choose a different combination.', 'woocommerce' )
+ 'i18n_unavailable_text' => esc_attr__( 'Sorry, this product is unavailable. Please choose a different combination.', 'woocommerce' ),
);
break;
case 'wc-country-select' :
@@ -348,7 +348,7 @@ class WC_Frontend_Scripts {
return array(
'min_password_strength' => apply_filters( 'woocommerce_min_password_strength', 3 ),
'i18n_password_error' => esc_attr__( 'Please enter a stronger password.', 'woocommerce' ),
- 'i18n_password_hint' => esc_attr__( 'The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers and symbols like ! " ? $ % ^ & ).', 'woocommerce' )
+ 'i18n_password_hint' => esc_attr__( 'The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers and symbols like ! " ? $ % ^ & ).', 'woocommerce' ),
);
break;
}
diff --git a/includes/class-wc-geolocation.php b/includes/class-wc-geolocation.php
index 5aa3899e70c..b6edd617148 100644
--- a/includes/class-wc-geolocation.php
+++ b/includes/class-wc-geolocation.php
@@ -32,14 +32,14 @@ class WC_Geolocation {
'ipecho' => 'http://ipecho.net/plain',
'ident' => 'http://ident.me',
'whatismyipaddress' => 'http://bot.whatismyipaddress.com',
- 'ip.appspot' => 'http://ip.appspot.com'
+ 'ip.appspot' => 'http://ip.appspot.com',
);
/** @var array API endpoints for geolocating an IP address */
private static $geoip_apis = array(
'freegeoip' => 'https://freegeoip.net/json/%s',
'telize' => 'http://www.telize.com/geoip/%s',
- 'geoip-api.meteor' => 'http://geoip-api.meteor.com/lookup/%s'
+ 'geoip-api.meteor' => 'http://geoip-api.meteor.com/lookup/%s',
);
/**
@@ -156,7 +156,7 @@ class WC_Geolocation {
return array(
'country' => $country_code,
- 'state' => ''
+ 'state' => '',
);
}
@@ -187,7 +187,7 @@ class WC_Geolocation {
$tmp_databases = array(
'v4' => download_url( self::GEOLITE_DB ),
- 'v6' => download_url( self::GEOLITE_IPV6_DB )
+ 'v6' => download_url( self::GEOLITE_IPV6_DB ),
);
foreach ( $tmp_databases as $tmp_database_version => $tmp_database_path ) {
diff --git a/includes/class-wc-install.php b/includes/class-wc-install.php
index 64652c75a08..149ebb58e39 100644
--- a/includes/class-wc-install.php
+++ b/includes/class-wc-install.php
@@ -256,7 +256,7 @@ class WC_Install {
public static function cron_schedules( $schedules ) {
$schedules['monthly'] = array(
'interval' => 2635200,
- 'display' => __( 'Monthly', 'woocommerce' )
+ 'display' => __( 'Monthly', 'woocommerce' ),
);
return $schedules;
}
@@ -296,23 +296,23 @@ class WC_Install {
'shop' => array(
'name' => _x( 'shop', 'Page slug', 'woocommerce' ),
'title' => _x( 'Shop', 'Page title', 'woocommerce' ),
- 'content' => ''
+ 'content' => '',
),
'cart' => array(
'name' => _x( 'cart', 'Page slug', 'woocommerce' ),
'title' => _x( 'Cart', 'Page title', 'woocommerce' ),
- 'content' => '[' . apply_filters( 'woocommerce_cart_shortcode_tag', 'woocommerce_cart' ) . ']'
+ 'content' => '[' . apply_filters( 'woocommerce_cart_shortcode_tag', 'woocommerce_cart' ) . ']',
),
'checkout' => array(
'name' => _x( 'checkout', 'Page slug', 'woocommerce' ),
'title' => _x( 'Checkout', 'Page title', 'woocommerce' ),
- 'content' => '[' . apply_filters( 'woocommerce_checkout_shortcode_tag', 'woocommerce_checkout' ) . ']'
+ 'content' => '[' . apply_filters( 'woocommerce_checkout_shortcode_tag', 'woocommerce_checkout' ) . ']',
),
'myaccount' => array(
'name' => _x( 'my-account', 'Page slug', 'woocommerce' ),
'title' => _x( 'My Account', 'Page title', 'woocommerce' ),
- 'content' => '[' . apply_filters( 'woocommerce_my_account_shortcode_tag', 'woocommerce_my_account' ) . ']'
- )
+ 'content' => '[' . apply_filters( 'woocommerce_my_account_shortcode_tag', 'woocommerce_my_account' ) . ']',
+ ),
) );
foreach ( $pages as $key => $page ) {
@@ -360,7 +360,7 @@ class WC_Install {
'grouped',
'variable',
'external'
- )
+ ),
);
foreach ( $taxonomies as $taxonomy => $terms ) {
@@ -609,7 +609,7 @@ CREATE TABLE {$wpdb->prefix}woocommerce_termmeta (
// Customer role
add_role( 'customer', __( 'Customer', 'woocommerce' ), array(
- 'read' => true
+ 'read' => true,
) );
// Shop manager role
@@ -653,7 +653,7 @@ CREATE TABLE {$wpdb->prefix}woocommerce_termmeta (
'upload_files' => true,
'export' => true,
'import' => true,
- 'list_users' => true
+ 'list_users' => true,
) );
$capabilities = self::get_core_capabilities();
@@ -749,17 +749,17 @@ CREATE TABLE {$wpdb->prefix}woocommerce_termmeta (
array(
'base' => $upload_dir['basedir'] . '/woocommerce_uploads',
'file' => 'index.html',
- 'content' => ''
+ 'content' => '',
),
array(
'base' => WC_LOG_DIR,
'file' => '.htaccess',
- 'content' => 'deny from all'
+ 'content' => 'deny from all',
),
array(
'base' => WC_LOG_DIR,
'file' => 'index.html',
- 'content' => ''
+ 'content' => '',
)
);
@@ -767,7 +767,7 @@ CREATE TABLE {$wpdb->prefix}woocommerce_termmeta (
$files[] = array(
'base' => $upload_dir['basedir'] . '/woocommerce_uploads',
'file' => '.htaccess',
- 'content' => 'deny from all'
+ 'content' => 'deny from all',
);
}
diff --git a/includes/class-wc-order-item-fee.php b/includes/class-wc-order-item-fee.php
index b071bf7067c..5ef45e36683 100644
--- a/includes/class-wc-order-item-fee.php
+++ b/includes/class-wc-order-item-fee.php
@@ -27,8 +27,8 @@ class WC_Order_Item_Fee extends WC_Order_Item {
'total' => '',
'total_tax' => '',
'taxes' => array(
- 'total' => array()
- )
+ 'total' => array(),
+ ),
);
/**
diff --git a/includes/class-wc-order-item-product.php b/includes/class-wc-order-item-product.php
index 5f77e463906..c635e1d9c61 100644
--- a/includes/class-wc-order-item-product.php
+++ b/includes/class-wc-order-item-product.php
@@ -32,7 +32,7 @@ class WC_Order_Item_Product extends WC_Order_Item {
'total_tax' => 0,
'taxes' => array(
'subtotal' => array(),
- 'total' => array()
+ 'total' => array(),
),
);
@@ -171,7 +171,7 @@ class WC_Order_Item_Product extends WC_Order_Item {
'download_file' => $this->get_variation_id() ? $this->get_variation_id() : $this->get_product_id(),
'order' => $order->get_order_key(),
'email' => urlencode( $order->get_billing_email() ),
- 'key' => $download_id
+ 'key' => $download_id,
), trailingslashit( home_url() ) ) : '';
}
@@ -329,7 +329,7 @@ class WC_Order_Item_Product extends WC_Order_Item {
$raw_tax_data = maybe_unserialize( $raw_tax_data );
$tax_data = array(
'total' => array(),
- 'subtotal' => array()
+ 'subtotal' => array(),
);
if ( ! empty( $raw_tax_data['total'] ) && ! empty( $raw_tax_data['subtotal'] ) ) {
$tax_data['subtotal'] = array_map( 'wc_format_decimal', $raw_tax_data['subtotal'] );
diff --git a/includes/class-wc-order-item-shipping.php b/includes/class-wc-order-item-shipping.php
index fe37d2006a8..f33a106480b 100644
--- a/includes/class-wc-order-item-shipping.php
+++ b/includes/class-wc-order-item-shipping.php
@@ -26,7 +26,7 @@ class WC_Order_Item_Shipping extends WC_Order_Item {
'total' => 0,
'total_tax' => 0,
'taxes' => array(
- 'total' => array()
+ 'total' => array(),
),
);
@@ -170,7 +170,7 @@ class WC_Order_Item_Shipping extends WC_Order_Item {
public function set_taxes( $raw_tax_data ) {
$raw_tax_data = maybe_unserialize( $raw_tax_data );
$tax_data = array(
- 'total' => array()
+ 'total' => array(),
);
if ( ! empty( $raw_tax_data['total'] ) ) {
$tax_data['total'] = array_map( 'wc_format_decimal', $raw_tax_data['total'] );
diff --git a/includes/class-wc-order-item-tax.php b/includes/class-wc-order-item-tax.php
index f96dc9fc9a9..9b7c0005b60 100644
--- a/includes/class-wc-order-item-tax.php
+++ b/includes/class-wc-order-item-tax.php
@@ -26,7 +26,7 @@ class WC_Order_Item_Tax extends WC_Order_Item {
'label' => '',
'compound' => false,
'tax_total' => 0,
- 'shipping_tax_total' => 0
+ 'shipping_tax_total' => 0,
);
/**
diff --git a/includes/class-wc-order-item.php b/includes/class-wc-order-item.php
index 95d26bf553e..6d2cbcc8d11 100644
--- a/includes/class-wc-order-item.php
+++ b/includes/class-wc-order-item.php
@@ -193,7 +193,7 @@ class WC_Order_Item extends WC_Data implements ArrayAccess {
$wpdb->insert( $wpdb->prefix . 'woocommerce_order_items', array(
'order_item_name' => $this->get_name(),
'order_item_type' => $this->get_type(),
- 'order_id' => $this->get_order_id()
+ 'order_id' => $this->get_order_id(),
) );
$this->set_id( $wpdb->insert_id );
@@ -210,7 +210,7 @@ class WC_Order_Item extends WC_Data implements ArrayAccess {
$wpdb->update( $wpdb->prefix . 'woocommerce_order_items', array(
'order_item_name' => $this->get_name(),
'order_item_type' => $this->get_type(),
- 'order_id' => $this->get_order_id()
+ 'order_id' => $this->get_order_id(),
), array( 'order_item_id' => $this->get_id() ) );
do_action( 'woocommerce_update_order_item', $this->get_id(), $this, $this->get_order_id() );
diff --git a/includes/class-wc-order.php b/includes/class-wc-order.php
index 66ed17608ff..250ea8f15b1 100644
--- a/includes/class-wc-order.php
+++ b/includes/class-wc-order.php
@@ -1305,7 +1305,7 @@ class WC_Order extends WC_Abstract_Order {
'cancel_order' => 'true',
'order' => $this->get_order_key(),
'order_id' => $this->get_id(),
- 'redirect' => $redirect
+ 'redirect' => $redirect,
), $this->get_cancel_endpoint() ), 'woocommerce-cancel_order' ) );
}
@@ -1322,7 +1322,7 @@ class WC_Order extends WC_Abstract_Order {
'order' => $this->get_order_key(),
'order_id' => $this->get_id(),
'redirect' => $redirect,
- '_wpnonce' => wp_create_nonce( 'woocommerce-cancel_order' )
+ '_wpnonce' => wp_create_nonce( 'woocommerce-cancel_order' ),
), $this->get_cancel_endpoint() ) );
}
@@ -1415,7 +1415,7 @@ class WC_Order extends WC_Abstract_Order {
$args = array(
'post_id' => $this->get_id(),
'approve' => 'approve',
- 'type' => ''
+ 'type' => '',
);
remove_filter( 'comments_clauses', array( 'WC_Comments', 'exclude_order_comments' ) );
diff --git a/includes/class-wc-payment-tokens.php b/includes/class-wc-payment-tokens.php
index 6b31904ec50..f859b6cb8d6 100644
--- a/includes/class-wc-payment-tokens.php
+++ b/includes/class-wc-payment-tokens.php
@@ -86,7 +86,7 @@ class WC_Payment_Tokens {
$tokens = self::get_tokens( array(
'user_id' => $customer_id,
- 'gateway_id' => $gateway_id
+ 'gateway_id' => $gateway_id,
) );
return apply_filters( 'woocommerce_get_customer_payment_tokens', $tokens, $customer_id, $gateway_id );
@@ -136,7 +136,7 @@ class WC_Payment_Tokens {
}
$tokens = self::get_tokens( array(
- 'token_id' => $token_ids
+ 'token_id' => $token_ids,
) );
return apply_filters( 'woocommerce_get_order_payment_tokens', $tokens, $order_id );
diff --git a/includes/class-wc-post-types.php b/includes/class-wc-post-types.php
index 639061266c9..69528e14dab 100644
--- a/includes/class-wc-post-types.php
+++ b/includes/class-wc-post-types.php
@@ -51,7 +51,7 @@ class WC_Post_types {
'show_in_nav_menus' => false,
'query_var' => is_admin(),
'rewrite' => false,
- 'public' => false
+ 'public' => false,
) )
);
@@ -123,7 +123,7 @@ class WC_Post_types {
),
'rewrite' => array(
'slug' => empty( $permalinks['tag_base'] ) ? _x( 'product-tag', 'slug', 'woocommerce' ) : $permalinks['tag_base'],
- 'with_front' => false
+ 'with_front' => false,
),
) )
);
@@ -145,7 +145,7 @@ class WC_Post_types {
'edit_item' => __( 'Edit Shipping Class', 'woocommerce' ),
'update_item' => __( 'Update Shipping Class', 'woocommerce' ),
'add_new_item' => __( 'Add New Shipping Class', 'woocommerce' ),
- 'new_item_name' => __( 'New Shipping Class Name', 'woocommerce' )
+ 'new_item_name' => __( 'New Shipping Class Name', 'woocommerce' ),
),
'show_ui' => false,
'show_in_quick_edit' => false,
@@ -202,14 +202,14 @@ class WC_Post_types {
'edit_terms' => 'edit_product_terms',
'delete_terms' => 'delete_product_terms',
'assign_terms' => 'assign_product_terms',
- )
+ ),
);
if ( 1 === $tax->attribute_public ) {
$taxonomy_data['rewrite'] = array(
'slug' => empty( $permalinks['attribute_base'] ) ? '' : trailingslashit( $permalinks['attribute_base'] ) . sanitize_title( $tax->attribute_name ),
'with_front' => false,
- 'hierarchical' => true
+ 'hierarchical' => true,
);
}
@@ -274,7 +274,7 @@ class WC_Post_types {
'query_var' => true,
'supports' => array( 'title', 'editor', 'excerpt', 'thumbnail', 'comments', 'custom-fields', 'page-attributes', 'publicize', 'wpcom-markdown' ),
'has_archive' => ( $shop_page_id = wc_get_page_id( 'shop' ) ) && get_post( $shop_page_id ) ? get_page_uri( $shop_page_id ) : 'shop',
- 'show_in_nav_menus' => true
+ 'show_in_nav_menus' => true,
)
)
);
@@ -286,7 +286,7 @@ class WC_Post_types {
'public' => false,
'hierarchical' => false,
'supports' => false,
- 'capability_type' => 'product'
+ 'capability_type' => 'product',
)
)
);
@@ -347,7 +347,7 @@ class WC_Post_types {
'exclude_from_order_views' => false,
'exclude_from_order_reports' => false,
'exclude_from_order_sales_reports' => true,
- 'class_name' => 'WC_Order_Refund'
+ 'class_name' => 'WC_Order_Refund',
)
)
);
@@ -388,7 +388,7 @@ class WC_Post_types {
'query_var' => false,
'supports' => array( 'title' ),
'show_in_nav_menus' => false,
- 'show_in_admin_bar' => true
+ 'show_in_admin_bar' => true,
)
)
);
@@ -411,7 +411,7 @@ class WC_Post_types {
'search_items' => __( 'Search Webhooks', 'woocommerce' ),
'not_found' => __( 'No Webhooks found', 'woocommerce' ),
'not_found_in_trash' => __( 'No Webhooks found in trash', 'woocommerce' ),
- 'parent' => __( 'Parent Webhook', 'woocommerce' )
+ 'parent' => __( 'Parent Webhook', 'woocommerce' ),
),
'public' => false,
'show_ui' => true,
@@ -425,7 +425,7 @@ class WC_Post_types {
'query_var' => false,
'supports' => false,
'show_in_nav_menus' => false,
- 'show_in_admin_bar' => false
+ 'show_in_admin_bar' => false,
)
)
);
@@ -444,7 +444,7 @@ class WC_Post_types {
'exclude_from_search' => false,
'show_in_admin_all_list' => true,
'show_in_admin_status_list' => true,
- 'label_count' => _n_noop( 'Pending Payment (%s) ', 'Pending Payment (%s) ', 'woocommerce' )
+ 'label_count' => _n_noop( 'Pending Payment (%s) ', 'Pending Payment (%s) ', 'woocommerce' ),
),
'wc-processing' => array(
'label' => _x( 'Processing', 'Order status', 'woocommerce' ),
@@ -452,7 +452,7 @@ class WC_Post_types {
'exclude_from_search' => false,
'show_in_admin_all_list' => true,
'show_in_admin_status_list' => true,
- 'label_count' => _n_noop( 'Processing (%s) ', 'Processing (%s) ', 'woocommerce' )
+ 'label_count' => _n_noop( 'Processing (%s) ', 'Processing (%s) ', 'woocommerce' ),
),
'wc-on-hold' => array(
'label' => _x( 'On Hold', 'Order status', 'woocommerce' ),
@@ -460,7 +460,7 @@ class WC_Post_types {
'exclude_from_search' => false,
'show_in_admin_all_list' => true,
'show_in_admin_status_list' => true,
- 'label_count' => _n_noop( 'On Hold (%s) ', 'On Hold (%s) ', 'woocommerce' )
+ 'label_count' => _n_noop( 'On Hold (%s) ', 'On Hold (%s) ', 'woocommerce' ),
),
'wc-completed' => array(
'label' => _x( 'Completed', 'Order status', 'woocommerce' ),
@@ -468,7 +468,7 @@ class WC_Post_types {
'exclude_from_search' => false,
'show_in_admin_all_list' => true,
'show_in_admin_status_list' => true,
- 'label_count' => _n_noop( 'Completed (%s) ', 'Completed (%s) ', 'woocommerce' )
+ 'label_count' => _n_noop( 'Completed (%s) ', 'Completed (%s) ', 'woocommerce' ),
),
'wc-cancelled' => array(
'label' => _x( 'Cancelled', 'Order status', 'woocommerce' ),
@@ -476,7 +476,7 @@ class WC_Post_types {
'exclude_from_search' => false,
'show_in_admin_all_list' => true,
'show_in_admin_status_list' => true,
- 'label_count' => _n_noop( 'Cancelled (%s) ', 'Cancelled (%s) ', 'woocommerce' )
+ 'label_count' => _n_noop( 'Cancelled (%s) ', 'Cancelled (%s) ', 'woocommerce' ),
),
'wc-refunded' => array(
'label' => _x( 'Refunded', 'Order status', 'woocommerce' ),
@@ -484,7 +484,7 @@ class WC_Post_types {
'exclude_from_search' => false,
'show_in_admin_all_list' => true,
'show_in_admin_status_list' => true,
- 'label_count' => _n_noop( 'Refunded (%s) ', 'Refunded (%s) ', 'woocommerce' )
+ 'label_count' => _n_noop( 'Refunded (%s) ', 'Refunded (%s) ', 'woocommerce' ),
),
'wc-failed' => array(
'label' => _x( 'Failed', 'Order status', 'woocommerce' ),
@@ -492,7 +492,7 @@ class WC_Post_types {
'exclude_from_search' => false,
'show_in_admin_all_list' => true,
'show_in_admin_status_list' => true,
- 'label_count' => _n_noop( 'Failed (%s) ', 'Failed (%s) ', 'woocommerce' )
+ 'label_count' => _n_noop( 'Failed (%s) ', 'Failed (%s) ', 'woocommerce' ),
),
)
);
diff --git a/includes/class-wc-product-simple.php b/includes/class-wc-product-simple.php
index 093aeab1b6c..edb8fe6673a 100644
--- a/includes/class-wc-product-simple.php
+++ b/includes/class-wc-product-simple.php
@@ -79,7 +79,7 @@ class WC_Product_Simple extends WC_Product {
'meta_key' => '_price',
'posts_per_page' => 1,
'post_type' => 'product',
- 'fields' => 'ids'
+ 'fields' => 'ids',
));
if ( $children_by_price ) {
foreach ( $children_by_price as $child ) {
diff --git a/includes/class-wc-product-variable.php b/includes/class-wc-product-variable.php
index b14dbb733e8..1a053ac5a38 100644
--- a/includes/class-wc-product-variable.php
+++ b/includes/class-wc-product-variable.php
@@ -117,7 +117,7 @@ class WC_Product_Variable extends WC_Product {
'order' => 'ASC',
'fields' => 'ids',
'post_status' => 'publish',
- 'numberposts' => -1
+ 'numberposts' => -1,
);
if ( $visible_only ) {
@@ -149,7 +149,7 @@ class WC_Product_Variable extends WC_Product {
public function get_child( $child_id ) {
return wc_get_product( $child_id, array(
'parent_id' => $this->id,
- 'parent' => $this
+ 'parent' => $this,
) );
}
@@ -480,7 +480,7 @@ class WC_Product_Variable extends WC_Product {
'fields' => 'ids',
'post_status' => 'publish',
'numberposts' => 1,
- 'meta_query' => array()
+ 'meta_query' => array(),
);
foreach ( $this->get_attributes() as $attribute ) {
@@ -501,11 +501,11 @@ class WC_Product_Variable extends WC_Product {
array(
'key' => $attribute_field_name,
'value' => array( '', $value ),
- 'compare' => 'IN'
+ 'compare' => 'IN',
),
array(
'key' => $attribute_field_name,
- 'compare' => 'NOT EXISTS'
+ 'compare' => 'NOT EXISTS',
)
);
@@ -659,7 +659,7 @@ class WC_Product_Variable extends WC_Product {
'posts_per_page'=> -1,
'post_type' => 'product_variation',
'fields' => 'ids',
- 'post_status' => 'publish'
+ 'post_status' => 'publish',
) );
$stock_status = 'outofstock';
@@ -686,7 +686,7 @@ class WC_Product_Variable extends WC_Product {
'posts_per_page'=> -1,
'post_type' => 'product_variation',
'fields' => 'ids',
- 'post_status' => 'any'
+ 'post_status' => 'any',
) );
}
@@ -761,7 +761,7 @@ class WC_Product_Variable extends WC_Product {
'posts_per_page'=> -1,
'post_type' => 'product_variation',
'fields' => 'ids',
- 'post_status' => 'publish'
+ 'post_status' => 'publish',
) );
// No published variations - product won't be purchasable.
diff --git a/includes/class-wc-product-variation.php b/includes/class-wc-product-variation.php
index 0bff7c2f6d1..10a35a9f412 100644
--- a/includes/class-wc-product-variation.php
+++ b/includes/class-wc-product-variation.php
@@ -50,7 +50,7 @@ class WC_Product_Variation extends WC_Product {
'sale_price' => '',
'stock' => 0,
'stock_status' => 'instock',
- 'downloadable_files' => array()
+ 'downloadable_files' => array(),
);
/** @private array Data which can be at variation level, otherwise fallback to parent if not set. */
@@ -61,7 +61,7 @@ class WC_Product_Variation extends WC_Product {
'weight' => '',
'length' => '',
'width' => '',
- 'height' => ''
+ 'height' => '',
);
/**
diff --git a/includes/class-wc-session-handler.php b/includes/class-wc-session-handler.php
index 0546ac3dbc1..f147f81a041 100644
--- a/includes/class-wc-session-handler.php
+++ b/includes/class-wc-session-handler.php
@@ -182,7 +182,7 @@ class WC_Session_Handler extends WC_Session {
array(
'session_key' => $this->_customer_id,
'session_value' => maybe_serialize( $this->_data ),
- 'session_expiry' => $this->_session_expiration
+ 'session_expiry' => $this->_session_expiration,
),
array(
'%s',
@@ -285,7 +285,7 @@ class WC_Session_Handler extends WC_Session {
$wpdb->delete(
$this->_table,
array(
- 'session_key' => $customer_id
+ 'session_key' => $customer_id,
)
);
}
@@ -302,10 +302,10 @@ class WC_Session_Handler extends WC_Session {
$wpdb->update(
$this->_table,
array(
- 'session_expiry' => $timestamp
+ 'session_expiry' => $timestamp,
),
array(
- 'session_key' => $customer_id
+ 'session_key' => $customer_id,
),
array(
'%d'
diff --git a/includes/class-wc-shipping-zone.php b/includes/class-wc-shipping-zone.php
index 1c2e3180ea2..46c98aaee6f 100644
--- a/includes/class-wc-shipping-zone.php
+++ b/includes/class-wc-shipping-zone.php
@@ -23,7 +23,7 @@ class WC_Shipping_Zone extends WC_Data {
'zone_id' => null,
'zone_name' => '',
'zone_order' => 0,
- 'zone_locations' => array()
+ 'zone_locations' => array(),
);
/**
@@ -372,7 +372,7 @@ class WC_Shipping_Zone extends WC_Data {
}
$location = array(
'code' => wc_clean( $code ),
- 'type' => wc_clean( $type )
+ 'type' => wc_clean( $type ),
);
$this->_data['zone_locations'][] = (object) $location;
$this->_locations_changed = true;
@@ -440,7 +440,7 @@ class WC_Shipping_Zone extends WC_Data {
$wpdb->insert( $wpdb->prefix . 'woocommerce_shipping_zone_locations', array(
'zone_id' => $this->get_id(),
'location_code' => $location->code,
- 'location_type' => $location->type
+ 'location_type' => $location->type,
) );
}
}
@@ -468,7 +468,7 @@ class WC_Shipping_Zone extends WC_Data {
array(
'method_id' => $type,
'zone_id' => $this->get_id(),
- 'method_order' => ( $count + 1 )
+ 'method_order' => ( $count + 1 ),
),
array(
'%s',
diff --git a/includes/class-wc-shipping.php b/includes/class-wc-shipping.php
index 758f62bed50..1b162ed9ac4 100644
--- a/includes/class-wc-shipping.php
+++ b/includes/class-wc-shipping.php
@@ -369,7 +369,7 @@ class WC_Shipping {
// Store in session to avoid recalculation
WC()->session->set( $session_key, array(
'package_hash' => $package_hash,
- 'rates' => $package['rates']
+ 'rates' => $package['rates'],
) );
} else {
$package['rates'] = $stored_rates['rates'];
diff --git a/includes/class-wc-shortcodes.php b/includes/class-wc-shortcodes.php
index c4f926c091b..11f4e2ab457 100644
--- a/includes/class-wc-shortcodes.php
+++ b/includes/class-wc-shortcodes.php
@@ -62,7 +62,7 @@ class WC_Shortcodes {
$wrapper = array(
'class' => 'woocommerce',
'before' => null,
- 'after' => null
+ 'after' => null,
)
) {
ob_start();
@@ -177,7 +177,7 @@ class WC_Shortcodes {
'orderby' => 'menu_order title',
'order' => 'asc',
'category' => '', // Slugs
- 'operator' => 'IN' // Possible values are 'IN', 'NOT IN', 'AND'.
+ 'operator' => 'IN', // Possible values are 'IN', 'NOT IN', 'AND'.
), $atts, 'product_category' );
if ( ! $atts['category'] ) {
@@ -194,7 +194,7 @@ class WC_Shortcodes {
'orderby' => $ordering_args['orderby'],
'order' => $ordering_args['order'],
'posts_per_page' => $atts['per_page'],
- 'meta_query' => $meta_query
+ 'meta_query' => $meta_query,
);
$query_args = self::_maybe_add_category_args( $query_args, $atts['category'], $atts['operator'] );
@@ -228,7 +228,7 @@ class WC_Shortcodes {
'columns' => '4',
'hide_empty' => 1,
'parent' => '',
- 'ids' => ''
+ 'ids' => '',
), $atts, 'product_categories' );
if ( isset( $atts['ids'] ) ) {
@@ -247,7 +247,7 @@ class WC_Shortcodes {
'hide_empty' => $hide_empty,
'include' => $ids,
'pad_counts' => true,
- 'child_of' => $atts['parent']
+ 'child_of' => $atts['parent'],
);
$product_categories = get_terms( 'product_cat', $args );
@@ -278,7 +278,7 @@ class WC_Shortcodes {
foreach ( $product_categories as $category ) {
wc_get_template( 'content-product_cat.php', array(
- 'category' => $category
+ 'category' => $category,
) );
}
@@ -303,7 +303,7 @@ class WC_Shortcodes {
'orderby' => 'date',
'order' => 'desc',
'category' => '', // Slugs
- 'operator' => 'IN' // Possible values are 'IN', 'NOT IN', 'AND'.
+ 'operator' => 'IN', // Possible values are 'IN', 'NOT IN', 'AND'.
), $atts, 'recent_products' );
$query_args = array(
@@ -313,7 +313,7 @@ class WC_Shortcodes {
'posts_per_page' => $atts['per_page'],
'orderby' => $atts['orderby'],
'order' => $atts['order'],
- 'meta_query' => WC()->query->get_meta_query()
+ 'meta_query' => WC()->query->get_meta_query(),
);
$query_args = self::_maybe_add_category_args( $query_args, $atts['category'], $atts['operator'] );
@@ -333,7 +333,7 @@ class WC_Shortcodes {
'orderby' => 'title',
'order' => 'asc',
'ids' => '',
- 'skus' => ''
+ 'skus' => '',
), $atts, 'products' );
$query_args = array(
@@ -343,14 +343,14 @@ class WC_Shortcodes {
'orderby' => $atts['orderby'],
'order' => $atts['order'],
'posts_per_page' => -1,
- 'meta_query' => WC()->query->get_meta_query()
+ 'meta_query' => WC()->query->get_meta_query(),
);
if ( ! empty( $atts['skus'] ) ) {
$query_args['meta_query'][] = array(
'key' => '_sku',
'value' => array_map( 'trim', explode( ',', $atts['skus'] ) ),
- 'compare' => 'IN'
+ 'compare' => 'IN',
);
// Ignore catalog visibility
@@ -385,14 +385,14 @@ class WC_Shortcodes {
'posts_per_page' => 1,
'no_found_rows' => 1,
'post_status' => 'publish',
- 'meta_query' => $meta_query
+ 'meta_query' => $meta_query,
);
if ( isset( $atts['sku'] ) ) {
$args['meta_query'][] = array(
'key' => '_sku',
'value' => $atts['sku'],
- 'compare' => '='
+ 'compare' => '=',
);
}
@@ -448,7 +448,7 @@ class WC_Shortcodes {
'quantity' => '1',
'sku' => '',
'style' => 'border:4px solid #ccc; padding: 12px;',
- 'show_price' => 'true'
+ 'show_price' => 'true',
), $atts, 'product_add_to_cart' );
if ( ! empty( $atts['id'] ) ) {
@@ -532,7 +532,7 @@ class WC_Shortcodes {
'orderby' => 'title',
'order' => 'asc',
'category' => '', // Slugs
- 'operator' => 'IN' // Possible values are 'IN', 'NOT IN', 'AND'.
+ 'operator' => 'IN', // Possible values are 'IN', 'NOT IN', 'AND'.
), $atts, 'sale_products' );
$query_args = array(
@@ -543,7 +543,7 @@ class WC_Shortcodes {
'post_status' => 'publish',
'post_type' => 'product',
'meta_query' => WC()->query->get_meta_query(),
- 'post__in' => array_merge( array( 0 ), wc_get_product_ids_on_sale() )
+ 'post__in' => array_merge( array( 0 ), wc_get_product_ids_on_sale() ),
);
$query_args = self::_maybe_add_category_args( $query_args, $atts['category'], $atts['operator'] );
@@ -562,7 +562,7 @@ class WC_Shortcodes {
'per_page' => '12',
'columns' => '4',
'category' => '', // Slugs
- 'operator' => 'IN' // Possible values are 'IN', 'NOT IN', 'AND'.
+ 'operator' => 'IN', // Possible values are 'IN', 'NOT IN', 'AND'.
), $atts, 'best_selling_products' );
$query_args = array(
@@ -572,7 +572,7 @@ class WC_Shortcodes {
'posts_per_page' => $atts['per_page'],
'meta_key' => 'total_sales',
'orderby' => 'meta_value_num',
- 'meta_query' => WC()->query->get_meta_query()
+ 'meta_query' => WC()->query->get_meta_query(),
);
$query_args = self::_maybe_add_category_args( $query_args, $atts['category'], $atts['operator'] );
@@ -593,7 +593,7 @@ class WC_Shortcodes {
'orderby' => 'title',
'order' => 'asc',
'category' => '', // Slugs
- 'operator' => 'IN' // Possible values are 'IN', 'NOT IN', 'AND'.
+ 'operator' => 'IN', // Possible values are 'IN', 'NOT IN', 'AND'.
), $atts, 'top_rated_products' );
$query_args = array(
@@ -603,7 +603,7 @@ class WC_Shortcodes {
'orderby' => $atts['orderby'],
'order' => $atts['order'],
'posts_per_page' => $atts['per_page'],
- 'meta_query' => WC()->query->get_meta_query()
+ 'meta_query' => WC()->query->get_meta_query(),
);
$query_args = self::_maybe_add_category_args( $query_args, $atts['category'], $atts['operator'] );
@@ -630,13 +630,13 @@ class WC_Shortcodes {
'orderby' => 'date',
'order' => 'desc',
'category' => '', // Slugs
- 'operator' => 'IN' // Possible values are 'IN', 'NOT IN', 'AND'.
+ 'operator' => 'IN', // Possible values are 'IN', 'NOT IN', 'AND'.
), $atts, 'featured_products' );
$meta_query = WC()->query->get_meta_query();
$meta_query[] = array(
'key' => '_featured',
- 'value' => 'yes'
+ 'value' => 'yes',
);
$query_args = array(
@@ -646,7 +646,7 @@ class WC_Shortcodes {
'posts_per_page' => $atts['per_page'],
'orderby' => $atts['orderby'],
'order' => $atts['order'],
- 'meta_query' => $meta_query
+ 'meta_query' => $meta_query,
);
$query_args = self::_maybe_add_category_args( $query_args, $atts['category'], $atts['operator'] );
@@ -674,14 +674,14 @@ class WC_Shortcodes {
'post_type' => 'product',
'post_status' => 'publish',
'ignore_sticky_posts' => 1,
- 'no_found_rows' => 1
+ 'no_found_rows' => 1,
);
if ( isset( $atts['sku'] ) ) {
$args['meta_query'][] = array(
'key' => '_sku',
'value' => sanitize_text_field( $atts['sku'] ),
- 'compare' => '='
+ 'compare' => '=',
);
$args['post_type'] = array( 'product', 'product_variation' );
@@ -711,7 +711,7 @@ class WC_Shortcodes {
'post_status' => 'publish',
'ignore_sticky_posts' => 1,
'no_found_rows' => 1,
- 'p' => $single_product->post->post_parent
+ 'p' => $single_product->post->post_parent,
);
$single_product = new WP_Query( $args );
@@ -787,7 +787,7 @@ class WC_Shortcodes {
'orderby' => 'title',
'order' => 'asc',
'attribute' => '',
- 'filter' => ''
+ 'filter' => '',
), $atts, 'product_attribute' );
$query_args = array(
@@ -802,9 +802,9 @@ class WC_Shortcodes {
array(
'taxonomy' => strstr( $atts['attribute'], 'pa_' ) ? sanitize_title( $atts['attribute'] ) : 'pa_' . sanitize_title( $atts['attribute'] ),
'terms' => array_map( 'sanitize_title', explode( ',', $atts['filter'] ) ),
- 'field' => 'slug'
+ 'field' => 'slug',
)
- )
+ ),
);
return self::product_loop( $query_args, $atts, 'product_attribute' );
@@ -819,7 +819,7 @@ class WC_Shortcodes {
$atts = shortcode_atts( array(
'per_page' => '4',
'columns' => '4',
- 'orderby' => 'rand'
+ 'orderby' => 'rand',
), $atts, 'related_products' );
ob_start();
@@ -848,7 +848,7 @@ class WC_Shortcodes {
'taxonomy' => 'product_cat',
'terms' => array_map( 'sanitize_title', explode( ',', $category ) ),
'field' => 'slug',
- 'operator' => $operator
+ 'operator' => $operator,
)
);
}
diff --git a/includes/class-wc-tax.php b/includes/class-wc-tax.php
index 606d10c5d1a..d8f9feb3dea 100644
--- a/includes/class-wc-tax.php
+++ b/includes/class-wc-tax.php
@@ -247,7 +247,7 @@ class WC_Tax {
'state' => '',
'city' => '',
'postcode' => '',
- 'tax_class' => ''
+ 'tax_class' => '',
) );
extract( $args, EXTR_SKIP );
@@ -422,7 +422,7 @@ class WC_Tax {
'rate' => $found_rate->tax_rate,
'label' => $found_rate->tax_rate_name,
'shipping' => $found_rate->tax_rate_shipping ? 'yes' : 'no',
- 'compound' => $found_rate->tax_rate_compound ? 'yes' : 'no'
+ 'compound' => $found_rate->tax_rate_compound ? 'yes' : 'no',
);
$found_priority[] = $found_rate->tax_rate_priority;
@@ -474,7 +474,7 @@ class WC_Tax {
'state' => $state,
'postcode' => $postcode,
'city' => $city,
- 'tax_class' => $tax_class
+ 'tax_class' => $tax_class,
) );
}
@@ -493,7 +493,7 @@ class WC_Tax {
'state' => WC()->countries->get_base_state(),
'postcode' => WC()->countries->get_base_postcode(),
'city' => WC()->countries->get_base_city(),
- 'tax_class' => $tax_class
+ 'tax_class' => $tax_class,
) ), $tax_class );
}
@@ -533,7 +533,7 @@ class WC_Tax {
'state' => $state,
'postcode' => $postcode,
'city' => $city,
- 'tax_class' => $tax_class
+ 'tax_class' => $tax_class,
) );
} else {
@@ -553,7 +553,7 @@ class WC_Tax {
'state' => $state,
'postcode' => $postcode,
'city' => $city,
- 'tax_class' => $tax_class
+ 'tax_class' => $tax_class,
) );
break;
}
@@ -566,7 +566,7 @@ class WC_Tax {
'state' => $state,
'postcode' => $postcode,
'city' => $city,
- 'tax_class' => $cart_tax_classes[0]
+ 'tax_class' => $cart_tax_classes[0],
) );
}
}
@@ -577,7 +577,7 @@ class WC_Tax {
'country' => $country,
'state' => $state,
'postcode' => $postcode,
- 'city' => $city
+ 'city' => $city,
) );
}
}
@@ -841,7 +841,7 @@ class WC_Tax {
$wpdb->prefix . "woocommerce_tax_rates",
self::prepare_tax_rate( $tax_rate ),
array(
- 'tax_rate_id' => $tax_rate_id
+ 'tax_rate_id' => $tax_rate_id,
)
);
diff --git a/includes/class-wc-tracker.php b/includes/class-wc-tracker.php
index 289bff3b469..e7619ef0993 100644
--- a/includes/class-wc-tracker.php
+++ b/includes/class-wc-tracker.php
@@ -68,7 +68,7 @@ class WC_Tracker {
'blocking' => false,
'headers' => array( 'user-agent' => 'WooCommerceTracker/' . md5( esc_url( home_url( '/' ) ) ) . ';' ),
'body' => json_encode( $params ),
- 'cookies' => array()
+ 'cookies' => array(),
)
);
}
diff --git a/includes/cli/class-wc-cli-coupon.php b/includes/cli/class-wc-cli-coupon.php
index f1ef46cf8f9..bb7a925001f 100644
--- a/includes/cli/class-wc-cli-coupon.php
+++ b/includes/cli/class-wc-cli-coupon.php
@@ -96,7 +96,7 @@ class WC_CLI_Coupon extends WC_CLI_Command {
'minimum_amount' => '',
'maximum_amount' => '',
'customer_emails' => array(),
- 'description' => ''
+ 'description' => '',
);
$coupon_data = wp_parse_args( $assoc_args, $defaults );
@@ -112,7 +112,7 @@ class WC_CLI_Coupon extends WC_CLI_Command {
'post_status' => 'publish',
'post_author' => get_current_user_id(),
'post_type' => 'shop_coupon',
- 'post_excerpt' => $coupon_data['description']
+ 'post_excerpt' => $coupon_data['description'],
);
$id = wp_insert_post( $new_coupon, $wp_error = false );
diff --git a/includes/cli/class-wc-cli-order.php b/includes/cli/class-wc-cli-order.php
index 667398c2039..7ef6952783b 100644
--- a/includes/cli/class-wc-cli-order.php
+++ b/includes/cli/class-wc-cli-order.php
@@ -579,7 +579,7 @@ class WC_CLI_Order extends WC_CLI_Command {
array(
'key' => '_customer_user',
'value' => (int) $args['customer_id'],
- 'compare' => '='
+ 'compare' => '=',
)
);
}
diff --git a/includes/cli/class-wc-cli-product-category.php b/includes/cli/class-wc-cli-product-category.php
index 4d9dacdd8c3..2159a0f29ae 100644
--- a/includes/cli/class-wc-cli-product-category.php
+++ b/includes/cli/class-wc-cli-product-category.php
@@ -143,7 +143,7 @@ class WC_CLI_Product_Category extends WC_CLI_Command {
'description' => $term->description,
'display' => $display_type ? $display_type : 'default',
'image' => $image ? esc_url( $image ) : '',
- 'count' => intval( $term->count )
+ 'count' => intval( $term->count ),
);
}
diff --git a/includes/cli/class-wc-cli-product.php b/includes/cli/class-wc-cli-product.php
index c8ec36db782..55fba1a638c 100644
--- a/includes/cli/class-wc-cli-product.php
+++ b/includes/cli/class-wc-cli-product.php
@@ -712,7 +712,7 @@ class WC_CLI_Product extends WC_CLI_Command {
$query_args['meta_query'][] = array(
'key' => '_sku',
'value' => $args['sku'],
- 'compare' => '='
+ 'compare' => '=',
);
}
@@ -1192,7 +1192,7 @@ class WC_CLI_Product extends WC_CLI_Command {
'position' => isset( $attribute['position'] ) ? absint( $attribute['position'] ) : 0,
'is_visible' => ( isset( $attribute['visible'] ) && $attribute['visible'] ) ? 1 : 0,
'is_variation' => ( isset( $attribute['variation'] ) && $attribute['variation'] ) ? 1 : 0,
- 'is_taxonomy' => $is_taxonomy
+ 'is_taxonomy' => $is_taxonomy,
);
}
@@ -1213,7 +1213,7 @@ class WC_CLI_Product extends WC_CLI_Command {
'position' => isset( $attribute['position'] ) ? absint( $attribute['position'] ) : 0,
'is_visible' => ( isset( $attribute['visible'] ) && $attribute['visible'] ) ? 1 : 0,
'is_variation' => ( isset( $attribute['variation'] ) && $attribute['variation'] ) ? 1 : 0,
- 'is_taxonomy' => $is_taxonomy
+ 'is_taxonomy' => $is_taxonomy,
);
}
}
@@ -1319,7 +1319,7 @@ class WC_CLI_Product extends WC_CLI_Command {
'meta_key' => '_price',
'posts_per_page' => 1,
'post_type' => 'product',
- 'fields' => 'ids'
+ 'fields' => 'ids',
) );
if ( $children_by_price ) {
@@ -1546,7 +1546,7 @@ class WC_CLI_Product extends WC_CLI_Command {
'post_author' => get_current_user_id(),
'post_parent' => $id,
'post_type' => 'product_variation',
- 'menu_order' => $menu_order
+ 'menu_order' => $menu_order,
);
$variation_id = wp_insert_post( $new_variation );
@@ -1959,7 +1959,7 @@ class WC_CLI_Product extends WC_CLI_Command {
$files[ md5( $file_url ) ] = array(
'name' => $file_name,
- 'file' => $file_url
+ 'file' => $file_url,
);
}
@@ -2030,7 +2030,7 @@ class WC_CLI_Product extends WC_CLI_Command {
// Get the file
$response = wp_safe_remote_get( $image_url, array(
- 'timeout' => 10
+ 'timeout' => 10,
) );
if ( is_wp_error( $response ) ) {
@@ -2109,7 +2109,7 @@ class WC_CLI_Product extends WC_CLI_Command {
'guid' => $upload['url'],
'post_parent' => $id,
'post_title' => $title,
- 'post_content' => $content
+ 'post_content' => $content,
);
$attachment_id = wp_insert_attachment( $attachment, $upload['file'], $id );
diff --git a/includes/cli/class-wc-cli-report.php b/includes/cli/class-wc-cli-report.php
index 08550a63dff..512cbb7b5bc 100644
--- a/includes/cli/class-wc-cli-report.php
+++ b/includes/cli/class-wc-cli-report.php
@@ -271,14 +271,14 @@ class WC_CLI_Report extends WC_CLI_Command {
'type' => 'order_item_meta',
'order_item_type' => 'line_item',
'function' => '',
- 'name' => 'product_id'
+ 'name' => 'product_id',
),
'_qty' => array(
'type' => 'order_item_meta',
'order_item_type' => 'line_item',
'function' => 'SUM',
- 'name' => 'order_item_qty'
- )
+ 'name' => 'order_item_qty',
+ ),
),
'order_by' => 'order_item_qty DESC',
'group_by' => 'product_id',
diff --git a/includes/cli/class-wc-cli-tax.php b/includes/cli/class-wc-cli-tax.php
index 28a0b64287e..dbef61db274 100644
--- a/includes/cli/class-wc-cli-tax.php
+++ b/includes/cli/class-wc-cli-tax.php
@@ -431,7 +431,7 @@ class WC_CLI_Tax extends WC_CLI_Command {
// Add standard class
$items[] = array(
'slug' => 'standard',
- 'name' => __( 'Standard Rate', 'woocommerce' )
+ 'name' => __( 'Standard Rate', 'woocommerce' ),
);
$classes = WC_Tax::get_tax_classes();
@@ -439,7 +439,7 @@ class WC_CLI_Tax extends WC_CLI_Command {
foreach ( $classes as $class ) {
$items[] = apply_filters( 'woocommerce_cli_tax_class_response', array(
'slug' => sanitize_title( $class ),
- 'name' => $class
+ 'name' => $class,
), $class, $assoc_args, $this );
}
@@ -661,7 +661,7 @@ class WC_CLI_Tax extends WC_CLI_Command {
'compound' => (bool) $tax['tax_rate_compound'],
'shipping' => (bool) $tax['tax_rate_shipping'],
'order' => (int) $tax['tax_rate_order'],
- 'class' => $tax['tax_rate_class'] ? $tax['tax_rate_class'] : 'standard'
+ 'class' => $tax['tax_rate_class'] ? $tax['tax_rate_class'] : 'standard',
);
// Get locales from a tax rate
diff --git a/includes/emails/class-wc-email-cancelled-order.php b/includes/emails/class-wc-email-cancelled-order.php
index b3660225fbb..2265aadb0b1 100644
--- a/includes/emails/class-wc-email-cancelled-order.php
+++ b/includes/emails/class-wc-email-cancelled-order.php
@@ -75,7 +75,7 @@ class WC_Email_Cancelled_Order extends WC_Email {
'email_heading' => $this->get_heading(),
'sent_to_admin' => true,
'plain_text' => false,
- 'email' => $this
+ 'email' => $this,
) );
}
@@ -90,7 +90,7 @@ class WC_Email_Cancelled_Order extends WC_Email {
'email_heading' => $this->get_heading(),
'sent_to_admin' => true,
'plain_text' => true,
- 'email' => $this
+ 'email' => $this,
) );
}
@@ -103,7 +103,7 @@ class WC_Email_Cancelled_Order extends WC_Email {
'title' => __( 'Enable/Disable', 'woocommerce' ),
'type' => 'checkbox',
'label' => __( 'Enable this email notification', 'woocommerce' ),
- 'default' => 'yes'
+ 'default' => 'yes',
),
'recipient' => array(
'title' => __( 'Recipient(s)', 'woocommerce' ),
@@ -111,7 +111,7 @@ class WC_Email_Cancelled_Order extends WC_Email {
'description' => sprintf( __( 'Enter recipients (comma separated) for this email. Defaults to %s
.', 'woocommerce' ), esc_attr( get_option('admin_email') ) ),
'placeholder' => '',
'default' => '',
- 'desc_tip' => true
+ 'desc_tip' => true,
),
'subject' => array(
'title' => __( 'Subject', 'woocommerce' ),
@@ -119,7 +119,7 @@ class WC_Email_Cancelled_Order extends WC_Email {
'description' => sprintf( __( 'This controls the email subject line. Leave blank to use the default subject: %s
.', 'woocommerce' ), $this->subject ),
'placeholder' => '',
'default' => '',
- 'desc_tip' => true
+ 'desc_tip' => true,
),
'heading' => array(
'title' => __( 'Email Heading', 'woocommerce' ),
@@ -127,7 +127,7 @@ class WC_Email_Cancelled_Order extends WC_Email {
'description' => sprintf( __( 'This controls the main heading contained within the email notification. Leave blank to use the default heading: %s
.', 'woocommerce' ), $this->heading ),
'placeholder' => '',
'default' => '',
- 'desc_tip' => true
+ 'desc_tip' => true,
),
'email_type' => array(
'title' => __( 'Email type', 'woocommerce' ),
@@ -136,8 +136,8 @@ class WC_Email_Cancelled_Order extends WC_Email {
'default' => 'html',
'class' => 'email_type wc-enhanced-select',
'options' => $this->get_email_type_options(),
- 'desc_tip' => true
- )
+ 'desc_tip' => true,
+ ),
);
}
}
diff --git a/includes/emails/class-wc-email-customer-completed-order.php b/includes/emails/class-wc-email-customer-completed-order.php
index 54d86aef5b1..d28257f8ffa 100644
--- a/includes/emails/class-wc-email-customer-completed-order.php
+++ b/includes/emails/class-wc-email-customer-completed-order.php
@@ -111,7 +111,7 @@ class WC_Email_Customer_Completed_Order extends WC_Email {
'email_heading' => $this->get_heading(),
'sent_to_admin' => false,
'plain_text' => false,
- 'email' => $this
+ 'email' => $this,
) );
}
@@ -126,7 +126,7 @@ class WC_Email_Customer_Completed_Order extends WC_Email {
'email_heading' => $this->get_heading(),
'sent_to_admin' => false,
'plain_text' => true,
- 'email' => $this
+ 'email' => $this,
) );
}
@@ -139,7 +139,7 @@ class WC_Email_Customer_Completed_Order extends WC_Email {
'title' => __( 'Enable/Disable', 'woocommerce' ),
'type' => 'checkbox',
'label' => __( 'Enable this email notification', 'woocommerce' ),
- 'default' => 'yes'
+ 'default' => 'yes',
),
'subject' => array(
'title' => __( 'Subject', 'woocommerce' ),
@@ -147,7 +147,7 @@ class WC_Email_Customer_Completed_Order extends WC_Email {
'description' => sprintf( __( 'Defaults to %s
', 'woocommerce' ), $this->subject ),
'placeholder' => '',
'default' => '',
- 'desc_tip' => true
+ 'desc_tip' => true,
),
'heading' => array(
'title' => __( 'Email Heading', 'woocommerce' ),
@@ -155,7 +155,7 @@ class WC_Email_Customer_Completed_Order extends WC_Email {
'description' => sprintf( __( 'Defaults to %s
', 'woocommerce' ), $this->heading ),
'placeholder' => '',
'default' => '',
- 'desc_tip' => true
+ 'desc_tip' => true,
),
'subject_downloadable' => array(
'title' => __( 'Subject (downloadable)', 'woocommerce' ),
@@ -163,7 +163,7 @@ class WC_Email_Customer_Completed_Order extends WC_Email {
'description' => sprintf( __( 'Defaults to %s
', 'woocommerce' ), $this->subject_downloadable ),
'placeholder' => '',
'default' => '',
- 'desc_tip' => true
+ 'desc_tip' => true,
),
'heading_downloadable' => array(
'title' => __( 'Email Heading (downloadable)', 'woocommerce' ),
@@ -171,7 +171,7 @@ class WC_Email_Customer_Completed_Order extends WC_Email {
'description' => sprintf( __( 'Defaults to %s
', 'woocommerce' ), $this->heading_downloadable ),
'placeholder' => '',
'default' => '',
- 'desc_tip' => true
+ 'desc_tip' => true,
),
'email_type' => array(
'title' => __( 'Email type', 'woocommerce' ),
@@ -180,8 +180,8 @@ class WC_Email_Customer_Completed_Order extends WC_Email {
'default' => 'html',
'class' => 'email_type wc-enhanced-select',
'options' => $this->get_email_type_options(),
- 'desc_tip' => true
- )
+ 'desc_tip' => true,
+ ),
);
}
}
diff --git a/includes/emails/class-wc-email-customer-invoice.php b/includes/emails/class-wc-email-customer-invoice.php
index f6540326232..a3ae60d2dbe 100644
--- a/includes/emails/class-wc-email-customer-invoice.php
+++ b/includes/emails/class-wc-email-customer-invoice.php
@@ -129,7 +129,7 @@ class WC_Email_Customer_Invoice extends WC_Email {
'email_heading' => $this->get_heading(),
'sent_to_admin' => false,
'plain_text' => false,
- 'email' => $this
+ 'email' => $this,
) );
}
@@ -145,7 +145,7 @@ class WC_Email_Customer_Invoice extends WC_Email {
'email_heading' => $this->get_heading(),
'sent_to_admin' => false,
'plain_text' => true,
- 'email' => $this
+ 'email' => $this,
) );
}
@@ -160,7 +160,7 @@ class WC_Email_Customer_Invoice extends WC_Email {
'description' => sprintf( __( 'Defaults to %s
', 'woocommerce' ), $this->subject ),
'placeholder' => '',
'default' => '',
- 'desc_tip' => true
+ 'desc_tip' => true,
),
'heading' => array(
'title' => __( 'Email Heading', 'woocommerce' ),
@@ -168,7 +168,7 @@ class WC_Email_Customer_Invoice extends WC_Email {
'description' => sprintf( __( 'Defaults to %s
', 'woocommerce' ), $this->heading ),
'placeholder' => '',
'default' => '',
- 'desc_tip' => true
+ 'desc_tip' => true,
),
'subject_paid' => array(
'title' => __( 'Email Subject (paid)', 'woocommerce' ),
@@ -176,7 +176,7 @@ class WC_Email_Customer_Invoice extends WC_Email {
'description' => sprintf( __( 'Defaults to %s
', 'woocommerce' ), $this->subject_paid ),
'placeholder' => '',
'default' => '',
- 'desc_tip' => true
+ 'desc_tip' => true,
),
'heading_paid' => array(
'title' => __( 'Email Heading (paid)', 'woocommerce' ),
@@ -184,7 +184,7 @@ class WC_Email_Customer_Invoice extends WC_Email {
'description' => sprintf( __( 'Defaults to %s
', 'woocommerce' ), $this->heading_paid ),
'placeholder' => '',
'default' => '',
- 'desc_tip' => true
+ 'desc_tip' => true,
),
'email_type' => array(
'title' => __( 'Email Type', 'woocommerce' ),
@@ -193,8 +193,8 @@ class WC_Email_Customer_Invoice extends WC_Email {
'default' => 'html',
'class' => 'email_type wc-enhanced-select',
'options' => $this->get_email_type_options(),
- 'desc_tip' => true
- )
+ 'desc_tip' => true,
+ ),
);
}
}
diff --git a/includes/emails/class-wc-email-customer-new-account.php b/includes/emails/class-wc-email-customer-new-account.php
index 424d5f5dee7..47f65c3221b 100644
--- a/includes/emails/class-wc-email-customer-new-account.php
+++ b/includes/emails/class-wc-email-customer-new-account.php
@@ -108,7 +108,7 @@ class WC_Email_Customer_New_Account extends WC_Email {
'password_generated' => $this->password_generated,
'sent_to_admin' => false,
'plain_text' => false,
- 'email' => $this
+ 'email' => $this,
) );
}
@@ -127,7 +127,7 @@ class WC_Email_Customer_New_Account extends WC_Email {
'password_generated' => $this->password_generated,
'sent_to_admin' => false,
'plain_text' => true,
- 'email' => $this
+ 'email' => $this,
) );
}
}
diff --git a/includes/emails/class-wc-email-customer-note.php b/includes/emails/class-wc-email-customer-note.php
index e9bbe940188..7d3392b347d 100644
--- a/includes/emails/class-wc-email-customer-note.php
+++ b/includes/emails/class-wc-email-customer-note.php
@@ -60,7 +60,7 @@ class WC_Email_Customer_Note extends WC_Email {
$defaults = array(
'order_id' => '',
- 'customer_note' => ''
+ 'customer_note' => '',
);
$args = wp_parse_args( $args, $defaults );
@@ -101,7 +101,7 @@ class WC_Email_Customer_Note extends WC_Email {
'customer_note' => $this->customer_note,
'sent_to_admin' => false,
'plain_text' => false,
- 'email' => $this
+ 'email' => $this,
) );
}
@@ -118,7 +118,7 @@ class WC_Email_Customer_Note extends WC_Email {
'customer_note' => $this->customer_note,
'sent_to_admin' => false,
'plain_text' => true,
- 'email' => $this
+ 'email' => $this,
) );
}
}
diff --git a/includes/emails/class-wc-email-customer-on-hold-order.php b/includes/emails/class-wc-email-customer-on-hold-order.php
index 59b7bcc401e..39b01ce885e 100644
--- a/includes/emails/class-wc-email-customer-on-hold-order.php
+++ b/includes/emails/class-wc-email-customer-on-hold-order.php
@@ -77,7 +77,7 @@ class WC_Email_Customer_On_Hold_Order extends WC_Email {
'email_heading' => $this->get_heading(),
'sent_to_admin' => false,
'plain_text' => false,
- 'email' => $this
+ 'email' => $this,
) );
}
@@ -93,7 +93,7 @@ class WC_Email_Customer_On_Hold_Order extends WC_Email {
'email_heading' => $this->get_heading(),
'sent_to_admin' => false,
'plain_text' => true,
- 'email' => $this
+ 'email' => $this,
) );
}
}
diff --git a/includes/emails/class-wc-email-customer-processing-order.php b/includes/emails/class-wc-email-customer-processing-order.php
index fa48a4e6a7e..97a9f0bec0b 100644
--- a/includes/emails/class-wc-email-customer-processing-order.php
+++ b/includes/emails/class-wc-email-customer-processing-order.php
@@ -76,7 +76,7 @@ class WC_Email_Customer_Processing_Order extends WC_Email {
'email_heading' => $this->get_heading(),
'sent_to_admin' => false,
'plain_text' => false,
- 'email' => $this
+ 'email' => $this,
) );
}
@@ -92,7 +92,7 @@ class WC_Email_Customer_Processing_Order extends WC_Email {
'email_heading' => $this->get_heading(),
'sent_to_admin' => false,
'plain_text' => true,
- 'email' => $this
+ 'email' => $this,
) );
}
}
diff --git a/includes/emails/class-wc-email-customer-refunded-order.php b/includes/emails/class-wc-email-customer-refunded-order.php
index 086cdc9a246..aa4664a0a0e 100644
--- a/includes/emails/class-wc-email-customer-refunded-order.php
+++ b/includes/emails/class-wc-email-customer-refunded-order.php
@@ -168,7 +168,7 @@ class WC_Email_Customer_Refunded_Order extends WC_Email {
'email_heading' => $this->get_heading(),
'sent_to_admin' => false,
'plain_text' => false,
- 'email' => $this
+ 'email' => $this,
) );
}
@@ -185,7 +185,7 @@ class WC_Email_Customer_Refunded_Order extends WC_Email {
'email_heading' => $this->get_heading(),
'sent_to_admin' => false,
'plain_text' => true,
- 'email' => $this
+ 'email' => $this,
) );
}
@@ -198,7 +198,7 @@ class WC_Email_Customer_Refunded_Order extends WC_Email {
'title' => __( 'Enable/Disable', 'woocommerce' ),
'type' => 'checkbox',
'label' => __( 'Enable this email notification', 'woocommerce' ),
- 'default' => 'yes'
+ 'default' => 'yes',
),
'subject_full' => array(
'title' => __( 'Full Refund Subject', 'woocommerce' ),
@@ -206,7 +206,7 @@ class WC_Email_Customer_Refunded_Order extends WC_Email {
'description' => sprintf( __( 'Defaults to %s
', 'woocommerce' ), $this->subject_full ),
'placeholder' => '',
'default' => $this->subject_full,
- 'desc_tip' => true
+ 'desc_tip' => true,
),
'subject_partial' => array(
'title' => __( 'Partial Refund Subject', 'woocommerce' ),
@@ -214,7 +214,7 @@ class WC_Email_Customer_Refunded_Order extends WC_Email {
'description' => sprintf( __( 'Defaults to %s
', 'woocommerce' ), $this->subject_partial ),
'placeholder' => '',
'default' => $this->subject_partial,
- 'desc_tip' => true
+ 'desc_tip' => true,
),
'heading_full' => array(
'title' => __( 'Full Refund Email Heading', 'woocommerce' ),
@@ -222,7 +222,7 @@ class WC_Email_Customer_Refunded_Order extends WC_Email {
'description' => sprintf( __( 'Defaults to %s
', 'woocommerce' ), $this->heading_full ),
'placeholder' => '',
'default' => $this->heading_full,
- 'desc_tip' => true
+ 'desc_tip' => true,
),
'heading_partial' => array(
'title' => __( 'Partial Refund Email Heading', 'woocommerce' ),
@@ -230,7 +230,7 @@ class WC_Email_Customer_Refunded_Order extends WC_Email {
'description' => sprintf( __( 'Defaults to %s
', 'woocommerce' ), $this->heading_partial ),
'placeholder' => '',
'default' => $this->heading_partial,
- 'desc_tip' => true
+ 'desc_tip' => true,
),
'email_type' => array(
'title' => __( 'Email type', 'woocommerce' ),
@@ -239,8 +239,8 @@ class WC_Email_Customer_Refunded_Order extends WC_Email {
'default' => 'html',
'class' => 'email_type wc-enhanced-select',
'options' => $this->get_email_type_options(),
- 'desc_tip' => true
- )
+ 'desc_tip' => true,
+ ),
);
}
}
diff --git a/includes/emails/class-wc-email-customer-reset-password.php b/includes/emails/class-wc-email-customer-reset-password.php
index 48cf569de13..707ff9f3813 100644
--- a/includes/emails/class-wc-email-customer-reset-password.php
+++ b/includes/emails/class-wc-email-customer-reset-password.php
@@ -101,7 +101,7 @@ class WC_Email_Customer_Reset_Password extends WC_Email {
'blogname' => $this->get_blogname(),
'sent_to_admin' => false,
'plain_text' => false,
- 'email' => $this
+ 'email' => $this,
) );
}
@@ -119,7 +119,7 @@ class WC_Email_Customer_Reset_Password extends WC_Email {
'blogname' => $this->get_blogname(),
'sent_to_admin' => false,
'plain_text' => true,
- 'email' => $this
+ 'email' => $this,
) );
}
}
diff --git a/includes/emails/class-wc-email-failed-order.php b/includes/emails/class-wc-email-failed-order.php
index ccb24a4913e..ddf71b48e5c 100644
--- a/includes/emails/class-wc-email-failed-order.php
+++ b/includes/emails/class-wc-email-failed-order.php
@@ -75,7 +75,7 @@ class WC_Email_Failed_Order extends WC_Email {
'email_heading' => $this->get_heading(),
'sent_to_admin' => true,
'plain_text' => false,
- 'email' => $this
+ 'email' => $this,
) );
}
@@ -90,7 +90,7 @@ class WC_Email_Failed_Order extends WC_Email {
'email_heading' => $this->get_heading(),
'sent_to_admin' => true,
'plain_text' => true,
- 'email' => $this
+ 'email' => $this,
) );
}
@@ -103,7 +103,7 @@ class WC_Email_Failed_Order extends WC_Email {
'title' => __( 'Enable/Disable', 'woocommerce' ),
'type' => 'checkbox',
'label' => __( 'Enable this email notification', 'woocommerce' ),
- 'default' => 'yes'
+ 'default' => 'yes',
),
'recipient' => array(
'title' => __( 'Recipient(s)', 'woocommerce' ),
@@ -111,7 +111,7 @@ class WC_Email_Failed_Order extends WC_Email {
'description' => sprintf( __( 'Enter recipients (comma separated) for this email. Defaults to %s
.', 'woocommerce' ), esc_attr( get_option('admin_email') ) ),
'placeholder' => '',
'default' => '',
- 'desc_tip' => true
+ 'desc_tip' => true,
),
'subject' => array(
'title' => __( 'Subject', 'woocommerce' ),
@@ -119,7 +119,7 @@ class WC_Email_Failed_Order extends WC_Email {
'description' => sprintf( __( 'This controls the email subject line. Leave blank to use the default subject: %s
.', 'woocommerce' ), $this->subject ),
'placeholder' => '',
'default' => '',
- 'desc_tip' => true
+ 'desc_tip' => true,
),
'heading' => array(
'title' => __( 'Email Heading', 'woocommerce' ),
@@ -127,7 +127,7 @@ class WC_Email_Failed_Order extends WC_Email {
'description' => sprintf( __( 'This controls the main heading contained within the email notification. Leave blank to use the default heading: %s
.', 'woocommerce' ), $this->heading ),
'placeholder' => '',
'default' => '',
- 'desc_tip' => true
+ 'desc_tip' => true,
),
'email_type' => array(
'title' => __( 'Email type', 'woocommerce' ),
@@ -136,8 +136,8 @@ class WC_Email_Failed_Order extends WC_Email {
'default' => 'html',
'class' => 'email_type wc-enhanced-select',
'options' => $this->get_email_type_options(),
- 'desc_tip' => true
- )
+ 'desc_tip' => true,
+ ),
);
}
}
diff --git a/includes/emails/class-wc-email-new-order.php b/includes/emails/class-wc-email-new-order.php
index 2517229c5ef..b831c72abc4 100644
--- a/includes/emails/class-wc-email-new-order.php
+++ b/includes/emails/class-wc-email-new-order.php
@@ -79,7 +79,7 @@ class WC_Email_New_Order extends WC_Email {
'email_heading' => $this->get_heading(),
'sent_to_admin' => true,
'plain_text' => false,
- 'email' => $this
+ 'email' => $this,
) );
}
@@ -95,7 +95,7 @@ class WC_Email_New_Order extends WC_Email {
'email_heading' => $this->get_heading(),
'sent_to_admin' => true,
'plain_text' => true,
- 'email' => $this
+ 'email' => $this,
) );
}
@@ -108,7 +108,7 @@ class WC_Email_New_Order extends WC_Email {
'title' => __( 'Enable/Disable', 'woocommerce' ),
'type' => 'checkbox',
'label' => __( 'Enable this email notification', 'woocommerce' ),
- 'default' => 'yes'
+ 'default' => 'yes',
),
'recipient' => array(
'title' => __( 'Recipient(s)', 'woocommerce' ),
@@ -116,7 +116,7 @@ class WC_Email_New_Order extends WC_Email {
'description' => sprintf( __( 'Enter recipients (comma separated) for this email. Defaults to %s
.', 'woocommerce' ), esc_attr( get_option('admin_email') ) ),
'placeholder' => '',
'default' => '',
- 'desc_tip' => true
+ 'desc_tip' => true,
),
'subject' => array(
'title' => __( 'Subject', 'woocommerce' ),
@@ -124,7 +124,7 @@ class WC_Email_New_Order extends WC_Email {
'description' => sprintf( __( 'This controls the email subject line. Leave blank to use the default subject: %s
.', 'woocommerce' ), $this->subject ),
'placeholder' => '',
'default' => '',
- 'desc_tip' => true
+ 'desc_tip' => true,
),
'heading' => array(
'title' => __( 'Email Heading', 'woocommerce' ),
@@ -132,7 +132,7 @@ class WC_Email_New_Order extends WC_Email {
'description' => sprintf( __( 'This controls the main heading contained within the email notification. Leave blank to use the default heading: %s
.', 'woocommerce' ), $this->heading ),
'placeholder' => '',
'default' => '',
- 'desc_tip' => true
+ 'desc_tip' => true,
),
'email_type' => array(
'title' => __( 'Email type', 'woocommerce' ),
@@ -140,9 +140,9 @@ class WC_Email_New_Order extends WC_Email {
'description' => __( 'Choose which format of email to send.', 'woocommerce' ),
'default' => 'html',
'class' => 'email_type wc-enhanced-select',
- 'options' => $this->get_email_type_options(),
- 'desc_tip' => true
- )
+ 'options' => $this->,get_email_type_options(),
+ 'desc_tip' => true,
+ ),
);
}
}
diff --git a/includes/emails/class-wc-email.php b/includes/emails/class-wc-email.php
index 677243780d8..79a6157de74 100644
--- a/includes/emails/class-wc-email.php
+++ b/includes/emails/class-wc-email.php
@@ -279,7 +279,7 @@ class WC_Email extends WC_Settings_API {
*/
public function get_headers() {
$header = "Content-Type: " . $this->get_content_type() . "\r\n";
-
+
if ( 'new_order' === $this->id ) {
$header .= "Reply-to: {$this->object->billing_first_name} {$this->object->billing_last_name} <{$this->object->billing_email}>\r\n";
}
@@ -486,7 +486,7 @@ class WC_Email extends WC_Settings_API {
'title' => __( 'Enable/Disable', 'woocommerce' ),
'type' => 'checkbox',
'label' => __( 'Enable this email notification', 'woocommerce' ),
- 'default' => 'yes'
+ 'default' => 'yes',
),
'subject' => array(
'title' => __( 'Email Subject', 'woocommerce' ),
@@ -494,7 +494,7 @@ class WC_Email extends WC_Settings_API {
'description' => sprintf( __( 'Defaults to %s
', 'woocommerce' ), $this->subject ),
'placeholder' => '',
'default' => '',
- 'desc_tip' => true
+ 'desc_tip' => true,
),
'heading' => array(
'title' => __( 'Email Heading', 'woocommerce' ),
@@ -502,7 +502,7 @@ class WC_Email extends WC_Settings_API {
'description' => sprintf( __( 'Defaults to %s
', 'woocommerce' ), $this->heading ),
'placeholder' => '',
'default' => '',
- 'desc_tip' => true
+ 'desc_tip' => true,
),
'email_type' => array(
'title' => __( 'Email type', 'woocommerce' ),
@@ -511,8 +511,8 @@ class WC_Email extends WC_Settings_API {
'default' => 'html',
'class' => 'email_type wc-enhanced-select',
'options' => $this->get_email_type_options(),
- 'desc_tip' => true
- )
+ 'desc_tip' => true,
+ ),
);
}
@@ -740,7 +740,7 @@ class WC_Email extends WC_Settings_API {
__( 'HTML template', 'woocommerce' ),
- 'template_plain' => __( 'Plain text template', 'woocommerce' )
+ 'template_plain' => __( 'Plain text template', 'woocommerce' ),
);
foreach ( $templates as $template_type => $title ) :
diff --git a/includes/gateways/bacs/class-wc-gateway-bacs.php b/includes/gateways/bacs/class-wc-gateway-bacs.php
index 091e46e3369..61ae6d4a5de 100644
--- a/includes/gateways/bacs/class-wc-gateway-bacs.php
+++ b/includes/gateways/bacs/class-wc-gateway-bacs.php
@@ -49,7 +49,7 @@ class WC_Gateway_BACS extends WC_Payment_Gateway {
'sort_code' => $this->get_option( 'sort_code' ),
'bank_name' => $this->get_option( 'bank_name' ),
'iban' => $this->get_option( 'iban' ),
- 'bic' => $this->get_option( 'bic' )
+ 'bic' => $this->get_option( 'bic' ),
)
)
);
@@ -73,7 +73,7 @@ class WC_Gateway_BACS extends WC_Payment_Gateway {
'title' => __( 'Enable/Disable', 'woocommerce' ),
'type' => 'checkbox',
'label' => __( 'Enable Bank Transfer', 'woocommerce' ),
- 'default' => 'no'
+ 'default' => 'no',
),
'title' => array(
'title' => __( 'Title', 'woocommerce' ),
@@ -97,7 +97,7 @@ class WC_Gateway_BACS extends WC_Payment_Gateway {
'desc_tip' => true,
),
'account_details' => array(
- 'type' => 'account_details'
+ 'type' => 'account_details',
),
);
@@ -214,7 +214,7 @@ class WC_Gateway_BACS extends WC_Payment_Gateway {
'bank_name' => $bank_names[ $i ],
'sort_code' => $sort_codes[ $i ],
'iban' => $ibans[ $i ],
- 'bic' => $bics[ $i ]
+ 'bic' => $bics[ $i ],
);
}
}
@@ -295,20 +295,20 @@ class WC_Gateway_BACS extends WC_Payment_Gateway {
$account_fields = apply_filters( 'woocommerce_bacs_account_fields', array(
'account_number'=> array(
'label' => __( 'Account Number', 'woocommerce' ),
- 'value' => $bacs_account->account_number
+ 'value' => $bacs_account->account_number,
),
'sort_code' => array(
'label' => $sortcode,
- 'value' => $bacs_account->sort_code
+ 'value' => $bacs_account->sort_code,
),
'iban' => array(
'label' => __( 'IBAN', 'woocommerce' ),
- 'value' => $bacs_account->iban
+ 'value' => $bacs_account->iban,
),
'bic' => array(
'label' => __( 'BIC', 'woocommerce' ),
- 'value' => $bacs_account->bic
- )
+ 'value' => $bacs_account->bic,
+ ),
), $order_id );
foreach ( $account_fields as $field_key => $field ) {
@@ -345,7 +345,7 @@ class WC_Gateway_BACS extends WC_Payment_Gateway {
// Return thankyou redirect
return array(
'result' => 'success',
- 'redirect' => $this->get_return_url( $order )
+ 'redirect' => $this->get_return_url( $order ),
);
}
diff --git a/includes/gateways/cheque/class-wc-gateway-cheque.php b/includes/gateways/cheque/class-wc-gateway-cheque.php
index b57fc8c9f5b..1e6be3f3cd2 100644
--- a/includes/gateways/cheque/class-wc-gateway-cheque.php
+++ b/includes/gateways/cheque/class-wc-gateway-cheque.php
@@ -54,7 +54,7 @@ class WC_Gateway_Cheque extends WC_Payment_Gateway {
'title' => __( 'Enable/Disable', 'woocommerce' ),
'type' => 'checkbox',
'label' => __( 'Enable Check Payments', 'woocommerce' ),
- 'default' => 'yes'
+ 'default' => 'yes',
),
'title' => array(
'title' => __( 'Title', 'woocommerce' ),
@@ -124,7 +124,7 @@ class WC_Gateway_Cheque extends WC_Payment_Gateway {
// Return thankyou redirect
return array(
'result' => 'success',
- 'redirect' => $this->get_return_url( $order )
+ 'redirect' => $this->get_return_url( $order ),
);
}
}
diff --git a/includes/gateways/class-wc-payment-gateway-cc.php b/includes/gateways/class-wc-payment-gateway-cc.php
index 8a01e23b73a..a1467478418 100644
--- a/includes/gateways/class-wc-payment-gateway-cc.php
+++ b/includes/gateways/class-wc-payment-gateway-cc.php
@@ -62,7 +62,7 @@ class WC_Payment_Gateway_CC extends WC_Payment_Gateway {
',
'card-expiry-field' => '
' . __( 'Expiry (MM/YY)', 'woocommerce' ) . ' *
- field_name( 'card-expiry' ) . ' />
+ field_name( 'card-expiry' ) . ,' />
'
);
@@ -77,7 +77,7 @@ class WC_Payment_Gateway_CC extends WC_Payment_Gateway {
id ); ?>
id ); ?>
diff --git a/includes/gateways/cod/class-wc-gateway-cod.php b/includes/gateways/cod/class-wc-gateway-cod.php
index 83aef36b8c9..4bf0e0d1f06 100644
--- a/includes/gateways/cod/class-wc-gateway-cod.php
+++ b/includes/gateways/cod/class-wc-gateway-cod.php
@@ -63,7 +63,7 @@ class WC_Gateway_COD extends WC_Payment_Gateway {
'label' => __( 'Enable Cash on Delivery', 'woocommerce' ),
'type' => 'checkbox',
'description' => '',
- 'default' => 'no'
+ 'default' => 'no',
),
'title' => array(
'title' => __( 'Title', 'woocommerce' ),
@@ -96,15 +96,15 @@ class WC_Gateway_COD extends WC_Payment_Gateway {
'options' => $shipping_methods,
'desc_tip' => true,
'custom_attributes' => array(
- 'data-placeholder' => __( 'Select shipping methods', 'woocommerce' )
- )
+ 'data-placeholder' => __( 'Select shipping methods', 'woocommerce' ),
+ ),
),
'enable_for_virtual' => array(
'title' => __( 'Accept for virtual orders', 'woocommerce' ),
'label' => __( 'Accept COD if the order is virtual', 'woocommerce' ),
'type' => 'checkbox',
- 'default' => 'yes'
- )
+ 'default' => 'yes',
+ ),
);
}
@@ -211,7 +211,7 @@ class WC_Gateway_COD extends WC_Payment_Gateway {
// Return thankyou redirect
return array(
'result' => 'success',
- 'redirect' => $this->get_return_url( $order )
+ 'redirect' => $this->get_return_url( $order ),
);
}
diff --git a/includes/gateways/paypal/class-wc-gateway-paypal.php b/includes/gateways/paypal/class-wc-gateway-paypal.php
index 4b4a9831662..52eae3c2729 100644
--- a/includes/gateways/paypal/class-wc-gateway-paypal.php
+++ b/includes/gateways/paypal/class-wc-gateway-paypal.php
@@ -245,7 +245,7 @@ class WC_Gateway_Paypal extends WC_Payment_Gateway {
return array(
'result' => 'success',
- 'redirect' => $paypal_request->get_request_url( $order, $this->testmode )
+ 'redirect' => $paypal_request->get_request_url( $order, $this->testmode ),
);
}
diff --git a/includes/gateways/paypal/includes/class-wc-gateway-paypal-ipn-handler.php b/includes/gateways/paypal/includes/class-wc-gateway-paypal-ipn-handler.php
index a6e0f610d2e..1b357f81fcd 100644
--- a/includes/gateways/paypal/includes/class-wc-gateway-paypal-ipn-handler.php
+++ b/includes/gateways/paypal/includes/class-wc-gateway-paypal-ipn-handler.php
@@ -83,7 +83,7 @@ class WC_Gateway_Paypal_IPN_Handler extends WC_Gateway_Paypal_Response {
'httpversion' => '1.1',
'compress' => false,
'decompress' => false,
- 'user-agent' => 'WooCommerce/' . WC()->version
+ 'user-agent' => 'WooCommerce/' . WC()->version,
);
// Post back to get a response.
diff --git a/includes/gateways/paypal/includes/class-wc-gateway-paypal-pdt-handler.php b/includes/gateways/paypal/includes/class-wc-gateway-paypal-pdt-handler.php
index af8689af9b1..8b64055e9a4 100644
--- a/includes/gateways/paypal/includes/class-wc-gateway-paypal-pdt-handler.php
+++ b/includes/gateways/paypal/includes/class-wc-gateway-paypal-pdt-handler.php
@@ -41,7 +41,7 @@ class WC_Gateway_Paypal_PDT_Handler extends WC_Gateway_Paypal_Response {
),
'timeout' => 60,
'httpversion' => '1.1',
- 'user-agent' => 'WooCommerce/' . WC_VERSION
+ 'user-agent' => 'WooCommerce/' . WC_VERSION,
);
// Post back to get a response.
diff --git a/includes/gateways/paypal/includes/class-wc-gateway-paypal-request.php b/includes/gateways/paypal/includes/class-wc-gateway-paypal-request.php
index 84c88fd7002..f0c2bca3e3c 100644
--- a/includes/gateways/paypal/includes/class-wc-gateway-paypal-request.php
+++ b/includes/gateways/paypal/includes/class-wc-gateway-paypal-request.php
@@ -88,7 +88,7 @@ class WC_Gateway_Paypal_Request {
'state' => $this->get_paypal_state( $order->get_billing_country(), $order->get_billing_state() ),
'zip' => $order->get_billing_postcode(),
'country' => $order->get_billing_country(),
- 'email' => $order->get_billing_email()
+ 'email' => $order->get_billing_email(),
),
$this->get_phone_number_args( $order ),
$this->get_shipping_args( $order ),
@@ -111,12 +111,12 @@ class WC_Gateway_Paypal_Request {
'night_phone_c' => substr( $phone_number, 6, 4 ),
'day_phone_a' => substr( $phone_number, 0, 3 ),
'day_phone_b' => substr( $phone_number, 3, 3 ),
- 'day_phone_c' => substr( $phone_number, 6, 4 )
+ 'day_phone_c' => substr( $phone_number, 6, 4 ),
);
} else {
$phone_args = array(
'night_phone_b' => $order->get_billing_phone(),
- 'day_phone_b' => $order->get_billing_phone()
+ 'day_phone_b' => $order->get_billing_phone(),
);
}
return $phone_args;
diff --git a/includes/gateways/paypal/includes/settings-paypal.php b/includes/gateways/paypal/includes/settings-paypal.php
index 8c343690f59..259da7ce8eb 100644
--- a/includes/gateways/paypal/includes/settings-paypal.php
+++ b/includes/gateways/paypal/includes/settings-paypal.php
@@ -12,7 +12,7 @@ return array(
'title' => __( 'Enable/Disable', 'woocommerce' ),
'type' => 'checkbox',
'label' => __( 'Enable PayPal standard', 'woocommerce' ),
- 'default' => 'yes'
+ 'default' => 'yes',
),
'title' => array(
'title' => __( 'Title', 'woocommerce' ),
@@ -26,7 +26,7 @@ return array(
'type' => 'text',
'desc_tip' => true,
'description' => __( 'This controls the description which the user sees during checkout.', 'woocommerce' ),
- 'default' => __( 'Pay via PayPal; you can pay with your credit card if you don\'t have a PayPal account.', 'woocommerce' )
+ 'default' => __( 'Pay via PayPal; you can pay with your credit card if you don\'t have a PayPal account.', 'woocommerce' ),
),
'email' => array(
'title' => __( 'PayPal Email', 'woocommerce' ),
@@ -34,7 +34,7 @@ return array(
'description' => __( 'Please enter your PayPal email address; this is needed in order to take payment.', 'woocommerce' ),
'default' => get_option( 'admin_email' ),
'desc_tip' => true,
- 'placeholder' => 'you@youremail.com'
+ 'placeholder' => 'you@youremail.com',
),
'testmode' => array(
'title' => __( 'PayPal Sandbox', 'woocommerce' ),
@@ -48,7 +48,7 @@ return array(
'type' => 'checkbox',
'label' => __( 'Enable logging', 'woocommerce' ),
'default' => 'no',
- 'description' => sprintf( __( 'Log PayPal events, such as IPN requests, inside %s
', 'woocommerce' ), wc_get_log_file_path( 'paypal' ) )
+ 'description' => sprintf( __( 'Log PayPal events, such as IPN requests, inside %s
', 'woocommerce' ), wc_get_log_file_path( 'paypal' ) ),
),
'advanced' => array(
'title' => __( 'Advanced options', 'woocommerce' ),
@@ -61,7 +61,7 @@ return array(
'description' => __( 'If your main PayPal email differs from the PayPal email entered above, input your main receiver email for your PayPal account here. This is used to validate IPN requests.', 'woocommerce' ),
'default' => '',
'desc_tip' => true,
- 'placeholder' => 'you@youremail.com'
+ 'placeholder' => 'you@youremail.com',
),
'identity_token' => array(
'title' => __( 'PayPal Identity Token', 'woocommerce' ),
@@ -69,7 +69,7 @@ return array(
'description' => __( 'Optionally enable "Payment Data Transfer" (Profile > Profile and Settings > My Selling Tools > Website Preferences) and then copy your identity token here. This will allow payments to be verified without the need for PayPal IPN.', 'woocommerce' ),
'default' => '',
'desc_tip' => true,
- 'placeholder' => ''
+ 'placeholder' => '',
),
'invoice_prefix' => array(
'title' => __( 'Invoice Prefix', 'woocommerce' ),
@@ -83,14 +83,14 @@ return array(
'type' => 'checkbox',
'label' => __( 'Send shipping details to PayPal instead of billing.', 'woocommerce' ),
'description' => __( 'PayPal allows us to send one address. If you are using PayPal for shipping labels you may prefer to send the shipping address rather than billing.', 'woocommerce' ),
- 'default' => 'no'
+ 'default' => 'no',
),
'address_override' => array(
'title' => __( 'Address Override', 'woocommerce' ),
'type' => 'checkbox',
'label' => __( 'Enable "address_override" to prevent address information from being changed.', 'woocommerce' ),
'description' => __( 'PayPal verifies addresses therefore this setting can cause errors (we recommend keeping it disabled).', 'woocommerce' ),
- 'default' => 'no'
+ 'default' => 'no',
),
'paymentaction' => array(
'title' => __( 'Payment Action', 'woocommerce' ),
@@ -101,8 +101,8 @@ return array(
'desc_tip' => true,
'options' => array(
'sale' => __( 'Capture', 'woocommerce' ),
- 'authorization' => __( 'Authorize', 'woocommerce' )
- )
+ 'authorization' => __( 'Authorize', 'woocommerce' ),
+ ),
),
'page_style' => array(
'title' => __( 'Page Style', 'woocommerce' ),
@@ -110,7 +110,7 @@ return array(
'description' => __( 'Optionally enter the name of the page style you wish to use. These are defined within your PayPal account.', 'woocommerce' ),
'default' => '',
'desc_tip' => true,
- 'placeholder' => __( 'Optional', 'woocommerce' )
+ 'placeholder' => __( 'Optional', 'woocommerce' ),
),
'api_details' => array(
'title' => __( 'API Credentials', 'woocommerce' ),
@@ -123,7 +123,7 @@ return array(
'description' => __( 'Get your API credentials from PayPal.', 'woocommerce' ),
'default' => '',
'desc_tip' => true,
- 'placeholder' => __( 'Optional', 'woocommerce' )
+ 'placeholder' => __( 'Optional', 'woocommerce' ),
),
'api_password' => array(
'title' => __( 'API Password', 'woocommerce' ),
@@ -131,7 +131,7 @@ return array(
'description' => __( 'Get your API credentials from PayPal.', 'woocommerce' ),
'default' => '',
'desc_tip' => true,
- 'placeholder' => __( 'Optional', 'woocommerce' )
+ 'placeholder' => __( 'Optional', 'woocommerce' ),
),
'api_signature' => array(
'title' => __( 'API Signature', 'woocommerce' ),
@@ -139,6 +139,6 @@ return array(
'description' => __( 'Get your API credentials from PayPal.', 'woocommerce' ),
'default' => '',
'desc_tip' => true,
- 'placeholder' => __( 'Optional', 'woocommerce' )
+ 'placeholder' => __( 'Optional', 'woocommerce' ),
),
);
diff --git a/includes/gateways/simplify-commerce/class-wc-addons-gateway-simplify-commerce.php b/includes/gateways/simplify-commerce/class-wc-addons-gateway-simplify-commerce.php
index 6e2494b32de..cd737b51a1a 100644
--- a/includes/gateways/simplify-commerce/class-wc-addons-gateway-simplify-commerce.php
+++ b/includes/gateways/simplify-commerce/class-wc-addons-gateway-simplify-commerce.php
@@ -105,7 +105,7 @@ class WC_Addons_Gateway_Simplify_Commerce extends WC_Gateway_Simplify_Commerce {
'token' => $cart_token,
'email' => $order->get_billing_email(),
'name' => trim( $order->get_formatted_billing_full_name() ),
- 'reference' => $order->get_id()
+ 'reference' => $order->get_id(),
) );
if ( is_object( $customer ) && '' != $customer->id ) {
@@ -127,7 +127,7 @@ class WC_Addons_Gateway_Simplify_Commerce extends WC_Gateway_Simplify_Commerce {
// Return thank you page redirect
return array(
'result' => 'success',
- 'redirect' => $this->get_return_url( $order )
+ 'redirect' => $this->get_return_url( $order ),
);
}
@@ -142,7 +142,7 @@ class WC_Addons_Gateway_Simplify_Commerce extends WC_Gateway_Simplify_Commerce {
return array(
'result' => 'fail',
- 'redirect' => ''
+ 'redirect' => '',
);
}
}
@@ -199,7 +199,7 @@ class WC_Addons_Gateway_Simplify_Commerce extends WC_Gateway_Simplify_Commerce {
'token' => $cart_token,
'email' => $order->get_billing_email(),
'name' => trim( $order->get_formatted_billing_full_name() ),
- 'reference' => $order->get_id()
+ 'reference' => $order->get_id(),
) );
if ( is_object( $customer ) && '' != $customer->id ) {
@@ -225,7 +225,7 @@ class WC_Addons_Gateway_Simplify_Commerce extends WC_Gateway_Simplify_Commerce {
// Return thank you page redirect
return array(
'result' => 'success',
- 'redirect' => $this->get_return_url( $order )
+ 'redirect' => $this->get_return_url( $order ),
);
} catch ( Simplify_ApiException $e ) {
@@ -239,7 +239,7 @@ class WC_Addons_Gateway_Simplify_Commerce extends WC_Gateway_Simplify_Commerce {
return array(
'result' => 'fail',
- 'redirect' => ''
+ 'redirect' => '',
);
}
@@ -305,7 +305,7 @@ class WC_Addons_Gateway_Simplify_Commerce extends WC_Gateway_Simplify_Commerce {
'customer' => $customer_id,
'description' => sprintf( __( '%s - Order #%s', 'woocommerce' ), esc_html( get_bloginfo( 'name', 'display' ) ), $order->get_order_number() ),
'currency' => strtoupper( get_woocommerce_currency() ),
- 'reference' => $order->get_id()
+ 'reference' => $order->get_id(),
) );
} catch ( Exception $e ) {
@@ -441,7 +441,7 @@ class WC_Addons_Gateway_Simplify_Commerce extends WC_Gateway_Simplify_Commerce {
'customer' => $customer_id,
'description' => trim( substr( $pre_order_name, 0, 1024 ) ),
'currency' => strtoupper( get_woocommerce_currency() ),
- 'reference' => $order->get_id()
+ 'reference' => $order->get_id(),
) );
if ( 'APPROVED' == $payment->paymentStatus ) {
diff --git a/includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php b/includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php
index 57dda689bc6..1bba70feca4 100644
--- a/includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php
+++ b/includes/gateways/simplify-commerce/class-wc-gateway-simplify-commerce.php
@@ -189,21 +189,21 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway_CC {
'label' => __( 'Enable Simplify Commerce', 'woocommerce' ),
'type' => 'checkbox',
'description' => '',
- 'default' => 'no'
+ 'default' => 'no',
),
'title' => array(
'title' => __( 'Title', 'woocommerce' ),
'type' => 'text',
'description' => __( 'This controls the title which the user sees during checkout.', 'woocommerce' ),
'default' => __( 'Credit card', 'woocommerce' ),
- 'desc_tip' => true
+ 'desc_tip' => true,
),
'description' => array(
'title' => __( 'Description', 'woocommerce' ),
'type' => 'text',
'description' => __( 'This controls the description which the user sees during checkout.', 'woocommerce' ),
'default' => 'Pay with your credit card via Simplify Commerce by MasterCard.',
- 'desc_tip' => true
+ 'desc_tip' => true,
),
'mode' => array(
'title' => __( 'Payment Mode', 'woocommerce' ),
@@ -213,50 +213,50 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway_CC {
'default' => 'standard',
'options' => array(
'standard' => __( 'Standard', 'woocommerce' ),
- 'hosted' => __( 'Hosted Payments', 'woocommerce' )
- )
+ 'hosted' => __( 'Hosted Payments', 'woocommerce' ),
+ ),
),
'modal_color' => array(
'title' => __( 'Modal Color', 'woocommerce' ),
'type' => 'color',
'description' => __( 'Set the color of the buttons and titles on the modal dialog.', 'woocommerce' ),
'default' => '#a46497',
- 'desc_tip' => true
+ 'desc_tip' => true,
),
'sandbox' => array(
'title' => __( 'Sandbox', 'woocommerce' ),
'label' => __( 'Enable Sandbox Mode', 'woocommerce' ),
'type' => 'checkbox',
'description' => __( 'Place the payment gateway in sandbox mode using sandbox API keys (real payments will not be taken).', 'woocommerce' ),
- 'default' => 'yes'
+ 'default' => 'yes',
),
'sandbox_public_key' => array(
'title' => __( 'Sandbox Public Key', 'woocommerce' ),
'type' => 'text',
'description' => __( 'Get your API keys from your Simplify account: Settings > API Keys.', 'woocommerce' ),
'default' => '',
- 'desc_tip' => true
+ 'desc_tip' => true,
),
'sandbox_private_key' => array(
'title' => __( 'Sandbox Private Key', 'woocommerce' ),
'type' => 'text',
'description' => __( 'Get your API keys from your Simplify account: Settings > API Keys.', 'woocommerce' ),
'default' => '',
- 'desc_tip' => true
+ 'desc_tip' => true,
),
'public_key' => array(
'title' => __( 'Public Key', 'woocommerce' ),
'type' => 'text',
'description' => __( 'Get your API keys from your Simplify account: Settings > API Keys.', 'woocommerce' ),
'default' => '',
- 'desc_tip' => true
+ 'desc_tip' => true,
),
'private_key' => array(
'title' => __( 'Private Key', 'woocommerce' ),
'type' => 'text',
'description' => __( 'Get your API keys from your Simplify account: Settings > API Keys.', 'woocommerce' ),
'default' => '',
- 'desc_tip' => true
+ 'desc_tip' => true,
),
);
}
@@ -306,7 +306,7 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway_CC {
'card.expYear' => __( 'Expiry Year', 'woocommerce' ),
'is_invalid' => __( 'is invalid', 'woocommerce' ),
'mode' => $this->mode,
- 'is_ssl' => is_ssl()
+ 'is_ssl' => is_ssl(),
) );
}
@@ -460,7 +460,7 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway_CC {
// Return thank you page redirect
return array(
'result' => 'success',
- 'redirect' => $this->get_return_url( $order )
+ 'redirect' => $this->get_return_url( $order ),
);
}
@@ -475,7 +475,7 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway_CC {
return array(
'result' => 'fail',
- 'redirect' => ''
+ 'redirect' => '',
);
}
}
@@ -499,7 +499,7 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway_CC {
'amount' => $amount * 100, // In cents.
'description' => sprintf( __( '%s - Order #%s', 'woocommerce' ), esc_html( get_bloginfo( 'name', 'display' ) ), $order->get_order_number() ),
'currency' => strtoupper( get_woocommerce_currency() ),
- 'reference' => $order->get_id()
+ 'reference' => $order->get_id(),
);
$data = array_merge( $data, $token );
@@ -545,7 +545,7 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway_CC {
protected function process_hosted_payments( $order ) {
return array(
'result' => 'success',
- 'redirect' => $order->get_checkout_payment_url( true )
+ 'redirect' => $order->get_checkout_payment_url( true ),
);
}
@@ -721,7 +721,7 @@ class WC_Gateway_Simplify_Commerce extends WC_Payment_Gateway_CC {
'amount' => $amount * 100, // In cents.
'payment' => $payment_id,
'reason' => $reason,
- 'reference' => $order_id
+ 'reference' => $order_id,
) );
if ( 'APPROVED' == $refund->paymentStatus ) {
diff --git a/includes/shipping/flat-rate/class-wc-shipping-flat-rate.php b/includes/shipping/flat-rate/class-wc-shipping-flat-rate.php
index 3b42af1a100..3d4c31878f4 100644
--- a/includes/shipping/flat-rate/class-wc-shipping-flat-rate.php
+++ b/includes/shipping/flat-rate/class-wc-shipping-flat-rate.php
@@ -160,7 +160,7 @@ class WC_Shipping_Flat_Rate extends WC_Shipping_Method {
$has_costs = true;
$class_cost = $this->evaluate_cost( $class_cost_string, array(
'qty' => array_sum( wp_list_pluck( $products, 'quantity' ) ),
- 'cost' => array_sum( wp_list_pluck( $products, 'line_total' ) )
+ 'cost' => array_sum( wp_list_pluck( $products, 'line_total' ) ),
) );
if ( $this->type === 'class' ) {
diff --git a/includes/shipping/flat-rate/includes/settings-flat-rate.php b/includes/shipping/flat-rate/includes/settings-flat-rate.php
index 7f0cd8a1831..2be85592dc3 100644
--- a/includes/shipping/flat-rate/includes/settings-flat-rate.php
+++ b/includes/shipping/flat-rate/includes/settings-flat-rate.php
@@ -15,7 +15,7 @@ $settings = array(
'type' => 'text',
'description' => __( 'This controls the title which the user sees during checkout.', 'woocommerce' ),
'default' => __( 'Flat Rate', 'woocommerce' ),
- 'desc_tip' => true
+ 'desc_tip' => true,
),
'tax_status' => array(
'title' => __( 'Tax Status', 'woocommerce' ),
@@ -24,8 +24,8 @@ $settings = array(
'default' => 'taxable',
'options' => array(
'taxable' => __( 'Taxable', 'woocommerce' ),
- 'none' => _x( 'None', 'Tax status', 'woocommerce' )
- )
+ 'none' => _x( 'None', 'Tax status', 'woocommerce' ),
+ ),
),
'cost' => array(
'title' => __( 'Cost', 'woocommerce' ),
@@ -33,8 +33,8 @@ $settings = array(
'placeholder' => '',
'description' => $cost_desc,
'default' => '0',
- 'desc_tip' => true
- )
+ 'desc_tip' => true,
+ ),
);
$shipping_classes = WC()->shipping->get_shipping_classes();
@@ -44,7 +44,7 @@ if ( ! empty( $shipping_classes ) ) {
'title' => __( 'Shipping Class Costs', 'woocommerce' ),
'type' => 'title',
'default' => '',
- 'description' => sprintf( __( 'These costs can optionally be added based on the %sproduct shipping class%s.', 'woocommerce' ), '', ' ' )
+ 'description' => sprintf( __( 'These costs can optionally be added based on the %sproduct shipping class%s.', 'woocommerce' ), '', ' ' ),
);
foreach ( $shipping_classes as $shipping_class ) {
if ( ! isset( $shipping_class->term_id ) ) {
@@ -56,7 +56,7 @@ if ( ! empty( $shipping_classes ) ) {
'placeholder' => __( 'N/A', 'woocommerce' ),
'description' => $cost_desc,
'default' => $this->get_option( 'class_cost_' . $shipping_class->slug ), // Before 2.5.0, we used slug here which caused issues with long setting names
- 'desc_tip' => true
+ 'desc_tip' => true,
);
}
$settings[ 'no_class_cost' ] = array(
@@ -65,7 +65,7 @@ if ( ! empty( $shipping_classes ) ) {
'placeholder' => __( 'N/A', 'woocommerce' ),
'description' => $cost_desc,
'default' => '',
- 'desc_tip' => true
+ 'desc_tip' => true,
);
$settings[ 'type' ] = array(
'title' => __( 'Calculation Type', 'woocommerce' ),
diff --git a/includes/shipping/legacy-flat-rate/class-wc-shipping-legacy-flat-rate.php b/includes/shipping/legacy-flat-rate/class-wc-shipping-legacy-flat-rate.php
index 28af11d1225..52d47ee76c5 100644
--- a/includes/shipping/legacy-flat-rate/class-wc-shipping-legacy-flat-rate.php
+++ b/includes/shipping/legacy-flat-rate/class-wc-shipping-legacy-flat-rate.php
@@ -129,7 +129,7 @@ class WC_Shipping_Legacy_Flat_Rate extends WC_Shipping_Method {
public function fee( $atts ) {
$atts = shortcode_atts( array(
'percent' => '',
- 'min_fee' => ''
+ 'min_fee' => '',
), $atts );
$calculated_fee = 0;
@@ -166,7 +166,7 @@ class WC_Shipping_Legacy_Flat_Rate extends WC_Shipping_Method {
$has_costs = true;
$rate['cost'] = $this->evaluate_cost( $cost, array(
'qty' => $this->get_package_item_qty( $package ),
- 'cost' => $package['contents_cost']
+ 'cost' => $package['contents_cost'],
) );
}
@@ -186,7 +186,7 @@ class WC_Shipping_Legacy_Flat_Rate extends WC_Shipping_Method {
$has_costs = true;
$class_cost = $this->evaluate_cost( $class_cost_string, array(
'qty' => array_sum( wp_list_pluck( $products, 'quantity' ) ),
- 'cost' => array_sum( wp_list_pluck( $products, 'line_total' ) )
+ 'cost' => array_sum( wp_list_pluck( $products, 'line_total' ) ),
) );
if ( $this->type === 'class' ) {
diff --git a/includes/shipping/legacy-flat-rate/includes/settings-flat-rate.php b/includes/shipping/legacy-flat-rate/includes/settings-flat-rate.php
index 9e3f2a307d8..3746053e2a0 100644
--- a/includes/shipping/legacy-flat-rate/includes/settings-flat-rate.php
+++ b/includes/shipping/legacy-flat-rate/includes/settings-flat-rate.php
@@ -21,7 +21,7 @@ $settings = array(
'type' => 'text',
'description' => __( 'This controls the title which the user sees during checkout.', 'woocommerce' ),
'default' => __( 'Flat Rate', 'woocommerce' ),
- 'desc_tip' => true
+ 'desc_tip' => true,
),
'availability' => array(
'title' => __( 'Availability', 'woocommerce' ),
@@ -41,8 +41,8 @@ $settings = array(
'default' => '',
'options' => WC()->countries->get_shipping_countries(),
'custom_attributes' => array(
- 'data-placeholder' => __( 'Select some countries', 'woocommerce' )
- )
+ 'data-placeholder' => __( 'Select some countries', 'woocommerce' ),
+ ),
),
'tax_status' => array(
'title' => __( 'Tax Status', 'woocommerce' ),
@@ -51,8 +51,8 @@ $settings = array(
'default' => 'taxable',
'options' => array(
'taxable' => __( 'Taxable', 'woocommerce' ),
- 'none' => _x( 'None', 'Tax status', 'woocommerce' )
- )
+ 'none' => _x( 'None', 'Tax status', 'woocommerce' ),
+ ),
),
'cost' => array(
'title' => __( 'Cost', 'woocommerce' ),
@@ -60,8 +60,8 @@ $settings = array(
'placeholder' => '',
'description' => $cost_desc,
'default' => '',
- 'desc_tip' => true
- )
+ 'desc_tip' => true,
+ ),
);
$shipping_classes = WC()->shipping->get_shipping_classes();
@@ -71,7 +71,7 @@ if ( ! empty( $shipping_classes ) ) {
'title' => __( 'Shipping Class Costs', 'woocommerce' ),
'type' => 'title',
'default' => '',
- 'description' => sprintf( __( 'These costs can optionally be added based on the %sproduct shipping class%s.', 'woocommerce' ), '', ' ' )
+ 'description' => sprintf( __( 'These costs can optionally be added based on the %sproduct shipping class%s.', 'woocommerce' ), '', ' ' ),
);
foreach ( $shipping_classes as $shipping_class ) {
if ( ! isset( $shipping_class->term_id ) ) {
@@ -83,7 +83,7 @@ if ( ! empty( $shipping_classes ) ) {
'placeholder' => __( 'N/A', 'woocommerce' ),
'description' => $cost_desc,
'default' => $this->get_option( 'class_cost_' . $shipping_class->slug ), // Before 2.5.0, we used slug here which caused issues with long setting names
- 'desc_tip' => true
+ 'desc_tip' => true,
);
}
$settings[ 'no_class_cost' ] = array(
@@ -92,7 +92,7 @@ if ( ! empty( $shipping_classes ) ) {
'placeholder' => __( 'N/A', 'woocommerce' ),
'description' => $cost_desc,
'default' => '',
- 'desc_tip' => true
+ 'desc_tip' => true,
);
$settings[ 'type' ] = array(
'title' => __( 'Calculation Type', 'woocommerce' ),
@@ -119,7 +119,7 @@ if ( apply_filters( 'woocommerce_enable_deprecated_additional_flat_rates', $this
'description' => __( 'One per line: Option Name | Additional Cost [+- Percents] | Per Cost Type (order, class, or item) Example: Priority Mail | 6.95 [+ 0.2%] | order
.', 'woocommerce' ),
'default' => '',
'desc_tip' => true,
- 'placeholder' => __( 'Option Name | Additional Cost [+- Percents%] | Per Cost Type (order, class, or item)', 'woocommerce' )
+ 'placeholder' => __( 'Option Name | Additional Cost [+- Percents%] | Per Cost Type (order, class, or item)', 'woocommerce' ),
);
}
diff --git a/includes/shipping/legacy-free-shipping/class-wc-shipping-legacy-free-shipping.php b/includes/shipping/legacy-free-shipping/class-wc-shipping-legacy-free-shipping.php
index 5cac6eac5fd..33956b4a157 100644
--- a/includes/shipping/legacy-free-shipping/class-wc-shipping-legacy-free-shipping.php
+++ b/includes/shipping/legacy-free-shipping/class-wc-shipping-legacy-free-shipping.php
@@ -83,7 +83,7 @@ class WC_Shipping_Legacy_Free_Shipping extends WC_Shipping_Method {
'title' => __( 'Enable/Disable', 'woocommerce' ),
'type' => 'checkbox',
'label' => __( 'Once disabled, this legacy method will no longer be available.', 'woocommerce' ),
- 'default' => 'no'
+ 'default' => 'no',
),
'title' => array(
'title' => __( 'Method Title', 'woocommerce' ),
@@ -99,8 +99,8 @@ class WC_Shipping_Legacy_Free_Shipping extends WC_Shipping_Method {
'class' => 'availability wc-enhanced-select',
'options' => array(
'all' => __( 'All allowed countries', 'woocommerce' ),
- 'specific' => __( 'Specific Countries', 'woocommerce' )
- )
+ 'specific' => __( 'Specific Countries', 'woocommerce' ),
+ ),
),
'countries' => array(
'title' => __( 'Specific Countries', 'woocommerce' ),
@@ -110,8 +110,8 @@ class WC_Shipping_Legacy_Free_Shipping extends WC_Shipping_Method {
'default' => '',
'options' => WC()->countries->get_shipping_countries(),
'custom_attributes' => array(
- 'data-placeholder' => __( 'Select some countries', 'woocommerce' )
- )
+ 'data-placeholder' => __( 'Select some countries', 'woocommerce' ),
+ ),
),
'requires' => array(
'title' => __( 'Free Shipping Requires...', 'woocommerce' ),
@@ -124,7 +124,7 @@ class WC_Shipping_Legacy_Free_Shipping extends WC_Shipping_Method {
'min_amount' => __( 'A minimum order amount (defined below)', 'woocommerce' ),
'either' => __( 'A minimum order amount OR a coupon', 'woocommerce' ),
'both' => __( 'A minimum order amount AND a coupon', 'woocommerce' ),
- )
+ ),
),
'min_amount' => array(
'title' => __( 'Minimum Order Amount', 'woocommerce' ),
@@ -132,8 +132,8 @@ class WC_Shipping_Legacy_Free_Shipping extends WC_Shipping_Method {
'placeholder' => wc_format_localized_price( 0 ),
'description' => __( 'Users will need to spend this amount to get free shipping (if enabled above).', 'woocommerce' ),
'default' => '0',
- 'desc_tip' => true
- )
+ 'desc_tip' => true,
+ ),
);
}
diff --git a/includes/shipping/legacy-international-delivery/class-wc-shipping-legacy-international-delivery.php b/includes/shipping/legacy-international-delivery/class-wc-shipping-legacy-international-delivery.php
index 07daa2762b5..66400c0f174 100644
--- a/includes/shipping/legacy-international-delivery/class-wc-shipping-legacy-international-delivery.php
+++ b/includes/shipping/legacy-international-delivery/class-wc-shipping-legacy-international-delivery.php
@@ -50,7 +50,7 @@ class WC_Shipping_Legacy_International_Delivery extends WC_Shipping_Legacy_Flat_
'options' => array(
'including' => __( 'Selected countries', 'woocommerce' ),
'excluding' => __( 'Excluding selected countries', 'woocommerce' ),
- )
+ ),
);
}
diff --git a/includes/shipping/legacy-local-delivery/class-wc-shipping-legacy-local-delivery.php b/includes/shipping/legacy-local-delivery/class-wc-shipping-legacy-local-delivery.php
index d6ab06cafe7..eb95a89213b 100644
--- a/includes/shipping/legacy-local-delivery/class-wc-shipping-legacy-local-delivery.php
+++ b/includes/shipping/legacy-local-delivery/class-wc-shipping-legacy-local-delivery.php
@@ -111,7 +111,7 @@ class WC_Shipping_Legacy_Local_Delivery extends WC_Shipping_Local_Pickup {
'title' => __( 'Enable', 'woocommerce' ),
'type' => 'checkbox',
'label' => __( 'Once disabled, this legacy method will no longer be available.', 'woocommerce' ),
- 'default' => 'no'
+ 'default' => 'no',
),
'title' => array(
'title' => __( 'Title', 'woocommerce' ),
@@ -139,7 +139,7 @@ class WC_Shipping_Legacy_Local_Delivery extends WC_Shipping_Local_Pickup {
'description' => __( 'What fee do you want to charge for local delivery, disregarded if you choose free. Leave blank to disable.', 'woocommerce' ),
'default' => '',
'desc_tip' => true,
- 'placeholder' => wc_format_localized_price( 0 )
+ 'placeholder' => wc_format_localized_price( 0 ),
),
'codes' => array(
'title' => __( 'Allowed ZIP/Post Codes', 'woocommerce' ),
@@ -147,7 +147,7 @@ class WC_Shipping_Legacy_Local_Delivery extends WC_Shipping_Local_Pickup {
'desc_tip' => __( 'What ZIP/post codes are available for local delivery?', 'woocommerce' ),
'default' => '',
'description' => __( 'Separate codes with a comma. Accepts wildcards, e.g. P*
will match a postcode of PE30. Also accepts a pattern, e.g. NG1___
would match NG1 1AA but not NG10 1AA', 'woocommerce' ),
- 'placeholder' => 'e.g. 12345, 56789'
+ 'placeholder' => 'e.g. 12345, 56789',
),
'availability' => array(
'title' => __( 'Method availability', 'woocommerce' ),
@@ -156,8 +156,8 @@ class WC_Shipping_Legacy_Local_Delivery extends WC_Shipping_Local_Pickup {
'class' => 'availability wc-enhanced-select',
'options' => array(
'all' => __( 'All allowed countries', 'woocommerce' ),
- 'specific' => __( 'Specific Countries', 'woocommerce' )
- )
+ 'specific' => __( 'Specific Countries', 'woocommerce' ),
+ ),
),
'countries' => array(
'title' => __( 'Specific Countries', 'woocommerce' ),
@@ -167,9 +167,9 @@ class WC_Shipping_Legacy_Local_Delivery extends WC_Shipping_Local_Pickup {
'default' => '',
'options' => WC()->countries->get_shipping_countries(),
'custom_attributes' => array(
- 'data-placeholder' => __( 'Select some countries', 'woocommerce' )
- )
- )
+ 'data-placeholder' => __( 'Select some countries', 'woocommerce' ),
+ ),
+ ),
);
}
}
diff --git a/includes/shipping/legacy-local-pickup/class-wc-shipping-legacy-local-pickup.php b/includes/shipping/legacy-local-pickup/class-wc-shipping-legacy-local-pickup.php
index afe834aeb70..da0f3ec99b1 100644
--- a/includes/shipping/legacy-local-pickup/class-wc-shipping-legacy-local-pickup.php
+++ b/includes/shipping/legacy-local-pickup/class-wc-shipping-legacy-local-pickup.php
@@ -88,7 +88,7 @@ class WC_Shipping_Legacy_Local_Pickup extends WC_Shipping_Method {
'title' => __( 'Enable', 'woocommerce' ),
'type' => 'checkbox',
'label' => __( 'Once disabled, this legacy method will no longer be available.', 'woocommerce' ),
- 'default' => 'no'
+ 'default' => 'no',
),
'title' => array(
'title' => __( 'Title', 'woocommerce' ),
@@ -103,7 +103,7 @@ class WC_Shipping_Legacy_Local_Pickup extends WC_Shipping_Method {
'desc_tip' => __( 'What ZIP/post codes are available for local pickup?', 'woocommerce' ),
'default' => '',
'description' => __( 'Separate codes with a comma. Accepts wildcards, e.g. P*
will match a postcode of PE30. Also accepts a pattern, e.g. NG1___
would match NG1 1AA but not NG10 1AA', 'woocommerce' ),
- 'placeholder' => 'e.g. 12345, 56789'
+ 'placeholder' => 'e.g. 12345, 56789',
),
'availability' => array(
'title' => __( 'Method availability', 'woocommerce' ),
@@ -112,8 +112,8 @@ class WC_Shipping_Legacy_Local_Pickup extends WC_Shipping_Method {
'class' => 'availability wc-enhanced-select',
'options' => array(
'all' => __( 'All allowed countries', 'woocommerce' ),
- 'specific' => __( 'Specific Countries', 'woocommerce' )
- )
+ 'specific' => __( 'Specific Countries', 'woocommerce' ),
+ ),
),
'countries' => array(
'title' => __( 'Specific Countries', 'woocommerce' ),
@@ -123,9 +123,9 @@ class WC_Shipping_Legacy_Local_Pickup extends WC_Shipping_Method {
'default' => '',
'options' => WC()->countries->get_shipping_countries(),
'custom_attributes' => array(
- 'data-placeholder' => __( 'Select some countries', 'woocommerce' )
- )
- )
+ 'data-placeholder' => __( 'Select some countries', 'woocommerce' ),
+ ),
+ ),
);
}
diff --git a/includes/shipping/local-pickup/class-wc-shipping-local-pickup.php b/includes/shipping/local-pickup/class-wc-shipping-local-pickup.php
index 3ea9ead4ffb..2bd0476b2f8 100644
--- a/includes/shipping/local-pickup/class-wc-shipping-local-pickup.php
+++ b/includes/shipping/local-pickup/class-wc-shipping-local-pickup.php
@@ -80,8 +80,8 @@ class WC_Shipping_Local_Pickup extends WC_Shipping_Method {
'default' => 'taxable',
'options' => array(
'taxable' => __( 'Taxable', 'woocommerce' ),
- 'none' => _x( 'None', 'Tax status', 'woocommerce' )
- )
+ 'none' => _x( 'None', 'Tax status', 'woocommerce' ),
+ ),
),
'cost' => array(
'title' => __( 'Cost', 'woocommerce' ),
@@ -89,8 +89,8 @@ class WC_Shipping_Local_Pickup extends WC_Shipping_Method {
'placeholder' => '0',
'description' => __( 'Optional cost for local pickup.', 'woocommerce' ),
'default' => '',
- 'desc_tip' => true
- )
+ 'desc_tip' => true,
+ ),
);
}
}
diff --git a/includes/shortcodes/class-wc-shortcode-checkout.php b/includes/shortcodes/class-wc-shortcode-checkout.php
index 1480f9683f5..ace6592e274 100644
--- a/includes/shortcodes/class-wc-shortcode-checkout.php
+++ b/includes/shortcodes/class-wc-shortcode-checkout.php
@@ -116,7 +116,7 @@ class WC_Shortcode_Checkout {
wc_get_template( 'checkout/form-pay.php', array(
'order' => $order,
'available_gateways' => $available_gateways,
- 'order_button_text' => apply_filters( 'woocommerce_pay_order_button_text', __( 'Pay for order', 'woocommerce' ) )
+ 'order_button_text' => apply_filters( 'woocommerce_pay_order_button_text', __( 'Pay for order', 'woocommerce' ) ),
) );
} else {
diff --git a/includes/shortcodes/class-wc-shortcode-my-account.php b/includes/shortcodes/class-wc-shortcode-my-account.php
index 39033c0c597..b33c764ec80 100644
--- a/includes/shortcodes/class-wc-shortcode-my-account.php
+++ b/includes/shortcodes/class-wc-shortcode-my-account.php
@@ -97,7 +97,7 @@ class WC_Shortcode_My_Account {
*/
private static function my_account( $atts ) {
extract( shortcode_atts( array(
- 'order_count' => 15 // @deprecated 2.6.0. Keep for backward compatibility.
+ 'order_count' => 15, // @deprecated 2.6.0. Keep for backward compatibility.
), $atts ) );
wc_get_template( 'myaccount/my-account.php', array(
@@ -126,7 +126,7 @@ class WC_Shortcode_My_Account {
wc_get_template( 'myaccount/view-order.php', array(
'status' => $status, // @deprecated 2.2
'order' => wc_get_order( $order_id ),
- 'order_id' => $order_id
+ 'order_id' => $order_id,
) );
}
@@ -179,7 +179,7 @@ class WC_Shortcode_My_Account {
wc_get_template( 'myaccount/form-edit-address.php', array(
'load_address' => $load_address,
- 'address' => apply_filters( 'woocommerce_address_to_edit', $address )
+ 'address' => apply_filters( 'woocommerce_address_to_edit', $address ),
) );
}
diff --git a/includes/shortcodes/class-wc-shortcode-order-tracking.php b/includes/shortcodes/class-wc-shortcode-order-tracking.php
index 293b6808265..fb0db0128db 100644
--- a/includes/shortcodes/class-wc-shortcode-order-tracking.php
+++ b/includes/shortcodes/class-wc-shortcode-order-tracking.php
@@ -60,7 +60,7 @@ class WC_Shortcode_Order_Tracking {
if ( strtolower( $order->get_billing_email() ) == strtolower( $order_email ) ) {
do_action( 'woocommerce_track_order', $order->get_id() );
wc_get_template( 'order/tracking.php', array(
- 'order' => $order
+ 'order' => $order,
) );
return;
diff --git a/includes/walkers/class-product-cat-dropdown-walker.php b/includes/walkers/class-product-cat-dropdown-walker.php
index 5ee5bd32450..91df94de4fd 100644
--- a/includes/walkers/class-product-cat-dropdown-walker.php
+++ b/includes/walkers/class-product-cat-dropdown-walker.php
@@ -32,7 +32,7 @@ class WC_Product_Cat_Dropdown_Walker extends Walker {
public $db_fields = array(
'parent' => 'parent',
'id' => 'term_id',
- 'slug' => 'slug'
+ 'slug' => 'slug',
);
/**
diff --git a/includes/walkers/class-product-cat-list-walker.php b/includes/walkers/class-product-cat-list-walker.php
index 55e28f927c2..044e09f35f1 100644
--- a/includes/walkers/class-product-cat-list-walker.php
+++ b/includes/walkers/class-product-cat-list-walker.php
@@ -32,7 +32,7 @@ class WC_Product_Cat_List_Walker extends Walker {
public $db_fields = array(
'parent' => 'parent',
'id' => 'term_id',
- 'slug' => 'slug'
+ 'slug' => 'slug',
);
/**
diff --git a/includes/wc-account-functions.php b/includes/wc-account-functions.php
index be9d9c8ef0b..c2beee88638 100644
--- a/includes/wc-account-functions.php
+++ b/includes/wc-account-functions.php
@@ -55,7 +55,7 @@ function wc_customer_edit_account_url() {
function wc_edit_address_i18n( $id, $flip = false ) {
$slugs = apply_filters( 'woocommerce_edit_address_slugs', array(
'billing' => sanitize_title( _x( 'billing', 'edit-address-slug', 'woocommerce' ) ),
- 'shipping' => sanitize_title( _x( 'shipping', 'edit-address-slug', 'woocommerce' ) )
+ 'shipping' => sanitize_title( _x( 'shipping', 'edit-address-slug', 'woocommerce' ) ),
) );
if ( $flip ) {
diff --git a/includes/wc-attribute-functions.php b/includes/wc-attribute-functions.php
index 472bc6593ef..050bd4dc59e 100644
--- a/includes/wc-attribute-functions.php
+++ b/includes/wc-attribute-functions.php
@@ -166,7 +166,7 @@ function wc_get_attribute_taxonomy_names() {
function wc_get_attribute_types() {
return (array) apply_filters( 'product_attributes_type_selector', array(
'select' => __( 'Select', 'woocommerce' ),
- 'text' => __( 'Text', 'woocommerce' )
+ 'text' => __( 'Text', 'woocommerce' ),
) );
}
diff --git a/includes/wc-cart-functions.php b/includes/wc-cart-functions.php
index 703667d7b58..1b13c0c97dd 100644
--- a/includes/wc-cart-functions.php
+++ b/includes/wc-cart-functions.php
@@ -216,7 +216,7 @@ function wc_cart_totals_shipping_html() {
'package_details' => implode( ', ', $product_names ),
'package_name' => apply_filters( 'woocommerce_shipping_package_name', sprintf( _n( 'Shipping', 'Shipping %d', ( $i + 1 ), 'woocommerce' ), ( $i + 1 ) ), $i, $package ),
'index' => $i,
- 'chosen_method' => $chosen_method
+ 'chosen_method' => $chosen_method,
) );
}
}
diff --git a/includes/wc-core-functions.php b/includes/wc-core-functions.php
index 5cce884ce36..1ec78dda31d 100644
--- a/includes/wc-core-functions.php
+++ b/includes/wc-core-functions.php
@@ -637,7 +637,7 @@ function wc_get_image_size( $image_size ) {
$size = array(
'width' => $width,
'height' => $height,
- 'crop' => $crop
+ 'crop' => $crop,
);
$image_size = $width . '_' . $height;
@@ -652,7 +652,7 @@ function wc_get_image_size( $image_size ) {
$size = array(
'width' => '300',
'height' => '300',
- 'crop' => 1
+ 'crop' => 1,
);
}
@@ -913,7 +913,7 @@ function wc_format_country_state_string( $country_string ) {
}
return array(
'country' => $country,
- 'state' => $state
+ 'state' => $state,
);
}
diff --git a/includes/wc-coupon-functions.php b/includes/wc-coupon-functions.php
index dd664849434..d80b5a6e5c5 100644
--- a/includes/wc-coupon-functions.php
+++ b/includes/wc-coupon-functions.php
@@ -24,7 +24,7 @@ function wc_get_coupon_types() {
'fixed_cart' => __( 'Cart Discount', 'woocommerce' ),
'percent' => __( 'Cart % Discount', 'woocommerce' ),
'fixed_product' => __( 'Product Discount', 'woocommerce' ),
- 'percent_product' => __( 'Product % Discount', 'woocommerce' )
+ 'percent_product' => __( 'Product % Discount', 'woocommerce' ),
) );
}
diff --git a/includes/wc-deprecated-functions.php b/includes/wc-deprecated-functions.php
index 39c9c10fbb8..ef118b1cc22 100644
--- a/includes/wc-deprecated-functions.php
+++ b/includes/wc-deprecated-functions.php
@@ -509,7 +509,7 @@ global $wc_map_deprecated_filters;
$wc_map_deprecated_filters = array(
'woocommerce_add_to_cart_fragments' => 'add_to_cart_fragments',
- 'woocommerce_add_to_cart_redirect' => 'add_to_cart_redirect'
+ 'woocommerce_add_to_cart_redirect' => 'add_to_cart_redirect',
);
foreach ( $wc_map_deprecated_filters as $new => $old ) {
diff --git a/includes/wc-formatting-functions.php b/includes/wc-formatting-functions.php
index 6ebcd912140..49cef9ebef8 100644
--- a/includes/wc-formatting-functions.php
+++ b/includes/wc-formatting-functions.php
@@ -411,7 +411,7 @@ function wc_price( $price, $args = array() ) {
'decimal_separator' => wc_get_price_decimal_separator(),
'thousand_separator' => wc_get_price_thousand_separator(),
'decimals' => wc_get_price_decimals(),
- 'price_format' => get_woocommerce_price_format()
+ 'price_format' => get_woocommerce_price_format(),
) ) ) );
$negative = $price < 0;
diff --git a/includes/wc-notice-functions.php b/includes/wc-notice-functions.php
index 7cb23eabd94..a8179d734dc 100644
--- a/includes/wc-notice-functions.php
+++ b/includes/wc-notice-functions.php
@@ -133,7 +133,7 @@ function wc_print_notices() {
foreach ( $notice_types as $notice_type ) {
if ( wc_notice_count( $notice_type ) > 0 ) {
wc_get_template( "notices/{$notice_type}.php", array(
- 'messages' => array_filter( $all_notices[ $notice_type ] )
+ 'messages' => array_filter( $all_notices[ $notice_type ] ),
) );
}
}
@@ -157,7 +157,7 @@ function wc_print_notice( $message, $notice_type = 'success' ) {
}
wc_get_template( "notices/{$notice_type}.php", array(
- 'messages' => array( apply_filters( 'woocommerce_add_' . $notice_type, $message ) )
+ 'messages' => array( apply_filters( 'woocommerce_add_' . $notice_type, $message ) ),
) );
}
diff --git a/includes/wc-order-functions.php b/includes/wc-order-functions.php
index 3a199c25656..47b01a27791 100644
--- a/includes/wc-order-functions.php
+++ b/includes/wc-order-functions.php
@@ -156,7 +156,7 @@ function _wc_get_orders_generate_customer_meta_query( $values, $relation = 'or'
'key' => '_customer_user',
'value' => array(),
'compare' => 'IN',
- )
+ ),
);
foreach ( $values as $value ) {
if ( is_array( $value ) ) {
@@ -389,7 +389,7 @@ function wc_register_order_type( $type, $args = array() ) {
'exclude_from_order_webhooks' => false,
'exclude_from_order_reports' => false,
'exclude_from_order_sales_reports' => false,
- 'class_name' => 'WC_Order'
+ 'class_name' => 'WC_Order',
);
$args = array_intersect_key( $args, $order_type_args );
@@ -435,7 +435,7 @@ function wc_downloadable_file_permission( $download_id, $product_id, $order, $qt
'order_key' => $order->get_order_key(),
'downloads_remaining' => $limit,
'access_granted' => current_time( 'mysql' ),
- 'download_count' => 0
+ 'download_count' => 0,
));
$format = apply_filters( 'woocommerce_downloadable_file_permission_format', array(
@@ -532,7 +532,7 @@ function wc_add_order_item( $order_id, $item ) {
array(
'order_item_name' => $item['order_item_name'],
'order_item_type' => $item['order_item_type'],
- 'order_id' => $order_id
+ 'order_id' => $order_id,
),
array(
'%s', '%s', '%d'
@@ -935,7 +935,7 @@ function wc_order_fully_refunded( $order_id ) {
'amount' => $max_refund,
'reason' => __( 'Order Fully Refunded', 'woocommerce' ),
'order_id' => $order_id,
- 'line_items' => array()
+ 'line_items' => array(),
) );
wc_delete_shop_order_transients( $order_id );
diff --git a/includes/wc-product-functions.php b/includes/wc-product-functions.php
index 15b198f16ce..8975bd3b906 100644
--- a/includes/wc-product-functions.php
+++ b/includes/wc-product-functions.php
@@ -187,14 +187,14 @@ function wc_get_featured_product_ids() {
array(
'key' => '_visibility',
'value' => array('catalog', 'visible'),
- 'compare' => 'IN'
+ 'compare' => 'IN',
),
array(
'key' => '_featured',
- 'value' => 'yes'
+ 'value' => 'yes',
)
),
- 'fields' => 'id=>parent'
+ 'fields' => 'id=>parent',
) );
$product_ids = array_keys( $featured );
@@ -525,7 +525,7 @@ function wc_get_product_types() {
'simple' => __( 'Simple product', 'woocommerce' ),
'grouped' => __( 'Grouped product', 'woocommerce' ),
'external' => __( 'External/Affiliate product', 'woocommerce' ),
- 'variable' => __( 'Variable product', 'woocommerce' )
+ 'variable' => __( 'Variable product', 'woocommerce' ),
) );
}
diff --git a/includes/wc-rest-functions.php b/includes/wc-rest-functions.php
index 48b3a725248..6acfc381e9a 100644
--- a/includes/wc-rest-functions.php
+++ b/includes/wc-rest-functions.php
@@ -76,7 +76,7 @@ function wc_rest_upload_image_from_url( $image_url ) {
// Get the file.
$response = wp_safe_remote_get( $image_url, array(
- 'timeout' => 10
+ 'timeout' => 10,
) );
if ( is_wp_error( $response ) ) {
diff --git a/includes/wc-template-functions.php b/includes/wc-template-functions.php
index 7c647bc6db4..c25501137a6 100644
--- a/includes/wc-template-functions.php
+++ b/includes/wc-template-functions.php
@@ -685,7 +685,7 @@ if ( ! function_exists( 'woocommerce_template_loop_add_to_cart' ) ) {
'product_type_' . $product->product_type,
$product->is_purchasable() && $product->is_in_stock() ? 'add_to_cart_button' : '',
$product->supports( 'ajax_add_to_cart' ) ? 'ajax_add_to_cart' : ''
- ) ) )
+ ) ) ),
);
$args = apply_filters( 'woocommerce_loop_add_to_cart_args', wp_parse_args( $args, $defaults ), $product );
@@ -830,7 +830,7 @@ if ( ! function_exists( 'woocommerce_catalog_ordering' ) ) {
'rating' => __( 'Sort by average rating', 'woocommerce' ),
'date' => __( 'Sort by newness', 'woocommerce' ),
'price' => __( 'Sort by price: low to high', 'woocommerce' ),
- 'price-desc' => __( 'Sort by price: high to low', 'woocommerce' )
+ 'price-desc' => __( 'Sort by price: high to low', 'woocommerce' ),
) );
if ( ! $show_default_orderby ) {
@@ -1006,7 +1006,7 @@ if ( ! function_exists( 'woocommerce_grouped_add_to_cart' ) ) {
wc_get_template( 'single-product/add-to-cart/grouped.php', array(
'grouped_product' => $product,
'grouped_products' => $product->get_children(),
- 'quantites_required' => false
+ 'quantites_required' => false,
) );
}
}
@@ -1030,7 +1030,7 @@ if ( ! function_exists( 'woocommerce_variable_add_to_cart' ) ) {
wc_get_template( 'single-product/add-to-cart/variable.php', array(
'available_variations' => $get_variations ? $product->get_available_variations() : false,
'attributes' => $product->get_variation_attributes(),
- 'selected_attributes' => $product->get_variation_default_attributes()
+ 'selected_attributes' => $product->get_variation_default_attributes(),
) );
}
}
@@ -1050,7 +1050,7 @@ if ( ! function_exists( 'woocommerce_external_add_to_cart' ) ) {
wc_get_template( 'single-product/add-to-cart/external.php', array(
'product_url' => $product->add_to_cart_url(),
- 'button_text' => $product->single_add_to_cart_text()
+ 'button_text' => $product->single_add_to_cart_text(),
) );
}
}
@@ -1158,7 +1158,7 @@ if ( ! function_exists( 'woocommerce_default_product_tabs' ) ) {
$tabs['description'] = array(
'title' => __( 'Description', 'woocommerce' ),
'priority' => 10,
- 'callback' => 'woocommerce_product_description_tab'
+ 'callback' => 'woocommerce_product_description_tab',
);
}
@@ -1167,7 +1167,7 @@ if ( ! function_exists( 'woocommerce_default_product_tabs' ) ) {
$tabs['additional_information'] = array(
'title' => __( 'Additional Information', 'woocommerce' ),
'priority' => 20,
- 'callback' => 'woocommerce_product_additional_information_tab'
+ 'callback' => 'woocommerce_product_additional_information_tab',
);
}
@@ -1176,7 +1176,7 @@ if ( ! function_exists( 'woocommerce_default_product_tabs' ) ) {
$tabs['reviews'] = array(
'title' => sprintf( __( 'Reviews (%d)', 'woocommerce' ), $product->get_review_count() ),
'priority' => 30,
- 'callback' => 'comments_template'
+ 'callback' => 'comments_template',
);
}
@@ -1289,7 +1289,7 @@ if ( ! function_exists( 'woocommerce_output_related_products' ) ) {
$args = array(
'posts_per_page' => 4,
'columns' => 4,
- 'orderby' => 'rand'
+ 'orderby' => 'rand',
);
woocommerce_related_products( apply_filters( 'woocommerce_output_related_products_args', $args ) );
@@ -1321,7 +1321,7 @@ if ( ! function_exists( 'woocommerce_related_products' ) ) {
$defaults = array(
'posts_per_page' => 2,
'columns' => 2,
- 'orderby' => 'rand'
+ 'orderby' => 'rand',
);
$args = wp_parse_args( $args, $defaults );
@@ -1343,7 +1343,7 @@ if ( ! function_exists( 'woocommerce_upsell_display' ) ) {
$args = apply_filters( 'woocommerce_upsell_display_args', array(
'posts_per_page' => $posts_per_page,
'orderby' => apply_filters( 'woocommerce_upsells_orderby', $orderby ),
- 'columns' => $columns
+ 'columns' => $columns,
) );
wc_get_template( 'single-product/up-sells.php', $args );
@@ -1395,7 +1395,7 @@ if ( ! function_exists( 'woocommerce_cross_sell_display' ) ) {
wc_get_template( 'cart/cross-sells.php', array(
'posts_per_page' => $posts_per_page,
'orderby' => $orderby,
- 'columns' => $columns
+ 'columns' => $columns,
) );
}
}
@@ -1448,7 +1448,7 @@ if ( ! function_exists( 'woocommerce_mini_cart' ) ) {
function woocommerce_mini_cart( $args = array() ) {
$defaults = array(
- 'list_class' => ''
+ 'list_class' => '',
);
$args = wp_parse_args( $args, $defaults );
@@ -1472,7 +1472,7 @@ if ( ! function_exists( 'woocommerce_login_form' ) ) {
$defaults = array(
'message' => '',
'redirect' => '',
- 'hidden' => false
+ 'hidden' => false,
);
$args = wp_parse_args( $args, $defaults );
@@ -1507,7 +1507,7 @@ if ( ! function_exists( 'woocommerce_breadcrumb' ) ) {
'wrap_after' => '',
'before' => '',
'after' => '',
- 'home' => _x( 'Home', 'breadcrumb', 'woocommerce' )
+ 'home' => _x( 'Home', 'breadcrumb', 'woocommerce' ),
) ) );
$breadcrumbs = new WC_Breadcrumb();
@@ -1552,7 +1552,7 @@ if ( ! function_exists( 'woocommerce_checkout_payment' ) ) {
wc_get_template( 'checkout/payment.php', array(
'checkout' => WC()->checkout(),
'available_gateways' => $available_gateways,
- 'order_button_text' => apply_filters( 'woocommerce_order_button_text', __( 'Place order', 'woocommerce' ) )
+ 'order_button_text' => apply_filters( 'woocommerce_order_button_text', __( 'Place order', 'woocommerce' ) ),
) );
}
}
@@ -1662,7 +1662,7 @@ if ( ! function_exists( 'woocommerce_product_subcategories' ) ) {
$defaults = array(
'before' => '',
'after' => '',
- 'force_display' => false
+ 'force_display' => false,
);
$args = wp_parse_args( $args, $defaults );
@@ -1710,7 +1710,7 @@ if ( ! function_exists( 'woocommerce_product_subcategories' ) ) {
'hide_empty' => 0,
'hierarchical' => 1,
'taxonomy' => 'product_cat',
- 'pad_counts' => 1
+ 'pad_counts' => 1,
) ) );
if ( ! apply_filters( 'woocommerce_product_subcategories_hide_empty', false ) ) {
@@ -1722,7 +1722,7 @@ if ( ! function_exists( 'woocommerce_product_subcategories' ) ) {
foreach ( $product_categories as $category ) {
wc_get_template( 'content-product_cat.php', array(
- 'category' => $category
+ 'category' => $category,
) );
}
@@ -1806,7 +1806,7 @@ if ( ! function_exists( 'woocommerce_order_details_table' ) ) {
if ( ! $order_id ) return;
wc_get_template( 'order/order-details.php', array(
- 'order_id' => $order_id
+ 'order_id' => $order_id,
) );
}
}
@@ -1826,7 +1826,7 @@ if ( ! function_exists( 'woocommerce_order_again_button' ) ) {
}
wc_get_template( 'order/order-again.php', array(
- 'order' => $order
+ 'order' => $order,
) );
}
}
@@ -2148,7 +2148,7 @@ if ( ! function_exists( 'wc_dropdown_variation_attribute_options' ) ) {
'name' => '',
'id' => '',
'class' => '',
- 'show_option_none' => __( 'Choose an option', 'woocommerce' )
+ 'show_option_none' => __( 'Choose an option', 'woocommerce' ),
) );
$options = $args['options'];
diff --git a/includes/wc-term-functions.php b/includes/wc-term-functions.php
index d9222d72f1d..95fb4211b24 100644
--- a/includes/wc-term-functions.php
+++ b/includes/wc-term-functions.php
@@ -147,7 +147,7 @@ function wc_product_dropdown_categories( $args = array(), $deprecated_hierarchic
'show_uncategorized' => 1,
'orderby' => 'name',
'selected' => $current_product_cat,
- 'menu_order' => false
+ 'menu_order' => false,
);
$args = wp_parse_args( $args, $defaults );
@@ -218,7 +218,7 @@ function wc_taxonomy_metadata_update_content_for_split_terms( $old_term_id, $new
array(
'woocommerce_term_id' => $new_term_id,
'meta_key' => $meta_data->meta_key,
- 'meta_value' => $meta_data->meta_value
+ 'meta_value' => $meta_data->meta_value,
)
);
}
diff --git a/includes/wc-update-functions.php b/includes/wc-update-functions.php
index 1fbd0290a76..38336181ea6 100644
--- a/includes/wc-update-functions.php
+++ b/includes/wc-update-functions.php
@@ -68,7 +68,7 @@ function wc_update_200_permalinks() {
'product_base' => untrailingslashit( $product_base ),
'category_base' => untrailingslashit( $category_base . $category_slug ),
'attribute_base' => untrailingslashit( $category_base ),
- 'tag_base' => untrailingslashit( $category_base . $tag_slug )
+ 'tag_base' => untrailingslashit( $category_base . $tag_slug ),
);
update_option( 'woocommerce_permalinks', $permalinks );
@@ -124,7 +124,7 @@ function wc_update_200_taxrates() {
'tax_rate_compound' => $tax_rate['compound'] == 'yes' ? 1 : 0,
'tax_rate_shipping' => $tax_rate['shipping'] == 'yes' ? 1 : 0,
'tax_rate_order' => $loop,
- 'tax_rate_class' => $tax_rate['class']
+ 'tax_rate_class' => $tax_rate['class'],
)
);
@@ -154,7 +154,7 @@ function wc_update_200_taxrates() {
'tax_rate_compound' => $tax_rate['compound'] == 'yes' ? 1 : 0,
'tax_rate_shipping' => $tax_rate['shipping'] == 'yes' ? 1 : 0,
'tax_rate_order' => $loop,
- 'tax_rate_class' => $tax_rate['class']
+ 'tax_rate_class' => $tax_rate['class'],
)
);
@@ -214,7 +214,7 @@ function wc_update_200_line_items() {
$item_id = wc_add_order_item( $order_item_row->post_id, array(
'order_item_name' => $order_item['name'],
- 'order_item_type' => 'line_item'
+ 'order_item_type' => 'line_item',
) );
// Add line item meta
@@ -282,7 +282,7 @@ function wc_update_200_line_items() {
$item_id = wc_add_order_item( $order_tax_row->post_id, array(
'order_item_name' => $order_tax['label'],
- 'order_item_type' => 'tax'
+ 'order_item_type' => 'tax',
) );
// Add line item meta
@@ -314,7 +314,7 @@ function wc_update_200_images() {
$old_settings = array_filter( array(
'width' => get_option( 'woocommerce_' . $value . '_image_width' ),
'height' => get_option( 'woocommerce_' . $value . '_image_height' ),
- 'crop' => get_option( 'woocommerce_' . $value . '_image_crop' )
+ 'crop' => get_option( 'woocommerce_' . $value . '_image_crop' ),
) );
if ( ! empty( $old_settings ) && update_option( 'shop_' . $value . '_image_size', $old_settings ) ){
@@ -338,41 +338,41 @@ function wc_update_209_brazillian_state() {
$wpdb->update(
$wpdb->postmeta,
array(
- 'meta_value' => 'BA'
+ 'meta_value' => 'BA',
),
array(
'meta_key' => '_billing_state',
- 'meta_value' => 'BH'
+ 'meta_value' => 'BH',
)
);
$wpdb->update(
$wpdb->postmeta,
array(
- 'meta_value' => 'BA'
+ 'meta_value' => 'BA',
),
array(
'meta_key' => '_shipping_state',
- 'meta_value' => 'BH'
+ 'meta_value' => 'BH',
)
);
$wpdb->update(
$wpdb->usermeta,
array(
- 'meta_value' => 'BA'
+ 'meta_value' => 'BA',
),
array(
'meta_key' => 'billing_state',
- 'meta_value' => 'BH'
+ 'meta_value' => 'BH',
)
);
$wpdb->update(
$wpdb->usermeta,
array(
- 'meta_value' => 'BA'
+ 'meta_value' => 'BA',
),
array(
'meta_key' => 'shipping_state',
- 'meta_value' => 'BH'
+ 'meta_value' => 'BH',
)
);
}
@@ -411,7 +411,7 @@ function wc_update_210_file_paths() {
$needs_update = true;
$new_value[ $key ] = array(
'file' => $file,
- 'name' => wc_get_filename_from_url( $file )
+ 'name' => wc_get_filename_from_url( $file ),
);
} else {
$new_value[ $key ] = $file;
@@ -564,10 +564,10 @@ function wc_update_220_attributes() {
$wpdb->update(
"{$wpdb->prefix}woocommerce_attribute_taxonomies",
array(
- 'attribute_name' => $sanitized_attribute_name
+ 'attribute_name' => $sanitized_attribute_name,
),
array(
- 'attribute_id' => $attribute_taxonomy->attribute_id
+ 'attribute_id' => $attribute_taxonomy->attribute_id,
)
);
@@ -617,7 +617,7 @@ function wc_update_240_shipping_methods() {
*/
$shipping_methods = array(
'woocommerce_flat_rates' => new WC_Shipping_Legacy_Flat_Rate(),
- 'woocommerce_international_delivery_flat_rates' => new WC_Shipping_Legacy_International_Delivery()
+ 'woocommerce_international_delivery_flat_rates' => new WC_Shipping_Legacy_International_Delivery(),
);
foreach ( $shipping_methods as $flat_rate_option_key => $shipping_method ) {
// Stop this running more than once if routine is repeated
@@ -689,7 +689,7 @@ function wc_update_240_api_keys() {
'permissions' => $user->woocommerce_api_key_permissions,
'consumer_key' => wc_api_hash( $user->woocommerce_api_consumer_key ),
'consumer_secret' => $user->woocommerce_api_consumer_secret,
- 'truncated_key' => substr( $user->woocommerce_api_consumer_secret, -7 )
+ 'truncated_key' => substr( $user->woocommerce_api_consumer_secret, -7 ),
);
}
@@ -729,7 +729,7 @@ function wc_update_240_webhooks() {
'posts_per_page' => -1,
'post_type' => 'shop_webhook',
'meta_key' => '_topic',
- 'meta_value' => 'order.updated'
+ 'meta_value' => 'order.updated',
) );
foreach ( $order_update_webhooks as $order_update_webhook ) {
$webhook = new WC_Webhook( $order_update_webhook->ID );
@@ -746,7 +746,7 @@ function wc_update_240_refunds() {
$refunded_orders = get_posts( array(
'posts_per_page' => -1,
'post_type' => 'shop_order',
- 'post_status' => array( 'wc-refunded' )
+ 'post_status' => array( 'wc-refunded' ),
) );
// Ensure emails are disabled during this update routine
@@ -771,7 +771,7 @@ function wc_update_240_refunds() {
'reason' => __( 'Order Fully Refunded', 'woocommerce' ),
'order_id' => $refunded_order->ID,
'line_items' => array(),
- 'date' => $refunded_order->post_modified
+ 'date' => $refunded_order->post_modified,
) );
}
}
@@ -827,11 +827,11 @@ function wc_update_250_currency() {
$wpdb->update(
$wpdb->postmeta,
array(
- 'meta_value' => 'LAK'
+ 'meta_value' => 'LAK',
),
array(
'meta_key' => '_order_currency',
- 'meta_value' => 'KIP'
+ 'meta_value' => 'KIP',
)
);
}
@@ -901,7 +901,7 @@ function wc_update_260_zone_methods() {
$wpdb->insert( $wpdb->prefix . 'woocommerce_shipping_zone_methods', array(
'zone_id' => $old_method->zone_id,
'method_id' => $old_method->shipping_method_type,
- 'method_order' => $old_method->shipping_method_order
+ 'method_order' => $old_method->shipping_method_order,
) );
$new_instance_id = $wpdb->insert_id;
@@ -921,20 +921,20 @@ function wc_update_260_zone_methods() {
$wpdb->update(
$wpdb->prefix . 'woocommerce_shipping_table_rates',
array(
- 'shipping_method_id' => $new_instance_id
+ 'shipping_method_id' => $new_instance_id,
),
array(
- 'shipping_method_id' => $old_method->shipping_method_id
+ 'shipping_method_id' => $old_method->shipping_method_id,
)
);
} elseif ( 'flat_rate_boxes' === $old_method->shipping_method_type ) {
$wpdb->update(
$wpdb->prefix . 'woocommerce_shipping_flat_rate_boxes',
array(
- 'shipping_method_id' => $new_instance_id
+ 'shipping_method_id' => $new_instance_id,
),
array(
- 'shipping_method_id' => $old_method->shipping_method_id
+ 'shipping_method_id' => $old_method->shipping_method_id,
)
);
}
@@ -980,7 +980,7 @@ function wc_update_270_webhooks() {
'posts_per_page' => -1,
'post_type' => 'shop_webhook',
'meta_key' => '_topic',
- 'meta_value' => 'product.updated'
+ 'meta_value' => 'product.updated',
) );
foreach ( $product_update_webhooks as $product_update_webhook ) {
$webhook = new WC_Webhook( $product_update_webhook->ID );
diff --git a/includes/wc-user-functions.php b/includes/wc-user-functions.php
index 57f8d16e49a..6f687c9ecc0 100644
--- a/includes/wc-user-functions.php
+++ b/includes/wc-user-functions.php
@@ -448,7 +448,7 @@ function wc_get_customer_available_downloads( $customer_id ) {
'download_file' => $product_id,
'order' => $result->order_key,
'email' => urlencode( $result->user_email ),
- 'key' => $result->download_id
+ 'key' => $result->download_id,
),
home_url( '/' )
),
@@ -459,7 +459,7 @@ function wc_get_customer_available_downloads( $customer_id ) {
'order_key' => $order->get_order_key(),
'downloads_remaining' => $result->downloads_remaining,
'access_expires' => $result->access_expires,
- 'file' => $download_file
+ 'file' => $download_file,
);
$file_number++;
diff --git a/includes/widgets/class-wc-widget-cart.php b/includes/widgets/class-wc-widget-cart.php
index fdc559132b0..14fa3402d4a 100644
--- a/includes/widgets/class-wc-widget-cart.php
+++ b/includes/widgets/class-wc-widget-cart.php
@@ -29,13 +29,13 @@ class WC_Widget_Cart extends WC_Widget {
'title' => array(
'type' => 'text',
'std' => __( 'Cart', 'woocommerce' ),
- 'label' => __( 'Title', 'woocommerce' )
+ 'label' => __( 'Title', 'woocommerce' ),
),
'hide_if_empty' => array(
'type' => 'checkbox',
'std' => 0,
- 'label' => __( 'Hide if cart is empty', 'woocommerce' )
- )
+ 'label' => __( 'Hide if cart is empty', 'woocommerce' ),
+ ),
);
parent::__construct();
diff --git a/includes/widgets/class-wc-widget-layered-nav-filters.php b/includes/widgets/class-wc-widget-layered-nav-filters.php
index f7532bee6b4..cd87f6ff06f 100644
--- a/includes/widgets/class-wc-widget-layered-nav-filters.php
+++ b/includes/widgets/class-wc-widget-layered-nav-filters.php
@@ -27,8 +27,8 @@ class WC_Widget_Layered_Nav_Filters extends WC_Widget {
'title' => array(
'type' => 'text',
'std' => __( 'Active Filters', 'woocommerce' ),
- 'label' => __( 'Title', 'woocommerce' )
- )
+ 'label' => __( 'Title', 'woocommerce' ),
+ ),
);
parent::__construct();
diff --git a/includes/widgets/class-wc-widget-layered-nav.php b/includes/widgets/class-wc-widget-layered-nav.php
index 4acd0f8176d..9c0ed1f84d5 100644
--- a/includes/widgets/class-wc-widget-layered-nav.php
+++ b/includes/widgets/class-wc-widget-layered-nav.php
@@ -72,13 +72,13 @@ class WC_Widget_Layered_Nav extends WC_Widget {
'title' => array(
'type' => 'text',
'std' => __( 'Filter by', 'woocommerce' ),
- 'label' => __( 'Title', 'woocommerce' )
+ 'label' => __( 'Title', 'woocommerce' ),
),
'attribute' => array(
'type' => 'select',
'std' => '',
'label' => __( 'Attribute', 'woocommerce' ),
- 'options' => $attribute_array
+ 'options' => $attribute_array,
),
'display_type' => array(
'type' => 'select',
@@ -86,8 +86,8 @@ class WC_Widget_Layered_Nav extends WC_Widget {
'label' => __( 'Display type', 'woocommerce' ),
'options' => array(
'list' => __( 'List', 'woocommerce' ),
- 'dropdown' => __( 'Dropdown', 'woocommerce' )
- )
+ 'dropdown' => __( 'Dropdown', 'woocommerce' ),
+ ),
),
'query_type' => array(
'type' => 'select',
@@ -95,8 +95,8 @@ class WC_Widget_Layered_Nav extends WC_Widget {
'label' => __( 'Query type', 'woocommerce' ),
'options' => array(
'and' => __( 'AND', 'woocommerce' ),
- 'or' => __( 'OR', 'woocommerce' )
- )
+ 'or' => __( 'OR', 'woocommerce' ),
+ ),
),
);
}
diff --git a/includes/widgets/class-wc-widget-price-filter.php b/includes/widgets/class-wc-widget-price-filter.php
index a9010ffb288..fa456dd7be8 100644
--- a/includes/widgets/class-wc-widget-price-filter.php
+++ b/includes/widgets/class-wc-widget-price-filter.php
@@ -29,8 +29,8 @@ class WC_Widget_Price_Filter extends WC_Widget {
'title' => array(
'type' => 'text',
'std' => __( 'Filter by price', 'woocommerce' ),
- 'label' => __( 'Title', 'woocommerce' )
- )
+ 'label' => __( 'Title', 'woocommerce' ),
+ ),
);
$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
wp_register_script( 'wc-jquery-ui-touchpunch', WC()->plugin_url() . '/assets/js/jquery-ui-touch-punch/jquery-ui-touch-punch' . $suffix . '.js', array( 'jquery-ui-slider' ), WC_VERSION, true );
@@ -39,7 +39,7 @@ class WC_Widget_Price_Filter extends WC_Widget {
'currency_symbol' => get_woocommerce_currency_symbol(),
'currency_pos' => get_option( 'woocommerce_currency_pos' ),
'min_price' => isset( $_GET['min_price'] ) ? esc_attr( $_GET['min_price'] ) : '',
- 'max_price' => isset( $_GET['max_price'] ) ? esc_attr( $_GET['max_price'] ) : ''
+ 'max_price' => isset( $_GET['max_price'] ) ? esc_attr( $_GET['max_price'] ) : '',
) );
parent::__construct();
}
diff --git a/includes/widgets/class-wc-widget-product-categories.php b/includes/widgets/class-wc-widget-product-categories.php
index c47a4063395..038867671ef 100644
--- a/includes/widgets/class-wc-widget-product-categories.php
+++ b/includes/widgets/class-wc-widget-product-categories.php
@@ -41,7 +41,7 @@ class WC_Widget_Product_Categories extends WC_Widget {
'title' => array(
'type' => 'text',
'std' => __( 'Product Categories', 'woocommerce' ),
- 'label' => __( 'Title', 'woocommerce' )
+ 'label' => __( 'Title', 'woocommerce' ),
),
'orderby' => array(
'type' => 'select',
@@ -49,34 +49,34 @@ class WC_Widget_Product_Categories extends WC_Widget {
'label' => __( 'Order by', 'woocommerce' ),
'options' => array(
'order' => __( 'Category Order', 'woocommerce' ),
- 'name' => __( 'Name', 'woocommerce' )
- )
+ 'name' => __( 'Name', 'woocommerce' ),
+ ),
),
'dropdown' => array(
'type' => 'checkbox',
'std' => 0,
- 'label' => __( 'Show as dropdown', 'woocommerce' )
+ 'label' => __( 'Show as dropdown', 'woocommerce' ),
),
'count' => array(
'type' => 'checkbox',
'std' => 0,
- 'label' => __( 'Show product counts', 'woocommerce' )
+ 'label' => __( 'Show product counts', 'woocommerce' ),
),
'hierarchical' => array(
'type' => 'checkbox',
'std' => 1,
- 'label' => __( 'Show hierarchy', 'woocommerce' )
+ 'label' => __( 'Show hierarchy', 'woocommerce' ),
),
'show_children_only' => array(
'type' => 'checkbox',
'std' => 0,
- 'label' => __( 'Only show children of the current category', 'woocommerce' )
+ 'label' => __( 'Only show children of the current category', 'woocommerce' ),
),
'hide_empty' => array(
'type' => 'checkbox',
'std' => 0,
- 'label' => __( 'Hide empty categories', 'woocommerce' )
- )
+ 'label' => __( 'Hide empty categories', 'woocommerce' ),
+ ),
);
parent::__construct();
@@ -140,7 +140,7 @@ class WC_Widget_Product_Categories extends WC_Widget {
'fields' => 'ids',
'parent' => 0,
'hierarchical' => true,
- 'hide_empty' => false
+ 'hide_empty' => false,
)
);
@@ -151,7 +151,7 @@ class WC_Widget_Product_Categories extends WC_Widget {
'fields' => 'ids',
'parent' => $this->current_cat->term_id,
'hierarchical' => true,
- 'hide_empty' => false
+ 'hide_empty' => false,
)
);
@@ -165,7 +165,7 @@ class WC_Widget_Product_Categories extends WC_Widget {
'fields' => 'ids',
'parent' => $ancestor,
'hierarchical' => false,
- 'hide_empty' => false
+ 'hide_empty' => false,
)
);
$siblings = array_merge( $siblings, $ancestor_siblings );
@@ -203,7 +203,7 @@ class WC_Widget_Product_Categories extends WC_Widget {
'hierarchical' => $hierarchical,
'show_uncategorized' => 0,
'orderby' => $orderby,
- 'selected' => $this->current_cat ? $this->current_cat->slug : ''
+ 'selected' => $this->current_cat ? $this->current_cat->slug : '',
);
$dropdown_args = wp_parse_args( $dropdown_args, $dropdown_defaults );
diff --git a/includes/widgets/class-wc-widget-product-search.php b/includes/widgets/class-wc-widget-product-search.php
index 9f42fd88ad1..b43f38be434 100644
--- a/includes/widgets/class-wc-widget-product-search.php
+++ b/includes/widgets/class-wc-widget-product-search.php
@@ -27,8 +27,8 @@ class WC_Widget_Product_Search extends WC_Widget {
'title' => array(
'type' => 'text',
'std' => '',
- 'label' => __( 'Title', 'woocommerce' )
- )
+ 'label' => __( 'Title', 'woocommerce' ),
+ ),
);
parent::__construct();
diff --git a/includes/widgets/class-wc-widget-product-tag-cloud.php b/includes/widgets/class-wc-widget-product-tag-cloud.php
index b74e8a8b977..31e4fbcde60 100644
--- a/includes/widgets/class-wc-widget-product-tag-cloud.php
+++ b/includes/widgets/class-wc-widget-product-tag-cloud.php
@@ -27,8 +27,8 @@ class WC_Widget_Product_Tag_Cloud extends WC_Widget {
'title' => array(
'type' => 'text',
'std' => __( 'Product Tags', 'woocommerce' ),
- 'label' => __( 'Title', 'woocommerce' )
- )
+ 'label' => __( 'Title', 'woocommerce' ),
+ ),
);
parent::__construct();
diff --git a/includes/widgets/class-wc-widget-products.php b/includes/widgets/class-wc-widget-products.php
index 4b50d50433c..e78048f8ff8 100644
--- a/includes/widgets/class-wc-widget-products.php
+++ b/includes/widgets/class-wc-widget-products.php
@@ -27,7 +27,7 @@ class WC_Widget_Products extends WC_Widget {
'title' => array(
'type' => 'text',
'std' => __( 'Products', 'woocommerce' ),
- 'label' => __( 'Title', 'woocommerce' )
+ 'label' => __( 'Title', 'woocommerce' ),
),
'number' => array(
'type' => 'number',
@@ -35,7 +35,7 @@ class WC_Widget_Products extends WC_Widget {
'min' => 1,
'max' => '',
'std' => 5,
- 'label' => __( 'Number of products to show', 'woocommerce' )
+ 'label' => __( 'Number of products to show', 'woocommerce' ),
),
'show' => array(
'type' => 'select',
@@ -45,7 +45,7 @@ class WC_Widget_Products extends WC_Widget {
'' => __( 'All Products', 'woocommerce' ),
'featured' => __( 'Featured Products', 'woocommerce' ),
'onsale' => __( 'On-sale Products', 'woocommerce' ),
- )
+ ),
),
'orderby' => array(
'type' => 'select',
@@ -56,7 +56,7 @@ class WC_Widget_Products extends WC_Widget {
'price' => __( 'Price', 'woocommerce' ),
'rand' => __( 'Random', 'woocommerce' ),
'sales' => __( 'Sales', 'woocommerce' ),
- )
+ ),
),
'order' => array(
'type' => 'select',
@@ -65,18 +65,18 @@ class WC_Widget_Products extends WC_Widget {
'options' => array(
'asc' => __( 'ASC', 'woocommerce' ),
'desc' => __( 'DESC', 'woocommerce' ),
- )
+ ),
),
'hide_free' => array(
'type' => 'checkbox',
'std' => 0,
- 'label' => __( 'Hide free products', 'woocommerce' )
+ 'label' => __( 'Hide free products', 'woocommerce' ),
),
'show_hidden' => array(
'type' => 'checkbox',
'std' => 0,
- 'label' => __( 'Show hidden products', 'woocommerce' )
- )
+ 'label' => __( 'Show hidden products', 'woocommerce' ),
+ ),
);
parent::__construct();
@@ -100,7 +100,7 @@ class WC_Widget_Products extends WC_Widget {
'post_type' => 'product',
'no_found_rows' => 1,
'order' => $order,
- 'meta_query' => array()
+ 'meta_query' => array(),
);
if ( empty( $instance['show_hidden'] ) ) {
@@ -124,7 +124,7 @@ class WC_Widget_Products extends WC_Widget {
case 'featured' :
$query_args['meta_query'][] = array(
'key' => '_featured',
- 'value' => 'yes'
+ 'value' => 'yes',
);
break;
case 'onsale' :
diff --git a/includes/widgets/class-wc-widget-rating-filter.php b/includes/widgets/class-wc-widget-rating-filter.php
index e584cd17657..b4f68a7c5e6 100644
--- a/includes/widgets/class-wc-widget-rating-filter.php
+++ b/includes/widgets/class-wc-widget-rating-filter.php
@@ -28,8 +28,8 @@ class WC_Widget_Rating_Filter extends WC_Widget {
'title' => array(
'type' => 'text',
'std' => __( 'Average Rating', 'woocommerce' ),
- 'label' => __( 'Title', 'woocommerce' )
- )
+ 'label' => __( 'Title', 'woocommerce' ),
+ ),
);
parent::__construct();
}
@@ -114,7 +114,7 @@ class WC_Widget_Rating_Filter extends WC_Widget {
'value' => $rating,
'compare' => '>=',
'type' => 'DECIMAL',
- 'rating_filter' => true
+ 'rating_filter' => true,
);
$meta_query = new WP_Meta_Query( $meta_query );
diff --git a/includes/widgets/class-wc-widget-recent-reviews.php b/includes/widgets/class-wc-widget-recent-reviews.php
index b13cd90325a..8ed9191f1f8 100644
--- a/includes/widgets/class-wc-widget-recent-reviews.php
+++ b/includes/widgets/class-wc-widget-recent-reviews.php
@@ -27,7 +27,7 @@ class WC_Widget_Recent_Reviews extends WC_Widget {
'title' => array(
'type' => 'text',
'std' => __( 'Recent Reviews', 'woocommerce' ),
- 'label' => __( 'Title', 'woocommerce' )
+ 'label' => __( 'Title', 'woocommerce' ),
),
'number' => array(
'type' => 'number',
@@ -35,8 +35,8 @@ class WC_Widget_Recent_Reviews extends WC_Widget {
'min' => 1,
'max' => '',
'std' => 10,
- 'label' => __( 'Number of reviews to show', 'woocommerce' )
- )
+ 'label' => __( 'Number of reviews to show', 'woocommerce' ),
+ ),
);
parent::__construct();
diff --git a/includes/widgets/class-wc-widget-recently-viewed.php b/includes/widgets/class-wc-widget-recently-viewed.php
index e4196f66651..05cd4e7c35b 100644
--- a/includes/widgets/class-wc-widget-recently-viewed.php
+++ b/includes/widgets/class-wc-widget-recently-viewed.php
@@ -27,7 +27,7 @@ class WC_Widget_Recently_Viewed extends WC_Widget {
'title' => array(
'type' => 'text',
'std' => __( 'Recently Viewed Products', 'woocommerce' ),
- 'label' => __( 'Title', 'woocommerce' )
+ 'label' => __( 'Title', 'woocommerce' ),
),
'number' => array(
'type' => 'number',
@@ -35,8 +35,8 @@ class WC_Widget_Recently_Viewed extends WC_Widget {
'min' => 1,
'max' => '',
'std' => 10,
- 'label' => __( 'Number of products to show', 'woocommerce' )
- )
+ 'label' => __( 'Number of products to show', 'woocommerce' ),
+ ),
);
parent::__construct();
diff --git a/includes/widgets/class-wc-widget-top-rated-products.php b/includes/widgets/class-wc-widget-top-rated-products.php
index 921bb38ba06..309f81c5972 100644
--- a/includes/widgets/class-wc-widget-top-rated-products.php
+++ b/includes/widgets/class-wc-widget-top-rated-products.php
@@ -29,7 +29,7 @@ class WC_Widget_Top_Rated_Products extends WC_Widget {
'title' => array(
'type' => 'text',
'std' => __( 'Top Rated Products', 'woocommerce' ),
- 'label' => __( 'Title', 'woocommerce' )
+ 'label' => __( 'Title', 'woocommerce' ),
),
'number' => array(
'type' => 'number',
@@ -37,8 +37,8 @@ class WC_Widget_Top_Rated_Products extends WC_Widget {
'min' => 1,
'max' => '',
'std' => 5,
- 'label' => __( 'Number of products to show', 'woocommerce' )
- )
+ 'label' => __( 'Number of products to show', 'woocommerce' ),
+ ),
);
parent::__construct();
diff --git a/templates/cart/cart.php b/templates/cart/cart.php
index 23230de1335..412312764bc 100644
--- a/templates/cart/cart.php
+++ b/templates/cart/cart.php
@@ -109,7 +109,7 @@ do_action( 'woocommerce_before_cart' ); ?>
'input_name' => "cart[{$cart_item_key}][qty]",
'input_value' => $cart_item['quantity'],
'max_value' => $_product->backorders_allowed() ? '' : $_product->get_stock_quantity(),
- 'min_value' => '0'
+ 'min_value' => '0',
), $_product, false );
}
diff --git a/templates/cart/cross-sells.php b/templates/cart/cross-sells.php
index 712a538d087..9a1714a8bfd 100644
--- a/templates/cart/cross-sells.php
+++ b/templates/cart/cross-sells.php
@@ -33,7 +33,7 @@ $args = array(
'posts_per_page' => apply_filters( 'woocommerce_cross_sells_total', $posts_per_page ),
'orderby' => $orderby,
'post__in' => $crosssells,
- 'meta_query' => WC()->query->get_meta_query()
+ 'meta_query' => WC()->query->get_meta_query(),
);
$products = new WP_Query( $args );
diff --git a/templates/checkout/form-login.php b/templates/checkout/form-login.php
index 1be55451c6a..8689a55518a 100644
--- a/templates/checkout/form-login.php
+++ b/templates/checkout/form-login.php
@@ -34,7 +34,7 @@ wc_print_notice( $info_message, 'notice' );
array(
'message' => __( 'If you have shopped with us before, please enter your details in the boxes below. If you are a new customer, please proceed to the Billing & Shipping section.', 'woocommerce' ),
'redirect' => wc_get_page_permalink( 'checkout' ),
- 'hidden' => true
+ 'hidden' => true,
)
);
?>
diff --git a/templates/emails/email-order-details.php b/templates/emails/email-order-details.php
index f430fc14247..202d680b603 100644
--- a/templates/emails/email-order-details.php
+++ b/templates/emails/email-order-details.php
@@ -42,7 +42,7 @@ do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plai
'show_image' => false,
'image_size' => array( 32, 32 ),
'plain_text' => $plain_text,
- 'sent_to_admin' => $sent_to_admin
+ 'sent_to_admin' => $sent_to_admin,
) ); ?>
diff --git a/templates/emails/plain/email-order-details.php b/templates/emails/plain/email-order-details.php
index 666a3adaeb7..15b4b6890fd 100644
--- a/templates/emails/plain/email-order-details.php
+++ b/templates/emails/plain/email-order-details.php
@@ -29,7 +29,7 @@ echo "\n" . wc_get_email_order_items( $order, array(
'show_image' => false,
'image_size' => array( 32, 32 ),
'plain_text' => true,
- 'sent_to_admin' => $sent_to_admin
+ 'sent_to_admin' => $sent_to_admin,
) );
echo "==========\n\n";
diff --git a/templates/loop/pagination.php b/templates/loop/pagination.php
index e2188dc8368..cf394db03b2 100644
--- a/templates/loop/pagination.php
+++ b/templates/loop/pagination.php
@@ -38,7 +38,7 @@ if ( $wp_query->max_num_pages <= 1 ) {
'next_text' => '→',
'type' => 'list',
'end_size' => 3,
- 'mid_size' => 3
+ 'mid_size' => 3,
) ) );
?>
diff --git a/templates/myaccount/downloads.php b/templates/myaccount/downloads.php
index 7381b89ed6b..0b375a70c79 100644
--- a/templates/myaccount/downloads.php
+++ b/templates/myaccount/downloads.php
@@ -72,8 +72,8 @@ do_action( 'woocommerce_before_account_downloads', $has_downloads ); ?>
$actions = array(
'download' => array(
'url' => $download['download_url'],
- 'name' => __( 'Download', 'woocommerce' )
- )
+ 'name' => __( 'Download', 'woocommerce' ),
+ ),
);
if ( $actions = apply_filters( 'woocommerce_account_download_actions', $actions, $download ) ) {
diff --git a/templates/myaccount/my-address.php b/templates/myaccount/my-address.php
index b8b345f0401..c46df9e6d88 100644
--- a/templates/myaccount/my-address.php
+++ b/templates/myaccount/my-address.php
@@ -25,11 +25,11 @@ $customer_id = get_current_user_id();
if ( ! wc_ship_to_billing_address_only() && wc_shipping_enabled() ) {
$get_addresses = apply_filters( 'woocommerce_my_account_get_addresses', array(
'billing' => __( 'Billing Address', 'woocommerce' ),
- 'shipping' => __( 'Shipping Address', 'woocommerce' )
+ 'shipping' => __( 'Shipping Address', 'woocommerce' ),
), $customer_id );
} else {
$get_addresses = apply_filters( 'woocommerce_my_account_get_addresses', array(
- 'billing' => __( 'Billing Address', 'woocommerce' )
+ 'billing' => __( 'Billing Address', 'woocommerce' ),
), $customer_id );
}
@@ -61,7 +61,7 @@ $col = 1;
'city' => get_user_meta( $customer_id, $name . '_city', true ),
'state' => get_user_meta( $customer_id, $name . '_state', true ),
'postcode' => get_user_meta( $customer_id, $name . '_postcode', true ),
- 'country' => get_user_meta( $customer_id, $name . '_country', true )
+ 'country' => get_user_meta( $customer_id, $name . '_country', true ),
), $customer_id, $name );
$formatted_address = WC()->countries->get_formatted_address( $address );
diff --git a/templates/myaccount/my-orders.php b/templates/myaccount/my-orders.php
index 071b5723027..ce5c3ba86ee 100644
--- a/templates/myaccount/my-orders.php
+++ b/templates/myaccount/my-orders.php
@@ -22,7 +22,7 @@ $customer_orders = get_posts( apply_filters( 'woocommerce_my_account_my_orders_q
'meta_key' => '_customer_user',
'meta_value' => get_current_user_id(),
'post_type' => wc_get_order_types( 'view-orders' ),
- 'post_status' => array_keys( wc_get_order_statuses() )
+ 'post_status' => array_keys( wc_get_order_statuses() ),
) ) );
if ( $customer_orders ) : ?>
@@ -69,16 +69,16 @@ if ( $customer_orders ) : ?>
$actions = array(
'pay' => array(
'url' => $order->get_checkout_payment_url(),
- 'name' => __( 'Pay', 'woocommerce' )
+ 'name' => __( 'Pay', 'woocommerce' ),
),
'view' => array(
'url' => $order->get_view_order_url(),
- 'name' => __( 'View', 'woocommerce' )
+ 'name' => __( 'View', 'woocommerce' ),
),
'cancel' => array(
'url' => $order->get_cancel_order_url( wc_get_page_permalink( 'myaccount' ) ),
- 'name' => __( 'Cancel', 'woocommerce' )
- )
+ 'name' => __( 'Cancel', 'woocommerce' ),
+ ),
);
if ( ! $order->needs_payment() ) {
diff --git a/templates/myaccount/orders.php b/templates/myaccount/orders.php
index 0ee143e8610..6bfc7dee172 100644
--- a/templates/myaccount/orders.php
+++ b/templates/myaccount/orders.php
@@ -65,16 +65,16 @@ do_action( 'woocommerce_before_account_orders', $has_orders ); ?>
$actions = array(
'pay' => array(
'url' => $order->get_checkout_payment_url(),
- 'name' => __( 'Pay', 'woocommerce' )
+ 'name' => __( 'Pay', 'woocommerce' ),
),
'view' => array(
'url' => $order->get_view_order_url(),
- 'name' => __( 'View', 'woocommerce' )
+ 'name' => __( 'View', 'woocommerce' ),
),
'cancel' => array(
'url' => $order->get_cancel_order_url( wc_get_page_permalink( 'myaccount' ) ),
- 'name' => __( 'Cancel', 'woocommerce' )
- )
+ 'name' => __( 'Cancel', 'woocommerce' ),
+ ),
);
if ( ! $order->needs_payment() ) {
diff --git a/templates/single-product-reviews.php b/templates/single-product-reviews.php
index b508f259a23..6bd2a13444e 100644
--- a/templates/single-product-reviews.php
+++ b/templates/single-product-reviews.php
@@ -79,7 +79,7 @@ if ( ! comments_open() ) {
),
'label_submit' => __( 'Submit', 'woocommerce' ),
'logged_in_as' => '',
- 'comment_field' => ''
+ 'comment_field' => '',
);
if ( $account_page_url = wc_get_page_permalink( 'myaccount' ) ) {
diff --git a/templates/single-product/add-to-cart/grouped.php b/templates/single-product/add-to-cart/grouped.php
index 8cb239c6ccc..28f628e81f2 100644
--- a/templates/single-product/add-to-cart/grouped.php
+++ b/templates/single-product/add-to-cart/grouped.php
@@ -53,7 +53,7 @@ do_action( 'woocommerce_before_add_to_cart_form' ); ?>
'input_name' => 'quantity[' . $product_id . ']',
'input_value' => ( isset( $_POST['quantity'][$product_id] ) ? wc_stock_amount( $_POST['quantity'][$product_id] ) : 0 ),
'min_value' => apply_filters( 'woocommerce_quantity_input_min', 0, $product ),
- 'max_value' => apply_filters( 'woocommerce_quantity_input_max', $product->backorders_allowed() ? '' : $product->get_stock_quantity(), $product )
+ 'max_value' => apply_filters( 'woocommerce_quantity_input_max', $product->backorders_allowed() ? '' : $product->get_stock_quantity(), $product ),
) );
?>
diff --git a/templates/single-product/add-to-cart/simple.php b/templates/single-product/add-to-cart/simple.php
index 51a9795bf2a..7d03628e084 100644
--- a/templates/single-product/add-to-cart/simple.php
+++ b/templates/single-product/add-to-cart/simple.php
@@ -48,7 +48,7 @@ if ( ! $product->is_purchasable() ) {
woocommerce_quantity_input( array(
'min_value' => apply_filters( 'woocommerce_quantity_input_min', 1, $product ),
'max_value' => apply_filters( 'woocommerce_quantity_input_max', $product->backorders_allowed() ? '' : $product->get_stock_quantity(), $product ),
- 'input_value' => ( isset( $_POST['quantity'] ) ? wc_stock_amount( $_POST['quantity'] ) : 1 )
+ 'input_value' => ( isset( $_POST['quantity'] ) ? wc_stock_amount( $_POST['quantity'] ) : 1 ),
) );
}
?>
diff --git a/templates/single-product/related.php b/templates/single-product/related.php
index 63c902925f6..330f6356030 100644
--- a/templates/single-product/related.php
+++ b/templates/single-product/related.php
@@ -37,7 +37,7 @@ $args = apply_filters( 'woocommerce_related_products_args', array(
'posts_per_page' => $posts_per_page,
'orderby' => $orderby,
'post__in' => $related,
- 'post__not_in' => array( $product->id )
+ 'post__not_in' => array( $product->id ),
) );
$products = new WP_Query( $args );
diff --git a/templates/single-product/up-sells.php b/templates/single-product/up-sells.php
index 9464d5fc0d5..af09d978c05 100644
--- a/templates/single-product/up-sells.php
+++ b/templates/single-product/up-sells.php
@@ -34,7 +34,7 @@ $args = array(
'orderby' => $orderby,
'post__in' => $upsells,
'post__not_in' => array( $product->id ),
- 'meta_query' => WC()->query->get_meta_query()
+ 'meta_query' => WC()->query->get_meta_query(),
);
$products = new WP_Query( $args );
diff --git a/tests/framework/helpers/class-wc-helper-coupon.php b/tests/framework/helpers/class-wc-helper-coupon.php
index 05206b867b8..84ca368d304 100644
--- a/tests/framework/helpers/class-wc-helper-coupon.php
+++ b/tests/framework/helpers/class-wc-helper-coupon.php
@@ -18,7 +18,7 @@ class WC_Helper_Coupon {
'post_title' => $coupon_code,
'post_type' => 'shop_coupon',
'post_status' => 'publish',
- 'post_excerpt' => 'This is a dummy coupon'
+ 'post_excerpt' => 'This is a dummy coupon',
) );
// Update meta
diff --git a/tests/framework/helpers/class-wc-helper-customer.php b/tests/framework/helpers/class-wc-helper-customer.php
index b585bd4582b..d4eefb14a45 100644
--- a/tests/framework/helpers/class-wc-helper-customer.php
+++ b/tests/framework/helpers/class-wc-helper-customer.php
@@ -29,7 +29,7 @@ class WC_Helper_Customer {
'shipping_address' => '123 South Street',
'shipping_address_2' => 'Apt 1',
'is_vat_exempt' => false,
- 'calculated_shipping' => false
+ 'calculated_shipping' => false,
);
WC_Helper_Customer::set_customer_details( $customer_data );
diff --git a/tests/framework/helpers/class-wc-helper-product.php b/tests/framework/helpers/class-wc-helper-product.php
index e2bf15c64d1..e9ffb5b597d 100644
--- a/tests/framework/helpers/class-wc-helper-product.php
+++ b/tests/framework/helpers/class-wc-helper-product.php
@@ -38,7 +38,7 @@ class WC_Helper_Product {
$product = wp_insert_post( array(
'post_title' => 'Dummy Product',
'post_type' => 'product',
- 'post_status' => 'publish'
+ 'post_status' => 'publish',
) );
update_post_meta( $product, '_price', '10' );
update_post_meta( $product, '_regular_price', '10' );
@@ -71,7 +71,7 @@ class WC_Helper_Product {
$product_id = wp_insert_post( array(
'post_title' => 'Dummy Product',
'post_type' => 'product',
- 'post_status' => 'publish'
+ 'post_status' => 'publish',
) );
// Set it as variable.
@@ -102,15 +102,15 @@ class WC_Helper_Product {
'position' => '1',
'is_visible' => 0,
'is_variation' => 1,
- 'is_taxonomy' => 1
- )
+ 'is_taxonomy' => 1,
+ ),
) );
// Link the product to the attribute
$wpdb->insert( $wpdb->prefix . 'term_relationships', array(
'object_id' => $product_id,
'term_taxonomy_id' => $attribute_data['term_taxonomy_id'],
- 'term_order' => 0
+ 'term_order' => 0,
) );
$return['term_taxonomy_id'] = $wpdb->insert_id;
@@ -119,7 +119,7 @@ class WC_Helper_Product {
'post_title' => 'Variation #' . ( $product_id + 1 ) . ' of Dummy Product',
'post_type' => 'product_variation',
'post_parent' => $product_id,
- 'post_status' => 'publish'
+ 'post_status' => 'publish',
) );
// Price related meta
@@ -141,7 +141,7 @@ class WC_Helper_Product {
'post_title' => 'Variation #' . ( $product_id + 2 ) . ' of Dummy Product',
'post_type' => 'product_variation',
'post_parent' => $product_id,
- 'post_status' => 'publish'
+ 'post_status' => 'publish',
) );
// Price related meta
@@ -198,7 +198,7 @@ class WC_Helper_Product {
$wpdb->insert( $wpdb->prefix . 'terms', array(
'name' => 'small',
'slug' => 'small',
- 'term_group' => 0
+ 'term_group' => 0,
), array(
'%s',
'%s',
@@ -212,7 +212,7 @@ class WC_Helper_Product {
'taxonomy' => 'pa_dummyattribute',
'description' => '',
'parent' => 0,
- 'count' => 1
+ 'count' => 1,
) );
$return['term_taxonomy_id'] = $wpdb->insert_id;
diff --git a/tests/framework/helpers/class-wc-helper-shipping.php b/tests/framework/helpers/class-wc-helper-shipping.php
index f70300117a9..99c22f60abe 100644
--- a/tests/framework/helpers/class-wc-helper-shipping.php
+++ b/tests/framework/helpers/class-wc-helper-shipping.php
@@ -19,7 +19,7 @@ class WC_Helper_Shipping {
'availability' => 'all',
'countries' => '',
'tax_status' => 'taxable',
- 'cost' => '10'
+ 'cost' => '10',
);
update_option( 'woocommerce_flat_rate_settings', $flat_rate_settings );
diff --git a/tests/unit-tests/api/orders.php b/tests/unit-tests/api/orders.php
index 6120e26cd57..dfde4ea546f 100644
--- a/tests/unit-tests/api/orders.php
+++ b/tests/unit-tests/api/orders.php
@@ -139,7 +139,7 @@ class WC_Tests_API_Orders extends WC_REST_Unit_Test_Case {
'postcode' => '94103',
'country' => 'US',
'email' => 'john.doe@example.com',
- 'phone' => '(555) 555-5555'
+ 'phone' => '(555) 555-5555',
),
'shipping' => array(
'first_name' => 'John',
@@ -154,14 +154,14 @@ class WC_Tests_API_Orders extends WC_REST_Unit_Test_Case {
'line_items' => array(
array(
'product_id' => $product->get_id(),
- 'quantity' => 2
+ 'quantity' => 2,
),
),
'shipping_lines' => array(
array(
'method_id' => 'flat_rate',
'method_title' => 'Flat Rate',
- 'total' => 10
+ 'total' => 10,
),
),
) );
@@ -223,7 +223,7 @@ class WC_Tests_API_Orders extends WC_REST_Unit_Test_Case {
'postcode' => '94103',
'country' => 'US',
'email' => 'john.doe@example.com',
- 'phone' => '(555) 555-5555'
+ 'phone' => '(555) 555-5555',
),
'shipping' => array(
'first_name' => 'John',
@@ -238,14 +238,14 @@ class WC_Tests_API_Orders extends WC_REST_Unit_Test_Case {
'line_items' => array(
array(
'product_id' => $product->get_id(),
- 'quantity' => 2
+ 'quantity' => 2,
),
),
'shipping_lines' => array(
array(
'method_id' => 'flat_rate',
'method_title' => 'Flat Rate',
- 'total' => 10
+ 'total' => 10,
),
),
) );
diff --git a/tests/unit-tests/api/settings.php b/tests/unit-tests/api/settings.php
index 8f9c0583373..d438808eeef 100644
--- a/tests/unit-tests/api/settings.php
+++ b/tests/unit-tests/api/settings.php
@@ -191,7 +191,7 @@ class Settings extends WC_REST_Unit_Test_Case {
'href' => rest_url( '/wc/v1/settings/general' ),
),
),
- )
+ ),
), $data );
// test getting a valid group with settings attached to it
diff --git a/tests/unit-tests/cart/cart.php b/tests/unit-tests/cart/cart.php
index d8ddc0f080e..bb6ec23591c 100644
--- a/tests/unit-tests/cart/cart.php
+++ b/tests/unit-tests/cart/cart.php
@@ -71,7 +71,7 @@ class WC_Tests_Cart extends WC_Unit_Test_Case {
'tax_rate_compound' => '0',
'tax_rate_shipping' => '1',
'tax_rate_order' => '1',
- 'tax_rate_class' => ''
+ 'tax_rate_class' => '',
);
WC_Tax::_insert_tax_rate( $tax_rate );
$product = wc_get_product( $product->id );
@@ -106,7 +106,7 @@ class WC_Tests_Cart extends WC_Unit_Test_Case {
'tax_rate_compound' => '0',
'tax_rate_shipping' => '1',
'tax_rate_order' => '1',
- 'tax_rate_class' => ''
+ 'tax_rate_class' => '',
);
WC_Tax::_insert_tax_rate( $tax_rate );
@@ -301,7 +301,7 @@ class WC_Tests_Cart extends WC_Unit_Test_Case {
'is',
'an',
'array'
- )
+ ),
);
// Manually generate ID
diff --git a/tests/unit-tests/coupon/crud.php b/tests/unit-tests/coupon/crud.php
index 024c768f40f..98461449d05 100644
--- a/tests/unit-tests/coupon/crud.php
+++ b/tests/unit-tests/coupon/crud.php
@@ -176,7 +176,7 @@ class WC_Tests_CouponCRUD extends WC_Unit_Test_Case {
'exclude_sale_items' => false,
'minimum_amount' => '',
'maximum_amount' => 100,
- 'customer_email' => ''
+ 'customer_email' => '',
) );
$this->assertEquals( $code, $coupon->get_code() );
$this->assertEquals( true, $coupon->get_individual_use() );
@@ -208,7 +208,7 @@ class WC_Tests_CouponCRUD extends WC_Unit_Test_Case {
'exclude_sale_items' => 'no',
'minimum_amount' => '',
'maximum_amount' => 100,
- 'customer_email' => ''
+ 'customer_email' => '',
) );
$this->assertEquals( $code, $coupon->get_code() );
$this->assertEquals( true, $coupon->get_individual_use() );
diff --git a/tests/unit-tests/coupon/functions.php b/tests/unit-tests/coupon/functions.php
index a91c03048f5..4dc826207bb 100644
--- a/tests/unit-tests/coupon/functions.php
+++ b/tests/unit-tests/coupon/functions.php
@@ -18,7 +18,7 @@ class WC_Tests_Functions extends WC_Unit_Test_Case {
'fixed_cart' => __( 'Cart Discount', 'woocommerce' ),
'percent' => __( 'Cart % Discount', 'woocommerce' ),
'fixed_product' => __( 'Product Discount', 'woocommerce' ),
- 'percent_product' => __( 'Product % Discount', 'woocommerce' )
+ 'percent_product' => __( 'Product % Discount', 'woocommerce' ),
);
$this->assertEquals( $coupon_types, wc_get_coupon_types() );
diff --git a/tests/unit-tests/crud/data.php b/tests/unit-tests/crud/data.php
index 67e6d2186aa..70f7ad4e4ee 100644
--- a/tests/unit-tests/crud/data.php
+++ b/tests/unit-tests/crud/data.php
@@ -54,7 +54,7 @@ class WC_Tests_CRUD_Data extends WC_Unit_Test_Case {
$object = new WC_Mock_WC_Data();
$data_to_set = array(
'content' => 'I am a fish',
- 'bool_value' => true
+ 'bool_value' => true,
);
$result = $object->set_props( $data_to_set );
$this->assertFalse( is_wp_error( $result ) );
@@ -63,7 +63,7 @@ class WC_Tests_CRUD_Data extends WC_Unit_Test_Case {
$data_to_set = array(
'content' => 'I am also a fish',
- 'bool_value' => 'thisisinvalid'
+ 'bool_value' => 'thisisinvalid',
);
$result = $object->set_props( $data_to_set );
$this->assertTrue( is_wp_error( $result ) );
diff --git a/tests/unit-tests/customer/crud.php b/tests/unit-tests/customer/crud.php
index 9dedb3bf0de..06697fec937 100644
--- a/tests/unit-tests/customer/crud.php
+++ b/tests/unit-tests/customer/crud.php
@@ -176,7 +176,7 @@ class WC_Tests_CustomerCRUD extends WC_Unit_Test_Case {
'billing_country' => 'US', 'shipping_state' => 'NY', 'shipping_postcode' => 11011, 'shipping_city' =>
'New York', 'shipping_address' => '123 Main St.', 'shipping_address_1' => '123 Main St.',
'shipping_address_2' => 'Apt 2', 'is_vat_exempt' => true, 'calculated_shipping' => true,
- 'is_paying_customer' => true
+ 'is_paying_customer' => true,
);
$customer = new WC_Customer;
diff --git a/tests/unit-tests/formatting/functions.php b/tests/unit-tests/formatting/functions.php
index fbbcbf3386f..be5199923ef 100644
--- a/tests/unit-tests/formatting/functions.php
+++ b/tests/unit-tests/formatting/functions.php
@@ -313,7 +313,7 @@ class WC_Tests_Formatting_Functions extends WC_Unit_Test_Case {
'pear' => 'grape',
'vegetables' => array(
'cucumber' => 'asparagus',
- )
+ ),
);
$a2 = array(
diff --git a/tests/unit-tests/order/crud.php b/tests/unit-tests/order/crud.php
index 51c70c2bb3c..0a3bdfb1123 100644
--- a/tests/unit-tests/order/crud.php
+++ b/tests/unit-tests/order/crud.php
@@ -235,11 +235,11 @@ class WC_Tests_CRUD_Orders extends WC_Unit_Test_Case {
$object = new WC_Order();
$item_1 = new WC_Order_Item_Product( array(
'product' => $product,
- 'quantity' => 4
+ 'quantity' => 4,
) );
$item_2 = new WC_Order_Item_Product( array(
'product' => $product,
- 'quantity' => 2
+ 'quantity' => 2,
) );
$object->add_item( $item_1 );
@@ -257,11 +257,11 @@ class WC_Tests_CRUD_Orders extends WC_Unit_Test_Case {
$object = new WC_Order();
$item_1 = new WC_Order_Item_Product( array(
'product' => WC_Helper_Product::create_simple_product(),
- 'quantity' => 4
+ 'quantity' => 4,
) );
$item_2 = new WC_Order_Item_Product( array(
'product' => WC_Helper_Product::create_simple_product(),
- 'quantity' => 2
+ 'quantity' => 2,
) );
$object->add_item( $item_1 );
@@ -301,14 +301,14 @@ class WC_Tests_CRUD_Orders extends WC_Unit_Test_Case {
'tax_rate_compound' => '0',
'tax_rate_shipping' => '1',
'tax_rate_order' => '1',
- 'tax_rate_class' => ''
+ 'tax_rate_class' => '',
);
WC_Tax::_insert_tax_rate( $tax_rate );
$object = new WC_Order();
$item_1 = new WC_Order_Item_Product( array(
'product' => WC_Helper_Product::create_simple_product(),
- 'quantity' => 4
+ 'quantity' => 4,
) );
$object->add_item( $item_1 );
$object->calculate_totals();
@@ -399,11 +399,11 @@ class WC_Tests_CRUD_Orders extends WC_Unit_Test_Case {
$object = new WC_Order();
$item_1 = new WC_Order_Item_Product( array(
'product' => WC_Helper_Product::create_simple_product(),
- 'quantity' => 4
+ 'quantity' => 4,
) );
$item_2 = new WC_Order_Item_Product( array(
'product' => WC_Helper_Product::create_simple_product(),
- 'quantity' => 2
+ 'quantity' => 2,
) );
$object->add_item( $item_1 );
@@ -419,7 +419,7 @@ class WC_Tests_CRUD_Orders extends WC_Unit_Test_Case {
$object = new WC_Order();
$item = new WC_Order_Item_Product( array(
'product' => WC_Helper_Product::create_simple_product(),
- 'quantity' => 4
+ 'quantity' => 4,
) );
$item_id = $item->save();
$object->add_item( $item_id );
@@ -508,7 +508,7 @@ class WC_Tests_CRUD_Orders extends WC_Unit_Test_Case {
'tax_rate_compound' => '0',
'tax_rate_shipping' => '1',
'tax_rate_order' => '1',
- 'tax_rate_class' => ''
+ 'tax_rate_class' => '',
);
WC_Tax::_insert_tax_rate( $tax_rate );
@@ -549,7 +549,7 @@ class WC_Tests_CRUD_Orders extends WC_Unit_Test_Case {
'tax_rate_compound' => '0',
'tax_rate_shipping' => '1',
'tax_rate_order' => '1',
- 'tax_rate_class' => ''
+ 'tax_rate_class' => '',
);
WC_Tax::_insert_tax_rate( $tax_rate );
diff --git a/tests/unit-tests/product/functions.php b/tests/unit-tests/product/functions.php
index 7ea15a0d371..b616fc08ba2 100644
--- a/tests/unit-tests/product/functions.php
+++ b/tests/unit-tests/product/functions.php
@@ -121,7 +121,7 @@ class WC_Tests_Product_Functions extends WC_Unit_Test_Case {
$sizes = array(
'shop_thumbnail' => array( 'width' => '180', 'height' => '180' ),
'shop_single' => array( 'width' => '600', 'height' => '600' ),
- 'shop_catalog' => array( 'width' => '300', 'height' => '300' )
+ 'shop_catalog' => array( 'width' => '300', 'height' => '300' ),
);
foreach ( $sizes as $size => $values ) {
@@ -143,7 +143,7 @@ class WC_Tests_Product_Functions extends WC_Unit_Test_Case {
'simple' => __( 'Simple product', 'woocommerce' ),
'grouped' => __( 'Grouped product', 'woocommerce' ),
'external' => __( 'External/Affiliate product', 'woocommerce' ),
- 'variable' => __( 'Variable product', 'woocommerce' )
+ 'variable' => __( 'Variable product', 'woocommerce' ),
) );
$this->assertEquals( $product_types, wc_get_product_types() );
diff --git a/tests/unit-tests/shipping-zones/shipping-zone.php b/tests/unit-tests/shipping-zones/shipping-zone.php
index 26b36354229..2bc8e699120 100644
--- a/tests/unit-tests/shipping-zones/shipping-zone.php
+++ b/tests/unit-tests/shipping-zones/shipping-zone.php
@@ -254,11 +254,11 @@ class WC_Tests_Shipping_Zone extends WC_Unit_Test_Case {
$zone->set_locations( array(
array(
'code' => 'US',
- 'type' => 'country'
+ 'type' => 'country',
),
array(
'code' => '90210',
- 'type' => 'postcode'
+ 'type' => 'postcode',
)
) );
@@ -266,12 +266,12 @@ class WC_Tests_Shipping_Zone extends WC_Unit_Test_Case {
$this->assertEquals( $zone->get_zone_locations(), array(
2 => (object) array(
'code' => 'US',
- 'type' => 'country'
+ 'type' => 'country',
),
3 => (object) array(
'code' => '90210',
- 'type' => 'postcode'
- )
+ 'type' => 'postcode',
+ ),
) );
// Clean
diff --git a/tests/unit-tests/shipping-zones/shipping-zones.php b/tests/unit-tests/shipping-zones/shipping-zones.php
index 4c19ef31013..5fd81d1ba14 100644
--- a/tests/unit-tests/shipping-zones/shipping-zones.php
+++ b/tests/unit-tests/shipping-zones/shipping-zones.php
@@ -119,28 +119,28 @@ class WC_Tests_Shipping_Zones extends WC_Unit_Test_Case {
'country' => 'GB',
'state' => 'Cambs',
'postcode' => 'CB23 1GG',
- )
+ ),
) );
$zone2 = WC_Shipping_Zones::get_zone_matching_package( array(
'destination' => array(
'country' => 'GB',
'state' => 'Cambs',
'postcode' => 'PE12 1BG',
- )
+ ),
) );
$zone3 = WC_Shipping_Zones::get_zone_matching_package( array(
'destination' => array(
'country' => 'US',
'state' => 'CA',
'postcode' => '90210',
- )
+ ),
) );
$zone4 = WC_Shipping_Zones::get_zone_matching_package( array(
'destination' => array(
'country' => 'US',
'state' => 'AL',
'postcode' => '12345',
- )
+ ),
) );
// Assert
diff --git a/tests/unit-tests/tax/tax.php b/tests/unit-tests/tax/tax.php
index 7c1713eb0fa..b20bce811a3 100644
--- a/tests/unit-tests/tax/tax.php
+++ b/tests/unit-tests/tax/tax.php
@@ -25,7 +25,7 @@ class WC_Tests_Tax extends WC_Unit_Test_Case {
'tax_rate_compound' => '0',
'tax_rate_shipping' => '1',
'tax_rate_order' => '1',
- 'tax_rate_class' => ''
+ 'tax_rate_class' => '',
);
$tax_rate_id = WC_Tax::_insert_tax_rate( $tax_rate );
@@ -56,7 +56,7 @@ class WC_Tests_Tax extends WC_Unit_Test_Case {
'tax_rate_compound' => '0',
'tax_rate_shipping' => '1',
'tax_rate_order' => '1',
- 'tax_rate_class' => ''
+ 'tax_rate_class' => '',
);
$tax_rate_id = WC_Tax::_insert_tax_rate( $tax_rate );
@@ -86,7 +86,7 @@ class WC_Tests_Tax extends WC_Unit_Test_Case {
'tax_rate_compound' => '0',
'tax_rate_shipping' => '1',
'tax_rate_order' => '1',
- 'tax_rate_class' => ''
+ 'tax_rate_class' => '',
);
$tax_rate_id = WC_Tax::_insert_tax_rate( $tax_rate );
@@ -116,7 +116,7 @@ class WC_Tests_Tax extends WC_Unit_Test_Case {
'tax_rate_compound' => '0',
'tax_rate_shipping' => '1',
'tax_rate_order' => '1',
- 'tax_rate_class' => ''
+ 'tax_rate_class' => '',
);
$tax_rate_id = WC_Tax::_insert_tax_rate( $tax_rate );
@@ -126,7 +126,7 @@ class WC_Tests_Tax extends WC_Unit_Test_Case {
'state' => 'Cambs',
'postcode' => 'PE14 1XX',
'city' => 'Somewhere',
- 'tax_class' => ''
+ 'tax_class' => '',
) );
$this->assertEquals( $tax_rates, array( $tax_rate_id => array( 'rate' => '20.0000', 'label' => 'VAT', 'shipping' => 'yes', 'compound' => 'no' ) ) );
@@ -152,7 +152,7 @@ class WC_Tests_Tax extends WC_Unit_Test_Case {
'tax_rate_compound' => '0',
'tax_rate_shipping' => '1',
'tax_rate_order' => '1',
- 'tax_rate_class' => ''
+ 'tax_rate_class' => '',
);
$tax_rate_id = WC_Tax::_insert_tax_rate( $tax_rate );
@@ -162,7 +162,7 @@ class WC_Tests_Tax extends WC_Unit_Test_Case {
'state' => 'Cambs',
'postcode' => 'PE14 1XX',
'city' => 'Somewhere',
- 'tax_class' => ''
+ 'tax_class' => '',
) );
$this->assertEquals( $tax_rates, array( $tax_rate_id => array( 'rate' => '20.0000', 'label' => 'VAT', 'shipping' => 'yes', 'compound' => 'no' ) ) );
@@ -188,7 +188,7 @@ class WC_Tests_Tax extends WC_Unit_Test_Case {
'tax_rate_compound' => '0',
'tax_rate_shipping' => '1',
'tax_rate_order' => '1',
- 'tax_rate_class' => ''
+ 'tax_rate_class' => '',
);
$tax_rate_id = WC_Tax::_insert_tax_rate( $tax_rate );
@@ -198,7 +198,7 @@ class WC_Tests_Tax extends WC_Unit_Test_Case {
'state' => 'Cambs',
'postcode' => 'PE14 1XX',
'city' => 'Somewhere',
- 'tax_class' => ''
+ 'tax_class' => '',
) );
$calced_tax = WC_Tax::calc_tax( '9.99', $tax_rates, true, false );
@@ -233,7 +233,7 @@ class WC_Tests_Tax extends WC_Unit_Test_Case {
'tax_rate_compound' => '0',
'tax_rate_shipping' => '1',
'tax_rate_order' => '1',
- 'tax_rate_class' => ''
+ 'tax_rate_class' => '',
);
$tax_rate_2 = array(
@@ -245,7 +245,7 @@ class WC_Tests_Tax extends WC_Unit_Test_Case {
'tax_rate_compound' => '1',
'tax_rate_shipping' => '1',
'tax_rate_order' => '2',
- 'tax_rate_class' => ''
+ 'tax_rate_class' => '',
);
$tax_rate_1_id = WC_Tax::_insert_tax_rate( $tax_rate_1 );
@@ -256,7 +256,7 @@ class WC_Tests_Tax extends WC_Unit_Test_Case {
'state' => 'QC',
'postcode' => '12345',
'city' => '',
- 'tax_class' => ''
+ 'tax_class' => '',
) );
// prices exclusive of tax
@@ -298,7 +298,7 @@ class WC_Tests_Tax extends WC_Unit_Test_Case {
'tax_rate_compound' => '0',
'tax_rate_shipping' => '1',
'tax_rate_order' => '1',
- 'tax_rate_class' => ''
+ 'tax_rate_class' => '',
);
$tax_rate_id = WC_Tax::_insert_tax_rate( $tax_rate );
@@ -308,7 +308,7 @@ class WC_Tests_Tax extends WC_Unit_Test_Case {
'state' => 'Cambs',
'postcode' => 'PE14 1XX',
'city' => 'Somewhere',
- 'tax_class' => ''
+ 'tax_class' => '',
) );
$calced_tax = WC_Tax::calc_shipping_tax( '10', $tax_rates );
@@ -333,7 +333,7 @@ class WC_Tests_Tax extends WC_Unit_Test_Case {
'tax_rate_compound' => '1',
'tax_rate_shipping' => '1',
'tax_rate_order' => '1',
- 'tax_rate_class' => ''
+ 'tax_rate_class' => '',
);
$tax_rate_id = WC_Tax::_insert_tax_rate( $tax_rate );
@@ -358,7 +358,7 @@ class WC_Tests_Tax extends WC_Unit_Test_Case {
'tax_rate_compound' => '1',
'tax_rate_shipping' => '1',
'tax_rate_order' => '1',
- 'tax_rate_class' => ''
+ 'tax_rate_class' => '',
);
$tax_rate_id = WC_Tax::_insert_tax_rate( $tax_rate );
@@ -383,7 +383,7 @@ class WC_Tests_Tax extends WC_Unit_Test_Case {
'tax_rate_compound' => '1',
'tax_rate_shipping' => '1',
'tax_rate_order' => '1',
- 'tax_rate_class' => ''
+ 'tax_rate_class' => '',
);
$tax_rate_id = WC_Tax::_insert_tax_rate( $tax_rate );
@@ -408,7 +408,7 @@ class WC_Tests_Tax extends WC_Unit_Test_Case {
'tax_rate_compound' => '1',
'tax_rate_shipping' => '1',
'tax_rate_order' => '1',
- 'tax_rate_class' => ''
+ 'tax_rate_class' => '',
);
$tax_rate_id = WC_Tax::_insert_tax_rate( $tax_rate );
@@ -462,7 +462,7 @@ class WC_Tests_Tax extends WC_Unit_Test_Case {
'tax_rate_compound' => '0',
'tax_rate_shipping' => '1',
'tax_rate_order' => '1',
- 'tax_rate_class' => ''
+ 'tax_rate_class' => '',
);
// Run function
@@ -501,7 +501,7 @@ class WC_Tests_Tax extends WC_Unit_Test_Case {
'tax_rate_compound' => '0',
'tax_rate_shipping' => '1',
'tax_rate_order' => '1',
- 'tax_rate_class' => ''
+ 'tax_rate_class' => '',
);
// Run function
@@ -509,7 +509,7 @@ class WC_Tests_Tax extends WC_Unit_Test_Case {
// Update a rate
$tax_rate = array(
- 'tax_rate_country' => 'US'
+ 'tax_rate_country' => 'US',
);
// Run function
@@ -536,7 +536,7 @@ class WC_Tests_Tax extends WC_Unit_Test_Case {
'tax_rate_compound' => '0',
'tax_rate_shipping' => '1',
'tax_rate_order' => '1',
- 'tax_rate_class' => ''
+ 'tax_rate_class' => '',
);
// Run function
@@ -566,7 +566,7 @@ class WC_Tests_Tax extends WC_Unit_Test_Case {
'tax_rate_compound' => '0',
'tax_rate_shipping' => '1',
'tax_rate_order' => '1',
- 'tax_rate_class' => ''
+ 'tax_rate_class' => '',
);
// Run function
@@ -597,7 +597,7 @@ class WC_Tests_Tax extends WC_Unit_Test_Case {
'tax_rate_compound' => '0',
'tax_rate_shipping' => '1',
'tax_rate_order' => '1',
- 'tax_rate_class' => ''
+ 'tax_rate_class' => '',
);
// Run function
diff --git a/woocommerce.php b/woocommerce.php
index 9950a8bed6b..81def87cf83 100644
--- a/woocommerce.php
+++ b/woocommerce.php
@@ -469,7 +469,7 @@ final class WooCommerce {
'fields' => 'ids',
'post_type' => 'shop_webhook',
'post_status' => 'publish',
- 'posts_per_page' => -1
+ 'posts_per_page' => -1,
) );
set_transient( 'woocommerce_webhook_ids', $webhooks );
}