diff --git a/apigen/hook-docs.php b/apigen/hook-docs.php index cb6aeecc800..0c5f7fd19b0 100644 --- a/apigen/hook-docs.php +++ b/apigen/hook-docs.php @@ -169,7 +169,7 @@ class WC_HookFinder { 'class' => $current_class, 'function' => $current_function, 'file' => array( self::$current_file ), - 'type' => $token_type + 'type' => $token_type, ); } break; diff --git a/i18n/locale-info.php b/i18n/locale-info.php index ddc55d93b9e..58bc2cb5154 100644 --- a/i18n/locale-info.php +++ b/i18n/locale-info.php @@ -15,10 +15,10 @@ return array( 'state' => '', 'rate' => '10.0000', 'name' => 'GST', - 'shipping' => true + 'shipping' => true, ) - ) - ) + ), + ), ), 'BD' => array( 'currency_code' => 'BDT', @@ -35,10 +35,10 @@ return array( 'state' => '', 'rate' => '15.0000', 'name' => 'VAT', - 'shipping' => true + 'shipping' => true, ) - ) - ) + ), + ), ), 'BE' => array( 'currency_code' => 'EUR', @@ -55,10 +55,10 @@ return array( 'state' => '', 'rate' => '20.0000', 'name' => 'BTW', - 'shipping' => true + 'shipping' => true, ) - ) - ) + ), + ), ), 'BR' => array( 'currency_code' => 'BRL', @@ -68,7 +68,7 @@ return array( 'num_decimals' => 2, 'weight_unit' => 'kg', 'dimension_unit' => 'cm', - 'tax_rates' => array() + 'tax_rates' => array(), ), 'CA' => array( 'currency_code' => 'CAD', @@ -86,7 +86,7 @@ return array( 'rate' => '7.0000', 'name' => _x( 'PST', 'Canadian Tax Rates', 'woocommerce' ), 'shipping' => false, - 'priority' => 2 + 'priority' => 2, ) ), 'SK' => array( @@ -96,7 +96,7 @@ return array( 'rate' => '5.0000', 'name' => _x( 'PST', 'Canadian Tax Rates', 'woocommerce' ), 'shipping' => false, - 'priority' => 2 + 'priority' => 2, ) ), 'MB' => array( @@ -106,7 +106,7 @@ return array( 'rate' => '8.0000', 'name' => _x( 'PST', 'Canadian Tax Rates', 'woocommerce' ), 'shipping' => false, - 'priority' => 2 + 'priority' => 2, ) ), 'QC' => array( @@ -116,7 +116,7 @@ return array( 'rate' => '9.975', 'name' => _x( 'QST', 'Canadian Tax Rates', 'woocommerce' ), 'shipping' => false, - 'priority' => 2 + 'priority' => 2, ) ), '*' => array( @@ -125,94 +125,94 @@ return array( 'state' => 'ON', 'rate' => '13.0000', 'name' => _x( 'HST', 'Canadian Tax Rates', 'woocommerce' ), - 'shipping' => true + 'shipping' => true, ), array( 'country' => 'CA', 'state' => 'NL', 'rate' => '13.0000', 'name' => _x( 'HST', 'Canadian Tax Rates', 'woocommerce' ), - 'shipping' => true + 'shipping' => true, ), array( 'country' => 'CA', 'state' => 'NB', 'rate' => '13.0000', 'name' => _x( 'HST', 'Canadian Tax Rates', 'woocommerce' ), - 'shipping' => true + 'shipping' => true, ), array( 'country' => 'CA', 'state' => 'PE', 'rate' => '14.0000', 'name' => _x( 'HST', 'Canadian Tax Rates', 'woocommerce' ), - 'shipping' => true + 'shipping' => true, ), array( 'country' => 'CA', 'state' => 'NS', 'rate' => '15.0000', 'name' => _x( 'HST', 'Canadian Tax Rates', 'woocommerce' ), - 'shipping' => true + 'shipping' => true, ), array( 'country' => 'CA', 'state' => 'AB', 'rate' => '5.0000', 'name' => _x( 'GST', 'Canadian Tax Rates', 'woocommerce' ), - 'shipping' => true + 'shipping' => true, ), array( 'country' => 'CA', 'state' => 'BC', 'rate' => '5.0000', 'name' => _x( 'GST', 'Canadian Tax Rates', 'woocommerce' ), - 'shipping' => true + 'shipping' => true, ), array( 'country' => 'CA', 'state' => 'NT', 'rate' => '5.0000', 'name' => _x( 'GST', 'Canadian Tax Rates', 'woocommerce' ), - 'shipping' => true + 'shipping' => true, ), array( 'country' => 'CA', 'state' => 'NU', 'rate' => '5.0000', 'name' => _x( 'GST', 'Canadian Tax Rates', 'woocommerce' ), - 'shipping' => true + 'shipping' => true, ), array( 'country' => 'CA', 'state' => 'YT', 'rate' => '5.0000', 'name' => _x( 'GST', 'Canadian Tax Rates', 'woocommerce' ), - 'shipping' => true + 'shipping' => true, ), array( 'country' => 'CA', 'state' => 'SK', 'rate' => '5.0000', 'name' => _x( 'GST', 'Canadian Tax Rates', 'woocommerce' ), - 'shipping' => true + 'shipping' => true, ), array( 'country' => 'CA', 'state' => 'MB', 'rate' => '5.0000', 'name' => _x( 'GST', 'Canadian Tax Rates', 'woocommerce' ), - 'shipping' => true + 'shipping' => true, ), array( 'country' => 'CA', 'state' => 'QC', 'rate' => '5.0000', 'name' => _x( 'GST', 'Canadian Tax Rates', 'woocommerce' ), - 'shipping' => true + 'shipping' => true, ) - ) - ) + ), + ), ), 'DE' => array( 'currency_code' => 'EUR', @@ -229,10 +229,10 @@ return array( 'state' => '', 'rate' => '19.0000', 'name' => 'Mwst.', - 'shipping' => true + 'shipping' => true, ) - ) - ) + ), + ), ), 'ES' => array( 'currency_code' => 'EUR', @@ -249,10 +249,10 @@ return array( 'state' => '', 'rate' => '21.0000', 'name' => 'VAT', - 'shipping' => true + 'shipping' => true, ) - ) - ) + ), + ), ), 'FR' => array( 'currency_code' => 'EUR', @@ -269,10 +269,10 @@ return array( 'state' => '', 'rate' => '20.0000', 'name' => 'VAT', - 'shipping' => true + 'shipping' => true, ) - ) - ) + ), + ), ), 'GB' => array( 'currency_code' => 'GBP', @@ -289,10 +289,10 @@ return array( 'state' => '', 'rate' => '20.0000', 'name' => 'VAT', - 'shipping' => true + 'shipping' => true, ) - ) - ) + ), + ), ), 'HU' => array( 'currency_code' => 'HUF', @@ -309,10 +309,10 @@ return array( 'state' => '', 'rate' => '27.0000', 'name' => 'ÁFA', - 'shipping' => true + 'shipping' => true, ) - ) - ) + ), + ), ), 'IT' => array( 'currency_code' => 'EUR', @@ -329,10 +329,10 @@ return array( 'state' => '', 'rate' => '22.0000', 'name' => 'IVA', - 'shipping' => true + 'shipping' => true, ) - ) - ) + ), + ), ), 'JP' => array( 'currency_code' => 'JPY', @@ -349,10 +349,10 @@ return array( 'state' => '', 'rate' => '8.0000', 'name' => __( 'Consumption tax', 'woocommerce' ), - 'shipping' => true + 'shipping' => true, ) - ) - ) + ), + ), ), 'NL' => array( 'currency_code' => 'EUR', @@ -369,10 +369,10 @@ return array( 'state' => '', 'rate' => '21.0000', 'name' => 'VAT', - 'shipping' => true + 'shipping' => true, ) - ) - ) + ), + ), ), 'NO' => array( 'currency_code' => 'Kr', @@ -389,10 +389,10 @@ return array( 'state' => '', 'rate' => '25.0000', 'name' => 'MVA', - 'shipping' => true + 'shipping' => true, ) - ) - ) + ), + ), ), 'NP' => array( 'currency_code' => 'NPR', @@ -409,10 +409,10 @@ return array( 'state' => '', 'rate' => '13.0000', 'name' => 'VAT', - 'shipping' => true + 'shipping' => true, ) - ) - ) + ), + ), ), 'PL' => array( 'currency_code' => 'PLN', @@ -429,10 +429,10 @@ return array( 'state' => '', 'rate' => '23.0000', 'name' => 'VAT', - 'shipping' => true + 'shipping' => true, ) - ) - ) + ), + ), ), 'TH' => array( 'currency_code' => 'THB', @@ -449,10 +449,10 @@ return array( 'state' => '', 'rate' => '7.0000', 'name' => 'VAT', - 'shipping' => true + 'shipping' => true, ) - ) - ) + ), + ), ), 'TR' => array( 'currency_code' => 'TRY', @@ -469,10 +469,10 @@ return array( 'state' => '', 'rate' => '18.0000', 'name' => 'KDV', - 'shipping' => true + 'shipping' => true, ) - ) - ) + ), + ), ), 'US' => array( 'currency_code' => 'USD', @@ -489,7 +489,7 @@ return array( 'state' => 'AL', 'rate' => '4.0000', 'name' => 'State Tax', - 'shipping' => false + 'shipping' => false, ) ), 'AZ' => array( @@ -498,7 +498,7 @@ return array( 'state' => 'AZ', 'rate' => '5.6000', 'name' => 'State Tax', - 'shipping' => false + 'shipping' => false, ) ), 'AR' => array( @@ -507,7 +507,7 @@ return array( 'state' => 'AR', 'rate' => '6.5000', 'name' => 'State Tax', - 'shipping' => true + 'shipping' => true, ) ), 'CA' => array( @@ -516,7 +516,7 @@ return array( 'state' => 'CA', 'rate' => '7.5000', 'name' => 'State Tax', - 'shipping' => false + 'shipping' => false, ) ), 'CO' => array( @@ -525,7 +525,7 @@ return array( 'state' => 'CO', 'rate' => '2.9000', 'name' => 'State Tax', - 'shipping' => false + 'shipping' => false, ) ), 'CT' => array( @@ -534,7 +534,7 @@ return array( 'state' => 'CT', 'rate' => '6.3500', 'name' => 'State Tax', - 'shipping' => true + 'shipping' => true, ) ), 'DC' => array( @@ -543,7 +543,7 @@ return array( 'state' => 'DC', 'rate' => '5.7500', 'name' => 'State Tax', - 'shipping' => true + 'shipping' => true, ) ), 'FL' => array( @@ -552,7 +552,7 @@ return array( 'state' => 'FL', 'rate' => '6.0000', 'name' => 'State Tax', - 'shipping' => true + 'shipping' => true, ) ), 'GA' => array( @@ -561,7 +561,7 @@ return array( 'state' => 'GA', 'rate' => '4.0000', 'name' => 'State Tax', - 'shipping' => true + 'shipping' => true, ) ), 'GU' => array( @@ -570,7 +570,7 @@ return array( 'state' => 'GU', 'rate' => '4.0000', 'name' => 'State Tax', - 'shipping' => false + 'shipping' => false, ) ), 'HI' => array( @@ -579,7 +579,7 @@ return array( 'state' => 'HI', 'rate' => '4.0000', 'name' => 'State Tax', - 'shipping' => true + 'shipping' => true, ) ), 'ID' => array( @@ -588,7 +588,7 @@ return array( 'state' => 'ID', 'rate' => '6.0000', 'name' => 'State Tax', - 'shipping' => false + 'shipping' => false, ) ), 'IL' => array( @@ -597,7 +597,7 @@ return array( 'state' => 'IL', 'rate' => '6.2500', 'name' => 'State Tax', - 'shipping' => false + 'shipping' => false, ) ), 'IN' => array( @@ -606,7 +606,7 @@ return array( 'state' => 'IN', 'rate' => '7.0000', 'name' => 'State Tax', - 'shipping' => false + 'shipping' => false, ) ), 'IA' => array( @@ -615,7 +615,7 @@ return array( 'state' => 'IA', 'rate' => '6.0000', 'name' => 'State Tax', - 'shipping' => false + 'shipping' => false, ) ), 'KS' => array( @@ -624,7 +624,7 @@ return array( 'state' => 'KS', 'rate' => '6.1500', 'name' => 'State Tax', - 'shipping' => true + 'shipping' => true, ) ), 'KY' => array( @@ -633,7 +633,7 @@ return array( 'state' => 'KY', 'rate' => '6.0000', 'name' => 'State Tax', - 'shipping' => true + 'shipping' => true, ) ), 'LA' => array( @@ -642,7 +642,7 @@ return array( 'state' => 'LA', 'rate' => '4.0000', 'name' => 'State Tax', - 'shipping' => false + 'shipping' => false, ) ), 'ME' => array( @@ -651,7 +651,7 @@ return array( 'state' => 'ME', 'rate' => '5.5000', 'name' => 'State Tax', - 'shipping' => false + 'shipping' => false, ) ), 'MD' => array( @@ -660,7 +660,7 @@ return array( 'state' => 'MD', 'rate' => '6.0000', 'name' => 'State Tax', - 'shipping' => false + 'shipping' => false, ) ), 'MA' => array( @@ -669,7 +669,7 @@ return array( 'state' => 'MA', 'rate' => '6.2500', 'name' => 'State Tax', - 'shipping' => false + 'shipping' => false, ) ), 'MI' => array( @@ -678,7 +678,7 @@ return array( 'state' => 'MI', 'rate' => '6.0000', 'name' => 'State Tax', - 'shipping' => true + 'shipping' => true, ) ), 'MN' => array( @@ -687,7 +687,7 @@ return array( 'state' => 'MN', 'rate' => '6.8750', 'name' => 'State Tax', - 'shipping' => true + 'shipping' => true, ) ), 'MS' => array( @@ -696,7 +696,7 @@ return array( 'state' => 'MS', 'rate' => '7.0000', 'name' => 'State Tax', - 'shipping' => true + 'shipping' => true, ) ), 'MO' => array( @@ -705,7 +705,7 @@ return array( 'state' => 'MO', 'rate' => '4.225', 'name' => 'State Tax', - 'shipping' => false + 'shipping' => false, ) ), 'NE' => array( @@ -714,7 +714,7 @@ return array( 'state' => 'NE', 'rate' => '5.5000', 'name' => 'State Tax', - 'shipping' => true + 'shipping' => true, ) ), 'NV' => array( @@ -723,7 +723,7 @@ return array( 'state' => 'NV', 'rate' => '6.8500', 'name' => 'State Tax', - 'shipping' => false + 'shipping' => false, ) ), 'NJ' => array( @@ -732,7 +732,7 @@ return array( 'state' => 'NJ', 'rate' => '7.0000', 'name' => 'State Tax', - 'shipping' => true + 'shipping' => true, ) ), 'NM' => array( @@ -741,7 +741,7 @@ return array( 'state' => 'NM', 'rate' => '5.1250', 'name' => 'State Tax', - 'shipping' => true + 'shipping' => true, ) ), 'NY' => array( @@ -750,7 +750,7 @@ return array( 'state' => 'NY', 'rate' => '4.0000', 'name' => 'State Tax', - 'shipping' => true + 'shipping' => true, ) ), 'NC' => array( @@ -759,7 +759,7 @@ return array( 'state' => 'NC', 'rate' => '4.7500', 'name' => 'State Tax', - 'shipping' => true + 'shipping' => true, ) ), 'ND' => array( @@ -768,7 +768,7 @@ return array( 'state' => 'ND', 'rate' => '5.0000', 'name' => 'State Tax', - 'shipping' => true + 'shipping' => true, ) ), 'OH' => array( @@ -777,7 +777,7 @@ return array( 'state' => 'OH', 'rate' => '5.7500', 'name' => 'State Tax', - 'shipping' => true + 'shipping' => true, ) ), 'OK' => array( @@ -786,7 +786,7 @@ return array( 'state' => 'OK', 'rate' => '4.5000', 'name' => 'State Tax', - 'shipping' => false + 'shipping' => false, ) ), 'PA' => array( @@ -795,7 +795,7 @@ return array( 'state' => 'PA', 'rate' => '6.0000', 'name' => 'State Tax', - 'shipping' => true + 'shipping' => true, ) ), 'PR' => array( @@ -804,7 +804,7 @@ return array( 'state' => 'PR', 'rate' => '6.0000', 'name' => 'State Tax', - 'shipping' => false + 'shipping' => false, ) ), 'RI' => array( @@ -813,7 +813,7 @@ return array( 'state' => 'RI', 'rate' => '7.0000', 'name' => 'State Tax', - 'shipping' => false + 'shipping' => false, ) ), 'SC' => array( @@ -822,7 +822,7 @@ return array( 'state' => 'SC', 'rate' => '6.0000', 'name' => 'State Tax', - 'shipping' => true + 'shipping' => true, ) ), 'SD' => array( @@ -831,7 +831,7 @@ return array( 'state' => 'SD', 'rate' => '4.0000', 'name' => 'State Tax', - 'shipping' => true + 'shipping' => true, ) ), 'TN' => array( @@ -840,7 +840,7 @@ return array( 'state' => 'TN', 'rate' => '7.0000', 'name' => 'State Tax', - 'shipping' => true + 'shipping' => true, ) ), 'TX' => array( @@ -849,7 +849,7 @@ return array( 'state' => 'TX', 'rate' => '6.2500', 'name' => 'State Tax', - 'shipping' => true + 'shipping' => true, ) ), 'UT' => array( @@ -858,7 +858,7 @@ return array( 'state' => 'UT', 'rate' => '5.9500', 'name' => 'State Tax', - 'shipping' => false + 'shipping' => false, ) ), 'VT' => array( @@ -867,7 +867,7 @@ return array( 'state' => 'VT', 'rate' => '6.0000', 'name' => 'State Tax', - 'shipping' => true + 'shipping' => true, ) ), 'VA' => array( @@ -876,7 +876,7 @@ return array( 'state' => 'VA', 'rate' => '5.3000', 'name' => 'State Tax', - 'shipping' => false + 'shipping' => false, ) ), 'WA' => array( @@ -885,7 +885,7 @@ return array( 'state' => 'WA', 'rate' => '6.5000', 'name' => 'State Tax', - 'shipping' => true + 'shipping' => true, ) ), 'WV' => array( @@ -894,7 +894,7 @@ return array( 'state' => 'WV', 'rate' => '6.0000', 'name' => 'State Tax', - 'shipping' => true + 'shipping' => true, ) ), 'WI' => array( @@ -903,7 +903,7 @@ return array( 'state' => 'WI', 'rate' => '5.0000', 'name' => 'State Tax', - 'shipping' => true + 'shipping' => true, ) ), 'WY' => array( @@ -912,10 +912,10 @@ return array( 'state' => 'WY', 'rate' => '4.0000', 'name' => 'State Tax', - 'shipping' => true + 'shipping' => true, ) - ) - ) + ), + ), ), 'ZA' => array( 'currency_code' => 'ZAR', @@ -932,9 +932,9 @@ return array( 'state' => '', 'rate' => '14.0000', 'name' => 'VAT', - 'shipping' => true + 'shipping' => true, ) - ) - ) - ) + ), + ), + ), ); diff --git a/i18n/states/AR.php b/i18n/states/AR.php index c3073582073..0abda5aa8ca 100644 --- a/i18n/states/AR.php +++ b/i18n/states/AR.php @@ -33,5 +33,5 @@ $states['AR'] = array( 'S' => __( 'Santa Fe', 'woocommerce' ), 'G' => __( 'Santiago del Estero', 'woocommerce' ), 'V' => __( 'Tierra del Fuego', 'woocommerce' ), - 'T' => __( 'Tucumán', 'woocommerce' ) + 'T' => __( 'Tucumán', 'woocommerce' ), ); diff --git a/i18n/states/AU.php b/i18n/states/AU.php index 175dc87faf4..ebdd58951d8 100644 --- a/i18n/states/AU.php +++ b/i18n/states/AU.php @@ -17,5 +17,5 @@ $states['AU'] = array( 'SA' => __( 'South Australia', 'woocommerce' ), 'TAS' => __( 'Tasmania', 'woocommerce' ), 'VIC' => __( 'Victoria', 'woocommerce' ), - 'WA' => __( 'Western Australia', 'woocommerce' ) + 'WA' => __( 'Western Australia', 'woocommerce' ), ); diff --git a/i18n/states/BD.php b/i18n/states/BD.php index d140e9636a8..0237a6702a7 100644 --- a/i18n/states/BD.php +++ b/i18n/states/BD.php @@ -73,5 +73,5 @@ $states['BD'] = array( 'SUN' => __( 'Sunamganj', 'woocommerce' ), 'SYL' => __( 'Sylhet', 'woocommerce' ), 'TAN' => __( 'Tangail', 'woocommerce' ), - 'THA' => __( 'Thakurgaon', 'woocommerce' ) + 'THA' => __( 'Thakurgaon', 'woocommerce' ), ); diff --git a/i18n/states/BR.php b/i18n/states/BR.php index 9e0097b63b4..0e12adc4724 100644 --- a/i18n/states/BR.php +++ b/i18n/states/BR.php @@ -36,5 +36,5 @@ $states['BR'] = array( 'SC' => __( 'Santa Catarina', 'woocommerce' ), 'SP' => __( 'São Paulo', 'woocommerce' ), 'SE' => __( 'Sergipe', 'woocommerce' ), - 'TO' => __( 'Tocantins', 'woocommerce' ) + 'TO' => __( 'Tocantins', 'woocommerce' ), ); diff --git a/i18n/states/CA.php b/i18n/states/CA.php index f42d407485b..6a845bd9107 100644 --- a/i18n/states/CA.php +++ b/i18n/states/CA.php @@ -22,5 +22,5 @@ $states['CA'] = array( 'PE' => __( 'Prince Edward Island', 'woocommerce' ), 'QC' => __( 'Quebec', 'woocommerce' ), 'SK' => __( 'Saskatchewan', 'woocommerce' ), - 'YT' => __( 'Yukon Territory', 'woocommerce' ) + 'YT' => __( 'Yukon Territory', 'woocommerce' ), ); diff --git a/i18n/states/CN.php b/i18n/states/CN.php index 4f8a85d4190..a25c053bc96 100644 --- a/i18n/states/CN.php +++ b/i18n/states/CN.php @@ -41,5 +41,5 @@ $states['CN'] = array( 'CN29' => __( 'Ningxia Hui / 宁夏', 'woocommerce' ), 'CN30' => __( 'Macau / 澳门', 'woocommerce' ), 'CN31' => __( 'Tibet / 西藏', 'woocommerce' ), - 'CN32' => __( 'Xinjiang / 新疆', 'woocommerce' ) + 'CN32' => __( 'Xinjiang / 新疆', 'woocommerce' ), ); diff --git a/i18n/states/ES.php b/i18n/states/ES.php index 64ea9ced467..4eb789af326 100644 --- a/i18n/states/ES.php +++ b/i18n/states/ES.php @@ -61,5 +61,5 @@ $states['ES'] = array( 'VA' => __( 'Valladolid', 'woocommerce' ), 'BI' => __( 'Bizkaia', 'woocommerce' ), 'ZA' => __( 'Zamora', 'woocommerce' ), - 'Z' => __( 'Zaragoza', 'woocommerce' ) + 'Z' => __( 'Zaragoza', 'woocommerce' ), ); diff --git a/i18n/states/GR.php b/i18n/states/GR.php index 0184ab52159..928774eb730 100644 --- a/i18n/states/GR.php +++ b/i18n/states/GR.php @@ -22,5 +22,5 @@ $states['GR'] = array( 'J' => __( 'Πελοπόννησος', 'woocommerce' ), 'K' => __( 'Βόρειο Αιγαίο', 'woocommerce' ), 'L' => __( 'Νότιο Αιγαίο', 'woocommerce' ), - 'M' => __( 'Κρήτη', 'woocommerce' ) + 'M' => __( 'Κρήτη', 'woocommerce' ), ); diff --git a/i18n/states/HK.php b/i18n/states/HK.php index f55b322b42c..58262f7d5c5 100644 --- a/i18n/states/HK.php +++ b/i18n/states/HK.php @@ -12,5 +12,5 @@ global $states; $states['HK'] = array( 'HONG KONG' => __( 'Hong Kong Island', 'woocommerce' ), 'KOWLOON' => __( 'Kowloon', 'woocommerce' ), - 'NEW TERRITORIES' => __( 'New Territories', 'woocommerce' ) + 'NEW TERRITORIES' => __( 'New Territories', 'woocommerce' ), ); diff --git a/i18n/states/HU.php b/i18n/states/HU.php index 22a27b568fe..0ede9a71827 100644 --- a/i18n/states/HU.php +++ b/i18n/states/HU.php @@ -29,5 +29,5 @@ $states['HU'] = array( 'TO' => __( 'Tolna', 'woocommerce' ), 'VA' => __( 'Vas', 'woocommerce' ), 'VE' => __( 'Veszprém', 'woocommerce' ), - 'ZA' => __( 'Zala', 'woocommerce' ) + 'ZA' => __( 'Zala', 'woocommerce' ), ); diff --git a/i18n/states/ID.php b/i18n/states/ID.php index bd0c4af1293..47b6d7b339e 100644 --- a/i18n/states/ID.php +++ b/i18n/states/ID.php @@ -43,5 +43,5 @@ $states['ID'] = array( 'MA' => __( 'Maluku', 'woocommerce' ), 'MU' => __( 'Maluku Utara', 'woocommerce' ), 'PA' => __( 'Papua', 'woocommerce' ), - 'PB' => __( 'Papua Barat', 'woocommerce' ) + 'PB' => __( 'Papua Barat', 'woocommerce' ), ); diff --git a/i18n/states/IN.php b/i18n/states/IN.php index eea2e5482e1..83a0339887e 100644 --- a/i18n/states/IN.php +++ b/i18n/states/IN.php @@ -45,5 +45,5 @@ $states['IN'] = array( 'DD' => __( 'Daman and Diu', 'woocommerce' ), 'DL' => __( 'Delhi', 'woocommerce' ), 'LD' => __( 'Lakshadeep', 'woocommerce' ), - 'PY' => __( 'Pondicherry (Puducherry)', 'woocommerce' ) + 'PY' => __( 'Pondicherry (Puducherry)', 'woocommerce' ), ); diff --git a/i18n/states/IR.php b/i18n/states/IR.php index ce8ca23711e..077c1acdff0 100644 --- a/i18n/states/IR.php +++ b/i18n/states/IR.php @@ -40,5 +40,5 @@ $states['IR'] = array( 'MZN' => __( 'Mazandaran (مازندران)', 'woocommerce' ), 'MKZ' => __( 'Markazi (مرکزی)', 'woocommerce' ), 'HRZ' => __( 'Hormozgan (هرمزگان)', 'woocommerce' ), - 'SBN' => __( 'Sistan and Baluchestan (سیستان و بلوچستان)', 'woocommerce' ) + 'SBN' => __( 'Sistan and Baluchestan (سیستان و بلوچستان)', 'woocommerce' ), ); diff --git a/i18n/states/IT.php b/i18n/states/IT.php index 62a5259e520..fe60c64d4e3 100644 --- a/i18n/states/IT.php +++ b/i18n/states/IT.php @@ -119,5 +119,5 @@ $states['IT'] = array( 'VR' => __( 'Verona', 'woocommerce' ), 'VV' => __( 'Vibo Valentia', 'woocommerce' ), 'VI' => __( 'Vicenza', 'woocommerce' ), - 'VT' => __( 'Viterbo', 'woocommerce' ) + 'VT' => __( 'Viterbo', 'woocommerce' ), ); diff --git a/i18n/states/MX.php b/i18n/states/MX.php index 586c4bffc20..3739993b662 100644 --- a/i18n/states/MX.php +++ b/i18n/states/MX.php @@ -41,5 +41,5 @@ $states['MX'] = array( 'Tlaxcala' => __( 'Tlaxcala', 'woocommerce' ), 'Veracruz' => __( 'Veracruz', 'woocommerce' ), 'Yucatan' => __( 'Yucatán', 'woocommerce' ), - 'Zacatecas' => __( 'Zacatecas', 'woocommerce' ) + 'Zacatecas' => __( 'Zacatecas', 'woocommerce' ), ); diff --git a/i18n/states/MY.php b/i18n/states/MY.php index e4c69cffc87..71f56b6f5da 100644 --- a/i18n/states/MY.php +++ b/i18n/states/MY.php @@ -25,5 +25,5 @@ $states['MY'] = array( 'SGR' => __( 'Selangor', 'woocommerce' ), 'TRG' => __( 'Terengganu', 'woocommerce' ), 'PJY' => __( 'Putrajaya', 'woocommerce' ), - 'KUL' => __( 'Kuala Lumpur', 'woocommerce' ) + 'KUL' => __( 'Kuala Lumpur', 'woocommerce' ), ); diff --git a/i18n/states/NP.php b/i18n/states/NP.php index 19836c87512..c7e3b9acdf6 100644 --- a/i18n/states/NP.php +++ b/i18n/states/NP.php @@ -23,5 +23,5 @@ $states['NP'] = array( 'NAR' => __( 'Narayani', 'woocommerce' ), 'RAP' => __( 'Rapti', 'woocommerce' ), 'SAG' => __( 'Sagarmatha', 'woocommerce' ), - 'SET' => __( 'Seti', 'woocommerce' ) + 'SET' => __( 'Seti', 'woocommerce' ), ); diff --git a/i18n/states/PE.php b/i18n/states/PE.php index 16febc94428..167ca246e42 100644 --- a/i18n/states/PE.php +++ b/i18n/states/PE.php @@ -35,5 +35,5 @@ $states['PE'] = array( 'SAM' => __( 'San Martín', 'woocommerce' ), 'TAC' => __( 'Tacna', 'woocommerce' ), 'TUM' => __( 'Tumbes', 'woocommerce' ), - 'UCA' => __( 'Ucayali', 'woocommerce' ) + 'UCA' => __( 'Ucayali', 'woocommerce' ), ); diff --git a/i18n/states/TH.php b/i18n/states/TH.php index 22be37d40aa..a6b68223097 100644 --- a/i18n/states/TH.php +++ b/i18n/states/TH.php @@ -86,5 +86,5 @@ $states['TH'] = array( 'TH-61' => __( 'Uthai Thani (อุทัยธานี)', 'woocommerce' ), 'TH-53' => __( 'Uttaradit (อุตรดิตถ์)', 'woocommerce' ), 'TH-95' => __( 'Yala (ยะลา)', 'woocommerce' ), - 'TH-35' => __( 'Yasothon (ยโสธร)', 'woocommerce' ) + 'TH-35' => __( 'Yasothon (ยโสธร)', 'woocommerce' ), ); diff --git a/i18n/states/ZA.php b/i18n/states/ZA.php index c157bcf2fb0..fee5aff5a87 100644 --- a/i18n/states/ZA.php +++ b/i18n/states/ZA.php @@ -18,5 +18,5 @@ $states['ZA'] = array( 'MP' => __( 'Mpumalanga', 'woocommerce' ), 'NC' => __( 'Northern Cape', 'woocommerce' ), 'NW' => __( 'North West', 'woocommerce' ), - 'WC' => __( 'Western Cape', 'woocommerce' ) + 'WC' => __( 'Western Cape', 'woocommerce' ), ); diff --git a/includes/abstracts/abstract-wc-order.php b/includes/abstracts/abstract-wc-order.php index 207cc99ac82..f8b5bfc5450 100644 --- a/includes/abstracts/abstract-wc-order.php +++ b/includes/abstracts/abstract-wc-order.php @@ -243,7 +243,7 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order { 'post_parent' => $this->get_parent_id(), ), array( - 'ID' => $order_id + 'ID' => $order_id, ) ); @@ -625,7 +625,7 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order { return array( 'from' => $old_status, - 'to' => $new_status + 'to' => $new_status, ); } @@ -1586,7 +1586,7 @@ abstract class WC_Abstract_Order extends WC_Abstract_Legacy_Order { } $total_rows[ 'fee_' . $fee->get_id() ] = array( 'label' => $fee->get_name() . ':', - 'value' => wc_price( 'excl' === $tax_display ? $fee->get_total() : $fee->get_total() + $fee->get_total_tax(), array('currency' => $this->get_currency()) ) + 'value' => wc_price( 'excl' === $tax_display ? $fee->get_total() : $fee->get_total() + $fee->get_total_tax(), array('currency' => $this->get_currency()) ), ); } } diff --git a/includes/abstracts/abstract-wc-product.php b/includes/abstracts/abstract-wc-product.php index c420b294df8..cb765a25518 100644 --- a/includes/abstracts/abstract-wc-product.php +++ b/includes/abstracts/abstract-wc-product.php @@ -400,7 +400,7 @@ class WC_Product { if ( ! is_array( $file ) ) { $downloadable_files[ $key ] = array( 'file' => $file, - 'name' => '' + 'name' => '', ); } @@ -1524,7 +1524,7 @@ class WC_Product { */ public function list_attributes() { wc_get_template( 'single-product/product-attributes.php', array( - 'product' => $this + 'product' => $this, ) ); } diff --git a/includes/abstracts/abstract-wc-settings-api.php b/includes/abstracts/abstract-wc-settings-api.php index 088ae95d105..ff62d47d936 100644 --- a/includes/abstracts/abstract-wc-settings-api.php +++ b/includes/abstracts/abstract-wc-settings-api.php @@ -838,7 +838,7 @@ abstract class WC_Settings_API { return wp_kses( trim( stripslashes( $value ) ), array_merge( array( - 'iframe' => array( 'src' => true, 'style' => true, 'id' => true, 'class' => true ) + 'iframe' => array( 'src' => true, 'style' => true, 'id' => true, 'class' => true ), ), wp_kses_allowed_html( 'post' ) ) diff --git a/includes/abstracts/abstract-wc-widget.php b/includes/abstracts/abstract-wc-widget.php index cd42b451218..dc54788689d 100644 --- a/includes/abstracts/abstract-wc-widget.php +++ b/includes/abstracts/abstract-wc-widget.php @@ -52,7 +52,7 @@ abstract class WC_Widget extends WP_Widget { $widget_ops = array( 'classname' => $this->widget_cssclass, 'description' => $this->widget_description, - 'customize_selective_refresh' => true + 'customize_selective_refresh' => true, ); parent::__construct( $this->widget_id, $this->widget_name, $widget_ops ); diff --git a/includes/admin/class-wc-admin-api-keys-table-list.php b/includes/admin/class-wc-admin-api-keys-table-list.php index 952e5a46c41..a228aa37176 100644 --- a/includes/admin/class-wc-admin-api-keys-table-list.php +++ b/includes/admin/class-wc-admin-api-keys-table-list.php @@ -25,7 +25,7 @@ class WC_Admin_API_Keys_Table_List extends WP_List_Table { parent::__construct( array( 'singular' => __( 'key', 'woocommerce' ), 'plural' => __( 'keys', 'woocommerce' ), - 'ajax' => false + 'ajax' => false, ) ); } @@ -41,7 +41,7 @@ class WC_Admin_API_Keys_Table_List extends WP_List_Table { 'truncated_key' => __( 'Consumer Key Ending In', 'woocommerce' ), 'user' => __( 'User', 'woocommerce' ), 'permissions' => __( 'Permissions', 'woocommerce' ), - 'last_access' => __( 'Last Access', 'woocommerce' ) + 'last_access' => __( 'Last Access', 'woocommerce' ), ); } @@ -78,7 +78,7 @@ class WC_Admin_API_Keys_Table_List extends WP_List_Table { $actions = array( 'id' => sprintf( __( 'ID: %d', 'woocommerce' ), $key['key_id'] ), 'edit' => '' . __( 'View/Edit', 'woocommerce' ) . '', - 'trash' => '' . __( 'Revoke', 'woocommerce' ) . '' + 'trash' => '' . __( 'Revoke', 'woocommerce' ) . '', ); $row_actions = array(); @@ -133,7 +133,7 @@ class WC_Admin_API_Keys_Table_List extends WP_List_Table { $permissions = array( 'read' => __( 'Read', 'woocommerce' ), 'write' => __( 'Write', 'woocommerce' ), - 'read_write' => __( 'Read/Write', 'woocommerce' ) + 'read_write' => __( 'Read/Write', 'woocommerce' ), ); if ( isset( $permissions[ $permission_key ] ) ) { @@ -166,7 +166,7 @@ class WC_Admin_API_Keys_Table_List extends WP_List_Table { */ protected function get_bulk_actions() { return array( - 'revoke' => __( 'Revoke', 'woocommerce' ) + 'revoke' => __( 'Revoke', 'woocommerce' ), ); } @@ -211,7 +211,7 @@ class WC_Admin_API_Keys_Table_List extends WP_List_Table { $this->set_pagination_args( array( 'total_items' => $count, 'per_page' => $per_page, - 'total_pages' => ceil( $count / $per_page ) + 'total_pages' => ceil( $count / $per_page ), ) ); } } diff --git a/includes/admin/class-wc-admin-api-keys.php b/includes/admin/class-wc-admin-api-keys.php index 77bf52d50b9..94289cfafbf 100644 --- a/includes/admin/class-wc-admin-api-keys.php +++ b/includes/admin/class-wc-admin-api-keys.php @@ -87,7 +87,7 @@ class WC_Admin_API_Keys { 'description' => '', 'permissions' => '', 'truncated_key' => '', - 'last_access' => '' + 'last_access' => '', ); if ( 0 == $key_id ) { diff --git a/includes/admin/class-wc-admin-assets.php b/includes/admin/class-wc-admin-assets.php index ce6699bd87b..f587e8454ec 100644 --- a/includes/admin/class-wc-admin-assets.php +++ b/includes/admin/class-wc-admin-assets.php @@ -123,12 +123,12 @@ class WC_Admin_Assets { 'i18n_searching' => _x( 'Searching…', 'enhanced select', 'woocommerce' ), 'ajax_url' => admin_url( 'admin-ajax.php' ), 'search_products_nonce' => wp_create_nonce( 'search-products' ), - 'search_customers_nonce' => wp_create_nonce( 'search-customers' ) + 'search_customers_nonce' => wp_create_nonce( 'search-customers' ), ) ); // Accounting wp_localize_script( 'accounting', 'accounting_params', array( - 'mon_decimal_point' => wc_get_price_decimal_separator() + 'mon_decimal_point' => wc_get_price_decimal_separator(), ) ); // WooCommerce admin pages @@ -148,7 +148,7 @@ class WC_Admin_Assets { 'i18n_country_iso_error' => __( 'Please enter in country code with two capital letters.', 'woocommerce' ), 'i18_sale_less_than_regular_error' => __( 'Please enter in a value less than the regular price.', 'woocommerce' ), 'decimal_point' => $decimal, - 'mon_decimal_point' => wc_get_price_decimal_separator() + 'mon_decimal_point' => wc_get_price_decimal_separator(), ); wp_localize_script( 'woocommerce_admin', 'woocommerce_admin', $params ); @@ -202,7 +202,7 @@ class WC_Admin_Assets { 'i18n_edited_variations' => esc_js( __( 'Save changes before changing page?', 'woocommerce' ) ), 'i18n_variation_count_single' => esc_js( __( '%qty% variation', 'woocommerce' ) ), 'i18n_variation_count_plural' => esc_js( __( '%qty% variations', 'woocommerce' ) ), - 'variations_per_page' => absint( apply_filters( 'woocommerce_admin_meta_boxes_variations_per_page', 15 ) ) + 'variations_per_page' => absint( apply_filters( 'woocommerce_admin_meta_boxes_variations_per_page', 15 ) ), ); wp_localize_script( 'wc-admin-variation-meta-boxes', 'woocommerce_admin_meta_boxes_variations', $params ); @@ -213,7 +213,7 @@ class WC_Admin_Assets { $params = array( 'countries' => json_encode( array_merge( WC()->countries->get_allowed_country_states(), WC()->countries->get_shipping_country_states() ) ), - 'i18n_select_state_text' => esc_attr__( 'Select an option…', 'woocommerce' ) + 'i18n_select_state_text' => esc_attr__( 'Select an option…', 'woocommerce' ), ); wp_localize_script( 'wc-admin-order-meta-boxes', 'woocommerce_admin_meta_boxes_order', $params ); @@ -284,7 +284,7 @@ class WC_Admin_Assets { 'i18n_permission_revoke' => __( 'Are you sure you want to revoke access to this download?', 'woocommerce' ), 'i18n_tax_rate_already_exists' => __( 'You cannot add the same tax rate twice!', 'woocommerce' ), 'i18n_product_type_alert' => __( 'Your product has variations! Before changing the product type, it is a good idea to delete the variations to avoid errors in the stock reports.', 'woocommerce' ), - 'i18n_delete_note' => __( 'Are you sure you wish to delete this note? This action cannot be undone.', 'woocommerce' ) + 'i18n_delete_note' => __( 'Are you sure you wish to delete this note? This action cannot be undone.', 'woocommerce' ), ); wp_localize_script( 'wc-admin-meta-boxes', 'woocommerce_admin_meta_boxes', $params ); @@ -299,7 +299,7 @@ class WC_Admin_Assets { $taxonomy = isset( $_GET['taxonomy'] ) ? wc_clean( $_GET['taxonomy'] ) : ''; $woocommerce_term_order_params = array( - 'taxonomy' => $taxonomy + 'taxonomy' => $taxonomy, ); wp_localize_script( 'woocommerce_term_ordering', 'woocommerce_term_ordering_params', $woocommerce_term_order_params ); diff --git a/includes/admin/class-wc-admin-attributes.php b/includes/admin/class-wc-admin-attributes.php index 701d19e85bf..049a3da0eee 100644 --- a/includes/admin/class-wc-admin-attributes.php +++ b/includes/admin/class-wc-admin-attributes.php @@ -72,7 +72,7 @@ class WC_Admin_Attributes { 'attribute_name' => isset( $_POST['attribute_name'] ) ? wc_sanitize_taxonomy_name( stripslashes( $_POST['attribute_name'] ) ) : '', 'attribute_type' => isset( $_POST['attribute_type'] ) ? wc_clean( $_POST['attribute_type'] ) : 'select', 'attribute_orderby' => isset( $_POST['attribute_orderby'] ) ? wc_clean( $_POST['attribute_orderby'] ) : '', - 'attribute_public' => isset( $_POST['attribute_public'] ) ? 1 : 0 + 'attribute_public' => isset( $_POST['attribute_public'] ) ? 1 : 0, ); if ( empty( $attribute['attribute_type'] ) ) { diff --git a/includes/admin/class-wc-admin-duplicate-product.php b/includes/admin/class-wc-admin-duplicate-product.php index e13dccfb7e8..ecb496be67f 100644 --- a/includes/admin/class-wc-admin-duplicate-product.php +++ b/includes/admin/class-wc-admin-duplicate-product.php @@ -156,7 +156,7 @@ class WC_Admin_Duplicate_Product { 'post_modified_gmt' => $new_post_date_gmt, 'post_parent' => $post_parent, 'menu_order' => $post->menu_order, - 'post_mime_type' => $post->post_mime_type + 'post_mime_type' => $post->post_mime_type, ) ); @@ -171,7 +171,7 @@ class WC_Admin_Duplicate_Product { 'post_title' => $post_title, ), array( - 'ID' => $new_post_id + 'ID' => $new_post_id, ) ); } @@ -185,7 +185,7 @@ class WC_Admin_Duplicate_Product { 'guid' => get_permalink( $new_post_id ), ), array( - 'ID' => $new_post_id + 'ID' => $new_post_id, ) ); } diff --git a/includes/admin/class-wc-admin-help.php b/includes/admin/class-wc-admin-help.php index ef51726e905..6dc6df3b27a 100644 --- a/includes/admin/class-wc-admin-help.php +++ b/includes/admin/class-wc-admin-help.php @@ -39,116 +39,116 @@ class WC_Admin_Help { $video_map = array( 'wc-settings' => array( 'title' => __( 'General Settings', 'woocommerce' ), - 'url' => '//fast.wistia.net/embed/iframe/mz2l10u5f6?videoFoam=true' + 'url' => '//fast.wistia.net/embed/iframe/mz2l10u5f6?videoFoam=true', ), 'wc-settings-general' => array( 'title' => __( 'General Settings', 'woocommerce' ), - 'url' => '//fast.wistia.net/embed/iframe/mz2l10u5f6?videoFoam=true' + 'url' => '//fast.wistia.net/embed/iframe/mz2l10u5f6?videoFoam=true', ), 'wc-settings-products' => array( 'title' => __( 'Product Settings', 'woocommerce' ), - 'url' => '//fast.wistia.net/embed/iframe/lolkan4fxf?videoFoam=true' + 'url' => '//fast.wistia.net/embed/iframe/lolkan4fxf?videoFoam=true', ), 'wc-settings-tax' => array( 'title' => __( 'Tax Settings', 'woocommerce' ), - 'url' => '//fast.wistia.net/embed/iframe/qp1v19dwrh?videoFoam=true' + 'url' => '//fast.wistia.net/embed/iframe/qp1v19dwrh?videoFoam=true', ), 'wc-settings-shipping' => array( 'title' => __( 'Shipping Zones', 'woocommerce' ), - 'url' => '//fast.wistia.net/embed/iframe/95yiocro6p?videoFoam=true' + 'url' => '//fast.wistia.net/embed/iframe/95yiocro6p?videoFoam=true', ), 'wc-settings-shipping-options' => array( 'title' => __( 'Shipping Options', 'woocommerce' ), - 'url' => '//fast.wistia.net/embed/iframe/9c9008dxnr?videoFoam=true' + 'url' => '//fast.wistia.net/embed/iframe/9c9008dxnr?videoFoam=true', ), 'wc-settings-shipping-classes' => array( 'title' => __( 'Shipping Classes', 'woocommerce' ), - 'url' => '//fast.wistia.net/embed/iframe/tpqg17aq99?videoFoam=true' + 'url' => '//fast.wistia.net/embed/iframe/tpqg17aq99?videoFoam=true', ), 'wc-settings-checkout' => array( 'title' => __( 'Checkout Settings', 'woocommerce' ), - 'url' => '//fast.wistia.net/embed/iframe/65yjv96z51?videoFoam=true' + 'url' => '//fast.wistia.net/embed/iframe/65yjv96z51?videoFoam=true', ), 'wc-settings-checkout-bacs' => array( 'title' => __( 'Bank Transfer (BACS) Payments', 'woocommerce' ), - 'url' => '//fast.wistia.net/embed/iframe/dh4piy3sek?videoFoam=true' + 'url' => '//fast.wistia.net/embed/iframe/dh4piy3sek?videoFoam=true', ), 'wc-settings-checkout-cheque' => array( 'title' => __( 'Check Payments', 'woocommerce' ), - 'url' => '//fast.wistia.net/embed/iframe/u2m2kcakea?videoFoam=true' + 'url' => '//fast.wistia.net/embed/iframe/u2m2kcakea?videoFoam=true', ), 'wc-settings-checkout-cod' => array( 'title' => __( 'Cash on Delivery', 'woocommerce' ), - 'url' => '//fast.wistia.net/embed/iframe/8hyli8wu5f?videoFoam=true' + 'url' => '//fast.wistia.net/embed/iframe/8hyli8wu5f?videoFoam=true', ), 'wc-settings-checkout-paypal' => array( 'title' => __( 'PayPal Standard', 'woocommerce' ), - 'url' => '//fast.wistia.net/embed/iframe/rbl7e7l4k2?videoFoam=true' + 'url' => '//fast.wistia.net/embed/iframe/rbl7e7l4k2?videoFoam=true', ), 'wc-settings-checkout-paypalbraintree_cards' => array( 'title' => __( 'PayPal by Braintree', 'woocommerce' ), - 'url' => '//fast.wistia.net/embed/iframe/oyksirgn40?videoFoam=true' + 'url' => '//fast.wistia.net/embed/iframe/oyksirgn40?videoFoam=true', ), 'wc-settings-checkout-stripe' => array( 'title' => __( 'Stripe', 'woocommerce' ), - 'url' => '//fast.wistia.net/embed/iframe/mf975hx5de?videoFoam=true' + 'url' => '//fast.wistia.net/embed/iframe/mf975hx5de?videoFoam=true', ), 'wc-settings-checkout-simplify_commerce' => array( 'title' => __( 'Simplify Commerce', 'woocommerce' ), - 'url' => '//fast.wistia.net/embed/iframe/jdfzjiiw61?videoFoam=true' + 'url' => '//fast.wistia.net/embed/iframe/jdfzjiiw61?videoFoam=true', ), 'wc-settings-account' => array( 'title' => __( 'Account Settings', 'woocommerce' ), - 'url' => '//fast.wistia.net/embed/iframe/35mazq7il2?videoFoam=true' + 'url' => '//fast.wistia.net/embed/iframe/35mazq7il2?videoFoam=true', ), 'wc-settings-email' => array( 'title' => __( 'Email Settings', 'woocommerce' ), - 'url' => '//fast.wistia.net/embed/iframe/svcaftq4xv?videoFoam=true' + 'url' => '//fast.wistia.net/embed/iframe/svcaftq4xv?videoFoam=true', ), 'wc-settings-api' => array( 'title' => __( 'Webhook Settings', 'woocommerce' ), - 'url' => '//fast.wistia.net/embed/iframe/1q0ny74vvq?videoFoam=true' + 'url' => '//fast.wistia.net/embed/iframe/1q0ny74vvq?videoFoam=true', ), 'product' => array( 'title' => __( 'Simple Products', 'woocommerce' ), - 'url' => '//fast.wistia.net/embed/iframe/ziyjmd4kut?videoFoam=true' + 'url' => '//fast.wistia.net/embed/iframe/ziyjmd4kut?videoFoam=true', ), 'edit-product_cat' => array( 'title' => __( 'Product Categories', 'woocommerce' ), - 'url' => '//fast.wistia.net/embed/iframe/f0j5gzqigg?videoFoam=true' + 'url' => '//fast.wistia.net/embed/iframe/f0j5gzqigg?videoFoam=true', ), 'edit-product_tag' => array( 'title' => __( 'Product Categories, Tags, Shipping Classes, & Attributes', 'woocommerce' ), - 'url' => '//fast.wistia.net/embed/iframe/f0j5gzqigg?videoFoam=true' + 'url' => '//fast.wistia.net/embed/iframe/f0j5gzqigg?videoFoam=true', ), 'product_attributes' => array( 'title' => __( 'Product Categories, Tags, Shipping Classes, & Attributes', 'woocommerce' ), - 'url' => '//fast.wistia.net/embed/iframe/f0j5gzqigg?videoFoam=true' + 'url' => '//fast.wistia.net/embed/iframe/f0j5gzqigg?videoFoam=true', ), 'wc-status' => array( 'title' => __( 'System Status', 'woocommerce' ), - 'url' => '//fast.wistia.net/embed/iframe/xdn733nnhi?videoFoam=true' + 'url' => '//fast.wistia.net/embed/iframe/xdn733nnhi?videoFoam=true', ), 'wc-reports' => array( 'title' => __( 'Reports', 'woocommerce' ), - 'url' => '//fast.wistia.net/embed/iframe/6aasex0w99?videoFoam=true' + 'url' => '//fast.wistia.net/embed/iframe/6aasex0w99?videoFoam=true', ), 'edit-shop_coupon' => array( 'title' => __( 'Coupons', 'woocommerce' ), - 'url' => '//fast.wistia.net/embed/iframe/gupd4h8sit?videoFoam=true' + 'url' => '//fast.wistia.net/embed/iframe/gupd4h8sit?videoFoam=true', ), 'shop_coupon' => array( 'title' => __( 'Coupons', 'woocommerce' ), - 'url' => '//fast.wistia.net/embed/iframe/gupd4h8sit?videoFoam=true' + 'url' => '//fast.wistia.net/embed/iframe/gupd4h8sit?videoFoam=true', ), 'edit-shop_order' => array( 'title' => __( 'Managing Orders', 'woocommerce' ), - 'url' => '//fast.wistia.net/embed/iframe/n8n0sa8hee?videoFoam=true' + 'url' => '//fast.wistia.net/embed/iframe/n8n0sa8hee?videoFoam=true', ), 'shop_order' => array( 'title' => __( 'Managing Orders', 'woocommerce' ), - 'url' => '//fast.wistia.net/embed/iframe/n8n0sa8hee?videoFoam=true' - ) + 'url' => '//fast.wistia.net/embed/iframe/n8n0sa8hee?videoFoam=true', + ), ); $page = empty( $_GET['page'] ) ? '' : sanitize_title( $_GET['page'] ); @@ -172,7 +172,7 @@ class WC_Admin_Help { 'title' => __( 'WooCommerce 101', 'woocommerce' ), 'content' => '

' . __( 'WooCommerce 101', 'woocommerce' ) . ' – ' . esc_html( $video_map[ $video_key ]['title'] ) . '

' . - '' + '', ) ); } @@ -194,7 +194,7 @@ class WC_Admin_Help { '' ) . '

' . '

' . __( 'Before asking for help we recommend checking the system status page to identify any problems with your configuration.', 'woocommerce' ) . '

' . - '

' . __( 'System Status', 'woocommerce' ) . ' ' . __( 'Community Forum', 'woocommerce' ) . ' ' . __( 'WooCommerce Helpdesk', 'woocommerce' ) . '

' + '

' . __( 'System Status', 'woocommerce' ) . ' ' . __( 'Community Forum', 'woocommerce' ) . ' ' . __( 'WooCommerce Helpdesk', 'woocommerce' ) . '

', ) ); $screen->add_help_tab( array( @@ -203,7 +203,7 @@ class WC_Admin_Help { 'content' => '

' . __( 'Found a bug?', 'woocommerce' ) . '

' . '

' . sprintf( __( 'If you find a bug within WooCommerce core you can create a ticket via Github issues. Ensure you read the contribution guide prior to submitting your report. To help us solve your issue, please be as descriptive as possible and include your system status report.', 'woocommerce' ), 'https://github.com/woothemes/woocommerce/issues?state=open', 'https://github.com/woothemes/woocommerce/blob/master/.github/CONTRIBUTING.md', admin_url( 'admin.php?page=wc-status' ) ) . '

' . - '

' . __( 'Report a bug', 'woocommerce' ) . ' ' . __( 'System Status', 'woocommerce' ) . '

' + '

' . __( 'Report a bug', 'woocommerce' ) . ' ' . __( 'System Status', 'woocommerce' ) . '

', ) ); @@ -213,7 +213,7 @@ class WC_Admin_Help { 'content' => '

' . __( 'Education', 'woocommerce' ) . '

' . '

' . __( 'If you would like to learn about using WooCommerce from an expert, consider following a WooCommerce course offered by one of our educational partners.', 'woocommerce' ) . '

' . - '

' . __( 'View Education Partners', 'woocommerce' ) . '

' + '

' . __( 'View Education Partners', 'woocommerce' ) . '

', ) ); $screen->add_help_tab( array( @@ -222,7 +222,7 @@ class WC_Admin_Help { 'content' => '

' . __( 'Setup Wizard', 'woocommerce' ) . '

' . '

' . __( 'If you need to access the setup wizard again, please click on the button below.', 'woocommerce' ) . '

' . - '

' . __( 'Setup Wizard', 'woocommerce' ) . '

' + '

' . __( 'Setup Wizard', 'woocommerce' ) . '

', ) ); diff --git a/includes/admin/class-wc-admin-importers.php b/includes/admin/class-wc-admin-importers.php index d76645e8ab0..57fc71fcf03 100644 --- a/includes/admin/class-wc-admin-importers.php +++ b/includes/admin/class-wc-admin-importers.php @@ -94,7 +94,7 @@ class WC_Admin_Importers { 'attribute_name' => $attribute_name, 'attribute_type' => 'select', 'attribute_orderby' => 'menu_order', - 'attribute_public' => 0 + 'attribute_public' => 0, ); $wpdb->insert( $wpdb->prefix . 'woocommerce_attribute_taxonomies', $attribute ); delete_transient( 'wc_attribute_taxonomies' ); diff --git a/includes/admin/class-wc-admin-menus.php b/includes/admin/class-wc-admin-menus.php index 1a42abcad9b..7d7b1aa7388 100644 --- a/includes/admin/class-wc-admin-menus.php +++ b/includes/admin/class-wc-admin-menus.php @@ -325,7 +325,7 @@ class WC_Admin_Menus { 'parent' => 'site-name', 'id' => 'view-store', 'title' => __( 'Visit Store', 'woocommerce' ), - 'href' => wc_get_page_permalink( 'shop' ) + 'href' => wc_get_page_permalink( 'shop' ), ) ); } } diff --git a/includes/admin/class-wc-admin-permalink-settings.php b/includes/admin/class-wc-admin-permalink-settings.php index 8df1649d776..193843636fb 100644 --- a/includes/admin/class-wc-admin-permalink-settings.php +++ b/includes/admin/class-wc-admin-permalink-settings.php @@ -106,7 +106,7 @@ class WC_Admin_Permalink_Settings { $structures = array( 0 => '', 1 => '/' . trailingslashit( $base_slug ), - 2 => '/' . trailingslashit( $base_slug ) . trailingslashit( '%product_cat%' ) + 2 => '/' . trailingslashit( $base_slug ) . trailingslashit( '%product_cat%' ), ); ?> diff --git a/includes/admin/class-wc-admin-pointers.php b/includes/admin/class-wc-admin-pointers.php index 7fd7317a73f..7fa65b5aec3 100644 --- a/includes/admin/class-wc-admin-pointers.php +++ b/includes/admin/class-wc-admin-pointers.php @@ -54,16 +54,16 @@ class WC_Admin_Pointers { 'next' => 'content', 'next_trigger' => array( 'target' => '#title', - 'event' => 'input' + 'event' => 'input', ), 'options' => array( 'content' => '

' . esc_html__( 'Product Name', 'woocommerce' ) . '

' . '

' . esc_html__( 'Give your new product a name here. This is a required field and will be what your customers will see in your store.', 'woocommerce' ) . '

', 'position' => array( 'edge' => 'top', - 'align' => 'left' - ) - ) + 'align' => 'left', + ), + ), ), 'content' => array( 'target' => "#wp-content-editor-container", @@ -74,16 +74,16 @@ class WC_Admin_Pointers { '

' . esc_html__( 'This is your products main body of content. Here you should describe your product in detail.', 'woocommerce' ) . '

', 'position' => array( 'edge' => 'bottom', - 'align' => 'middle' - ) - ) + 'align' => 'middle', + ), + ), ), 'product-type' => array( 'target' => "#product-type", 'next' => 'virtual', 'next_trigger' => array( 'target' => "#product-type", - 'event' => 'change blur click' + 'event' => 'change blur click', ), 'options' => array( 'content' => '

' . esc_html__( 'Choose Product Type', 'woocommerce' ) . '

' . @@ -93,73 +93,73 @@ class WC_Admin_Pointers { '

' . esc_html__( 'Finally, external products are for linking off-site.', 'woocommerce' ) . '

', 'position' => array( 'edge' => 'bottom', - 'align' => 'middle' - ) - ) + 'align' => 'middle', + ), + ), ), 'virtual' => array( 'target' => "#_virtual", 'next' => 'downloadable', 'next_trigger' => array( 'target' => "#_virtual", - 'event' => 'change' + 'event' => 'change', ), 'options' => array( 'content' => '

' . esc_html__( 'Virtual Products', 'woocommerce' ) . '

' . '

' . esc_html__( 'Check the "Virtual" box if this is a non-physical item, for example a service, which does not need shipping.', 'woocommerce' ) . '

', 'position' => array( 'edge' => 'bottom', - 'align' => 'middle' - ) - ) + 'align' => 'middle', + ), + ), ), 'downloadable' => array( 'target' => "#_downloadable", 'next' => 'regular_price', 'next_trigger' => array( 'target' => "#_downloadable", - 'event' => 'change' + 'event' => 'change', ), 'options' => array( 'content' => '

' . esc_html__( 'Downloadable Products', 'woocommerce' ) . '

' . '

' . esc_html__( 'If purchasing this product gives a customer access to a downloadable file, e.g. software, check this box.', 'woocommerce' ) . '

', 'position' => array( 'edge' => 'bottom', - 'align' => 'middle' - ) - ) + 'align' => 'middle', + ), + ), ), 'regular_price' => array( 'target' => "#_regular_price", 'next' => 'postexcerpt', 'next_trigger' => array( 'target' => "#_regular_price", - 'event' => 'input' + 'event' => 'input', ), 'options' => array( 'content' => '

' . esc_html__( 'Prices', 'woocommerce' ) . '

' . '

' . esc_html__( 'Next you\'ll need to give your product a price.', 'woocommerce' ) . '

', 'position' => array( 'edge' => 'bottom', - 'align' => 'middle' - ) - ) + 'align' => 'middle', + ), + ), ), 'postexcerpt' => array( 'target' => "#postexcerpt", 'next' => 'postimagediv', 'next_trigger' => array( 'target' => "#postexcerpt", - 'event' => 'input' + 'event' => 'input', ), 'options' => array( 'content' => '

' . esc_html__( 'Product Short Description', 'woocommerce' ) . '

' . '

' . esc_html__( 'Add a quick summary for your product here. This will appear on the product page under the product name.', 'woocommerce' ) . '

', 'position' => array( 'edge' => 'bottom', - 'align' => 'middle' - ) - ) + 'align' => 'middle', + ), + ), ), 'postimagediv' => array( 'target' => "#postimagediv", @@ -169,9 +169,9 @@ class WC_Admin_Pointers { '

' . esc_html__( 'Upload or assign an image to your product here. This image will be shown in your store\'s catalog.', 'woocommerce' ) . '

', 'position' => array( 'edge' => 'right', - 'align' => 'middle' - ) - ) + 'align' => 'middle', + ), + ), ), 'product_tag' => array( 'target' => "#tagsdiv-product_tag", @@ -181,9 +181,9 @@ class WC_Admin_Pointers { '

' . esc_html__( 'You can optionally "tag" your products here. Tags as a method of labeling your products to make them easier for customers to find.', 'woocommerce' ) . '

', 'position' => array( 'edge' => 'right', - 'align' => 'middle' - ) - ) + 'align' => 'middle', + ), + ), ), 'product_catdiv' => array( 'target' => "#product_catdiv", @@ -193,9 +193,9 @@ class WC_Admin_Pointers { '

' . esc_html__( 'Optionally assign categories to your products to make them easier to browse through and find in your store.', 'woocommerce' ) . '

', 'position' => array( 'edge' => 'right', - 'align' => 'middle' - ) - ) + 'align' => 'middle', + ), + ), ), 'submitdiv' => array( 'target' => "#submitdiv", @@ -205,11 +205,11 @@ class WC_Admin_Pointers { '

' . esc_html__( 'When you are finished editing your product, hit the "Publish" button to publish your product to your store.', 'woocommerce' ) . '

', 'position' => array( 'edge' => 'right', - 'align' => 'middle' - ) - ) - ) - ) + 'align' => 'middle', + ), + ), + ), + ), ); $this->enqueue_pointers( $pointers ); diff --git a/includes/admin/class-wc-admin-post-types.php b/includes/admin/class-wc-admin-post-types.php index ab0d158d479..3df940800d7 100644 --- a/includes/admin/class-wc-admin-post-types.php +++ b/includes/admin/class-wc-admin-post-types.php @@ -150,7 +150,7 @@ class WC_Admin_Post_Types { 9 => sprintf( __( 'Order scheduled for: %1$s.', 'woocommerce' ), date_i18n( __( 'M j, Y @ G:i', 'woocommerce' ), strtotime( $post->post_date ) ) ), 10 => __( 'Order draft updated.', 'woocommerce' ), - 11 => __( 'Order updated and email sent.', 'woocommerce' ) + 11 => __( 'Order updated and email sent.', 'woocommerce' ), ); $messages['shop_coupon'] = array( @@ -165,7 +165,7 @@ class WC_Admin_Post_Types { 8 => __( 'Coupon submitted.', 'woocommerce' ), 9 => sprintf( __( 'Coupon scheduled for: %1$s.', 'woocommerce' ), date_i18n( __( 'M j, Y @ G:i', 'woocommerce' ), strtotime( $post->post_date ) ) ), - 10 => __( 'Coupon draft updated.', 'woocommerce' ) + 10 => __( 'Coupon draft updated.', 'woocommerce' ), ); return $messages; @@ -706,7 +706,7 @@ class WC_Admin_Post_Types { $latest_notes = get_comments( array( 'post_id' => $post->ID, 'number' => 1, - 'status' => $status + 'status' => $status, ) ); $latest_note = current( $latest_notes ); @@ -780,7 +780,7 @@ class WC_Admin_Post_Types { $actions['processing'] = array( 'url' => wp_nonce_url( admin_url( 'admin-ajax.php?action=woocommerce_mark_order_status&status=processing&order_id=' . $post->ID ), 'woocommerce-mark-order-status' ), 'name' => __( 'Processing', 'woocommerce' ), - 'action' => "processing" + 'action' => "processing", ); } @@ -788,14 +788,14 @@ class WC_Admin_Post_Types { $actions['complete'] = array( 'url' => wp_nonce_url( admin_url( 'admin-ajax.php?action=woocommerce_mark_order_status&status=completed&order_id=' . $post->ID ), 'woocommerce-mark-order-status' ), 'name' => __( 'Complete', 'woocommerce' ), - 'action' => "complete" + 'action' => "complete", ); } $actions['view'] = array( 'url' => admin_url( 'post.php?post=' . $post->ID . '&action=edit' ), 'name' => __( 'View', 'woocommerce' ), - 'action' => "view" + 'action' => "view", ); $actions = apply_filters( 'woocommerce_admin_order_actions', $actions, $the_order ); @@ -823,7 +823,7 @@ class WC_Admin_Post_Types { 'price' => 'price', 'featured' => array( 'featured', 1 ), 'sku' => 'sku', - 'name' => 'title' + 'name' => 'title', ); return wp_parse_args( $custom, $columns ); } @@ -848,7 +848,7 @@ class WC_Admin_Post_Types { $custom = array( 'order_title' => 'ID', 'order_total' => 'order_total', - 'order_date' => 'date' + 'order_date' => 'date', ); unset( $columns['comments'] ); @@ -1703,19 +1703,19 @@ class WC_Admin_Post_Types { if ( 'price' == $vars['orderby'] ) { $vars = array_merge( $vars, array( 'meta_key' => '_price', - 'orderby' => 'meta_value_num' + 'orderby' => 'meta_value_num', ) ); } if ( 'featured' == $vars['orderby'] ) { $vars = array_merge( $vars, array( 'meta_key' => '_featured', - 'orderby' => 'meta_value' + 'orderby' => 'meta_value', ) ); } if ( 'sku' == $vars['orderby'] ) { $vars = array_merge( $vars, array( 'meta_key' => '_sku', - 'orderby' => 'meta_value' + 'orderby' => 'meta_value', ) ); } } @@ -1735,7 +1735,7 @@ class WC_Admin_Post_Types { array( 'key' => '_customer_user', 'value' => (int) $_GET['_customer_user'], - 'compare' => '=' + 'compare' => '=', ) ); } @@ -1745,7 +1745,7 @@ class WC_Admin_Post_Types { if ( 'order_total' == $vars['orderby'] ) { $vars = array_merge( $vars, array( 'meta_key' => '_order_total', - 'orderby' => 'meta_value_num' + 'orderby' => 'meta_value_num', ) ); } } @@ -1798,7 +1798,7 @@ class WC_Admin_Post_Types { 'taxonomy' => 'product_cat', 'field' => 'id', 'terms' => get_terms( 'product_cat', array( 'fields' => 'ids' ) ), - 'operator' => 'NOT IN' + 'operator' => 'NOT IN', ); } @@ -1808,7 +1808,7 @@ class WC_Admin_Post_Types { 'taxonomy' => 'product_shipping_class', 'field' => 'id', 'terms' => get_terms( 'product_shipping_class', array( 'fields' => 'ids' ) ), - 'operator' => 'NOT IN' + 'operator' => 'NOT IN', ); } } @@ -2101,7 +2101,7 @@ class WC_Admin_Post_Types { 'visible' => __( 'Catalog/search', 'woocommerce' ), 'catalog' => __( 'Catalog', 'woocommerce' ), 'search' => __( 'Search', 'woocommerce' ), - 'hidden' => __( 'Hidden', 'woocommerce' ) + 'hidden' => __( 'Hidden', 'woocommerce' ), ) ); ?>
diff --git a/includes/admin/class-wc-admin-profile.php b/includes/admin/class-wc-admin-profile.php index 917abfa39ae..f2dfac14f4d 100644 --- a/includes/admin/class-wc-admin-profile.php +++ b/includes/admin/class-wc-admin-profile.php @@ -42,99 +42,99 @@ class WC_Admin_Profile { 'fields' => array( 'billing_first_name' => array( 'label' => __( 'First name', 'woocommerce' ), - 'description' => '' + 'description' => '', ), 'billing_last_name' => array( 'label' => __( 'Last name', 'woocommerce' ), - 'description' => '' + 'description' => '', ), 'billing_company' => array( 'label' => __( 'Company', 'woocommerce' ), - 'description' => '' + 'description' => '', ), 'billing_address_1' => array( 'label' => __( 'Address 1', 'woocommerce' ), - 'description' => '' + 'description' => '', ), 'billing_address_2' => array( 'label' => __( 'Address 2', 'woocommerce' ), - 'description' => '' + 'description' => '', ), 'billing_city' => array( 'label' => __( 'City', 'woocommerce' ), - 'description' => '' + 'description' => '', ), 'billing_postcode' => array( 'label' => __( 'Postcode', 'woocommerce' ), - 'description' => '' + 'description' => '', ), 'billing_country' => array( 'label' => __( 'Country', 'woocommerce' ), 'description' => '', 'class' => 'js_field-country', 'type' => 'select', - 'options' => array( '' => __( 'Select a country…', 'woocommerce' ) ) + WC()->countries->get_allowed_countries() + 'options' => array( '' => __( 'Select a country…', 'woocommerce' ) ) + WC()->countries->get_allowed_countries(), ), 'billing_state' => array( 'label' => __( 'State/County', 'woocommerce' ), 'description' => __( 'State/County or state code', 'woocommerce' ), - 'class' => 'js_field-state' + 'class' => 'js_field-state', ), 'billing_phone' => array( 'label' => __( 'Telephone', 'woocommerce' ), - 'description' => '' + 'description' => '', ), 'billing_email' => array( 'label' => __( 'Email', 'woocommerce' ), - 'description' => '' - ) - ) + 'description' => '', + ), + ), ), 'shipping' => array( 'title' => __( 'Customer Shipping Address', 'woocommerce' ), 'fields' => array( 'shipping_first_name' => array( 'label' => __( 'First name', 'woocommerce' ), - 'description' => '' + 'description' => '', ), 'shipping_last_name' => array( 'label' => __( 'Last name', 'woocommerce' ), - 'description' => '' + 'description' => '', ), 'shipping_company' => array( 'label' => __( 'Company', 'woocommerce' ), - 'description' => '' + 'description' => '', ), 'shipping_address_1' => array( 'label' => __( 'Address 1', 'woocommerce' ), - 'description' => '' + 'description' => '', ), 'shipping_address_2' => array( 'label' => __( 'Address 2', 'woocommerce' ), - 'description' => '' + 'description' => '', ), 'shipping_city' => array( 'label' => __( 'City', 'woocommerce' ), - 'description' => '' + 'description' => '', ), 'shipping_postcode' => array( 'label' => __( 'Postcode', 'woocommerce' ), - 'description' => '' + 'description' => '', ), 'shipping_country' => array( 'label' => __( 'Country', 'woocommerce' ), 'description' => '', 'class' => 'js_field-country', 'type' => 'select', - 'options' => array( '' => __( 'Select a country…', 'woocommerce' ) ) + WC()->countries->get_allowed_countries() + 'options' => array( '' => __( 'Select a country…', 'woocommerce' ) ) + WC()->countries->get_allowed_countries(), ), 'shipping_state' => array( 'label' => __( 'State/County', 'woocommerce' ), 'description' => __( 'State/County or state code', 'woocommerce' ), - 'class' => 'js_field-state' - ) - ) - ) + 'class' => 'js_field-state', + ), + ), + ), ) ); return $show_fields; } diff --git a/includes/admin/class-wc-admin-reports.php b/includes/admin/class-wc-admin-reports.php index 2d6709ed455..e0f5cd9c7bb 100644 --- a/includes/admin/class-wc-admin-reports.php +++ b/includes/admin/class-wc-admin-reports.php @@ -48,27 +48,27 @@ class WC_Admin_Reports { 'title' => __( 'Sales by date', 'woocommerce' ), 'description' => '', 'hide_title' => true, - 'callback' => array( __CLASS__, 'get_report' ) + 'callback' => array( __CLASS__, 'get_report' ), ), "sales_by_product" => array( 'title' => __( 'Sales by product', 'woocommerce' ), 'description' => '', 'hide_title' => true, - 'callback' => array( __CLASS__, 'get_report' ) + 'callback' => array( __CLASS__, 'get_report' ), ), "sales_by_category" => array( 'title' => __( 'Sales by category', 'woocommerce' ), 'description' => '', 'hide_title' => true, - 'callback' => array( __CLASS__, 'get_report' ) + 'callback' => array( __CLASS__, 'get_report' ), ), "coupon_usage" => array( 'title' => __( 'Coupons by date', 'woocommerce' ), 'description' => '', 'hide_title' => true, - 'callback' => array( __CLASS__, 'get_report' ) - ) - ) + 'callback' => array( __CLASS__, 'get_report' ), + ), + ), ), 'customers' => array( 'title' => __( 'Customers', 'woocommerce' ), @@ -77,15 +77,15 @@ class WC_Admin_Reports { 'title' => __( 'Customers vs. Guests', 'woocommerce' ), 'description' => '', 'hide_title' => true, - 'callback' => array( __CLASS__, 'get_report' ) + 'callback' => array( __CLASS__, 'get_report' ), ), "customer_list" => array( 'title' => __( 'Customer List', 'woocommerce' ), 'description' => '', 'hide_title' => true, - 'callback' => array( __CLASS__, 'get_report' ) + 'callback' => array( __CLASS__, 'get_report' ), ), - ) + ), ), 'stock' => array( 'title' => __( 'Stock', 'woocommerce' ), @@ -94,22 +94,22 @@ class WC_Admin_Reports { 'title' => __( 'Low in stock', 'woocommerce' ), 'description' => '', 'hide_title' => true, - 'callback' => array( __CLASS__, 'get_report' ) + 'callback' => array( __CLASS__, 'get_report' ), ), "out_of_stock" => array( 'title' => __( 'Out of stock', 'woocommerce' ), 'description' => '', 'hide_title' => true, - 'callback' => array( __CLASS__, 'get_report' ) + 'callback' => array( __CLASS__, 'get_report' ), ), "most_stocked" => array( 'title' => __( 'Most Stocked', 'woocommerce' ), 'description' => '', 'hide_title' => true, - 'callback' => array( __CLASS__, 'get_report' ) + 'callback' => array( __CLASS__, 'get_report' ), ), - ) - ) + ), + ), ); if ( wc_tax_enabled() ) { @@ -120,15 +120,15 @@ class WC_Admin_Reports { 'title' => __( 'Taxes by code', 'woocommerce' ), 'description' => '', 'hide_title' => true, - 'callback' => array( __CLASS__, 'get_report' ) + 'callback' => array( __CLASS__, 'get_report' ), ), "taxes_by_date" => array( 'title' => __( 'Taxes by date', 'woocommerce' ), 'description' => '', 'hide_title' => true, - 'callback' => array( __CLASS__, 'get_report' ) + 'callback' => array( __CLASS__, 'get_report' ), ), - ) + ), ); } diff --git a/includes/admin/class-wc-admin-settings.php b/includes/admin/class-wc-admin-settings.php index d2c8bc3e516..85eed5bafd3 100644 --- a/includes/admin/class-wc-admin-settings.php +++ b/includes/admin/class-wc-admin-settings.php @@ -139,7 +139,7 @@ class WC_Admin_Settings { wp_enqueue_script( 'woocommerce_settings', WC()->plugin_url() . '/assets/js/admin/settings' . $suffix . '.js', array( 'jquery', 'jquery-ui-datepicker', 'jquery-ui-sortable', 'iris', 'select2' ), WC()->version, true ); wp_localize_script( 'woocommerce_settings', 'woocommerce_settings_params', array( - 'i18n_nav_warning' => __( 'The changes you made will be lost if you navigate away from this page.', 'woocommerce' ) + 'i18n_nav_warning' => __( 'The changes you made will be lost if you navigate away from this page.', 'woocommerce' ), ) ); // Include settings pages @@ -537,7 +537,7 @@ class WC_Admin_Settings { 'show_option_none' => ' ', 'class' => $value['class'], 'echo' => false, - 'selected' => absint( self::get_option( $value['id'] ) ) + 'selected' => absint( self::get_option( $value['id'] ) ), ); if ( isset( $value['args'] ) ) { @@ -652,7 +652,7 @@ class WC_Admin_Settings { return array( 'description' => $description, - 'tooltip_html' => $tooltip_html + 'tooltip_html' => $tooltip_html, ); } diff --git a/includes/admin/class-wc-admin-setup-wizard.php b/includes/admin/class-wc-admin-setup-wizard.php index b4f8f289e4b..da7797d9ee3 100644 --- a/includes/admin/class-wc-admin-setup-wizard.php +++ b/includes/admin/class-wc-admin-setup-wizard.php @@ -58,17 +58,17 @@ class WC_Admin_Setup_Wizard { 'introduction' => array( 'name' => __( 'Introduction', 'woocommerce' ), 'view' => array( $this, 'wc_setup_introduction' ), - 'handler' => '' + 'handler' => '', ), 'pages' => array( 'name' => __( 'Page Setup', 'woocommerce' ), 'view' => array( $this, 'wc_setup_pages' ), - 'handler' => array( $this, 'wc_setup_pages_save' ) + 'handler' => array( $this, 'wc_setup_pages_save' ), ), 'locale' => array( 'name' => __( 'Store Locale', 'woocommerce' ), 'view' => array( $this, 'wc_setup_locale' ), - 'handler' => array( $this, 'wc_setup_locale_save' ) + 'handler' => array( $this, 'wc_setup_locale_save' ), ), 'shipping_taxes' => array( 'name' => __( 'Shipping & Tax', 'woocommerce' ), @@ -83,8 +83,8 @@ class WC_Admin_Setup_Wizard { 'next_steps' => array( 'name' => __( 'Ready!', 'woocommerce' ), 'view' => array( $this, 'wc_setup_ready' ), - 'handler' => '' - ) + 'handler' => '', + ), ); $this->step = isset( $_GET['step'] ) ? sanitize_key( $_GET['step'] ) : current( array_keys( $this->steps ) ); $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min'; @@ -107,14 +107,14 @@ class WC_Admin_Setup_Wizard { 'i18n_searching' => _x( 'Searching…', 'enhanced select', 'woocommerce' ), 'ajax_url' => admin_url( 'admin-ajax.php' ), 'search_products_nonce' => wp_create_nonce( 'search-products' ), - 'search_customers_nonce' => wp_create_nonce( 'search-customers' ) + 'search_customers_nonce' => wp_create_nonce( 'search-customers' ), ) ); wp_enqueue_style( 'woocommerce_admin_styles', WC()->plugin_url() . '/assets/css/admin.css', array(), WC_VERSION ); wp_enqueue_style( 'wc-setup', WC()->plugin_url() . '/assets/css/wc-setup.css', array( 'dashicons', 'install' ), WC_VERSION ); wp_register_script( 'wc-setup', WC()->plugin_url() . '/assets/js/admin/wc-setup.min.js', array( 'jquery', 'wc-enhanced-select', 'jquery-blockui' ), WC_VERSION ); wp_localize_script( 'wc-setup', 'wc_setup_params', array( - 'locale_info' => json_encode( include( WC()->plugin_path() . '/i18n/locale-info.php' ) ) + 'locale_info' => json_encode( include( WC()->plugin_path() . '/i18n/locale-info.php' ) ), ) ); if ( ! empty( $_POST['save_step'] ) && isset( $this->steps[ $this->step ]['handler'] ) ) { @@ -546,7 +546,7 @@ class WC_Admin_Setup_Wizard { 'tax_rate_compound' => 0, 'tax_rate_shipping' => $rate['shipping'] ? 1 : 0, 'tax_rate_order' => $loop ++, - 'tax_rate_class' => '' + 'tax_rate_class' => '', ); WC_Tax::_insert_tax_rate( $tax_rate ); } @@ -615,7 +615,7 @@ class WC_Admin_Setup_Wizard { 'description' => __( 'A simple offline gateway that lets you accept cash on delivery.', 'woocommerce' ), 'image' => '', 'class' => '', - ) + ), ); $country = WC()->countries->get_base_country(); diff --git a/includes/admin/class-wc-admin-status.php b/includes/admin/class-wc-admin-status.php index 885a8212c30..a3286150f4a 100644 --- a/includes/admin/class-wc-admin-status.php +++ b/includes/admin/class-wc-admin-status.php @@ -202,7 +202,7 @@ class WC_Admin_Status { 'fields' => array( 'sections' => false, 'tags' => false, - ) + ), ) ); $update_theme_version = 0; diff --git a/includes/admin/class-wc-admin-webhooks-table-list.php b/includes/admin/class-wc-admin-webhooks-table-list.php index 16ccf3066c6..53e089b3c4b 100644 --- a/includes/admin/class-wc-admin-webhooks-table-list.php +++ b/includes/admin/class-wc-admin-webhooks-table-list.php @@ -25,7 +25,7 @@ class WC_Admin_Webhooks_Table_List extends WP_List_Table { parent::__construct( array( 'singular' => __( 'webhook', 'woocommerce' ), 'plural' => __( 'webhooks', 'woocommerce' ), - 'ajax' => false + 'ajax' => false, ) ); } @@ -92,7 +92,7 @@ class WC_Admin_Webhooks_Table_List extends WP_List_Table { // Get actions $actions = array( - 'id' => sprintf( __( 'ID: %d', 'woocommerce' ), $the_webhook->id ) + 'id' => sprintf( __( 'ID: %d', 'woocommerce' ), $the_webhook->id ), ); if ( current_user_can( $post_type_object->cap->edit_post, $the_webhook->id ) && 'trash' !== $post_status ) { @@ -244,12 +244,12 @@ class WC_Admin_Webhooks_Table_List extends WP_List_Table { if ( isset( $_GET['status'] ) && 'trash' == $_GET['status'] ) { return array( 'untrash' => __( 'Restore', 'woocommerce' ), - 'delete' => __( 'Delete Permanently', 'woocommerce' ) + 'delete' => __( 'Delete Permanently', 'woocommerce' ), ); } return array( - 'trash' => __( 'Move to Trash', 'woocommerce' ) + 'trash' => __( 'Move to Trash', 'woocommerce' ), ); } @@ -283,7 +283,7 @@ class WC_Admin_Webhooks_Table_List extends WP_List_Table { 'post_type' => 'shop_webhook', 'posts_per_page' => $per_page, 'ignore_sticky_posts' => true, - 'paged' => $current_page + 'paged' => $current_page, ); // Handle the status query @@ -303,7 +303,7 @@ class WC_Admin_Webhooks_Table_List extends WP_List_Table { $this->set_pagination_args( array( 'total_items' => $webhooks->found_posts, 'per_page' => $per_page, - 'total_pages' => $webhooks->max_num_pages + 'total_pages' => $webhooks->max_num_pages, ) ); } } diff --git a/includes/admin/class-wc-admin-webhooks.php b/includes/admin/class-wc-admin-webhooks.php index 0f2c6bb7d5a..07332e66299 100644 --- a/includes/admin/class-wc-admin-webhooks.php +++ b/includes/admin/class-wc-admin-webhooks.php @@ -196,7 +196,7 @@ class WC_Admin_Webhooks { 'post_author' => get_current_user_id(), 'post_password' => strlen( ( $password = uniqid( 'webhook_' ) ) ) > 20 ? substr( $password, 0, 20 ) : $password, 'post_title' => sprintf( __( 'Webhook created on %s', 'woocommerce' ), strftime( _x( '%b %d, %Y @ %I:%M %p', 'Webhook created on date parsed by strftime', 'woocommerce' ) ) ), - 'comment_status' => 'open' + 'comment_status' => 'open', ) ); if ( is_wp_error( $webhook_id ) ) { @@ -303,7 +303,7 @@ class WC_Admin_Webhooks { 'ignore_sticky_posts' => true, 'nopaging' => true, 'post_status' => 'trash', - 'fields' => 'ids' + 'fields' => 'ids', ) ); foreach ( $webhooks as $webhook_id ) { @@ -428,7 +428,7 @@ class WC_Admin_Webhooks { 'post_id' => $webhook->id, 'status' => 'approve', 'type' => 'webhook_delivery', - 'number' => 10 + 'number' => 10, ); if ( 1 < $current ) { @@ -471,7 +471,7 @@ class WC_Admin_Webhooks { return array( 'topic' => $topic, 'event' => $event, - 'resource' => $resource + 'resource' => $resource, ); } diff --git a/includes/admin/importers/class-wc-tax-rate-importer.php b/includes/admin/importers/class-wc-tax-rate-importer.php index 4221868ff14..5820a660267 100644 --- a/includes/admin/importers/class-wc-tax-rate-importer.php +++ b/includes/admin/importers/class-wc-tax-rate-importer.php @@ -148,7 +148,7 @@ class WC_Tax_Rate_Importer extends WP_Importer { 'tax_rate_compound' => $compound ? 1 : 0, 'tax_rate_shipping' => $shipping ? 1 : 0, 'tax_rate_order' => $loop ++, - 'tax_rate_class' => $class + 'tax_rate_class' => $class, ); $tax_rate_id = WC_Tax::_insert_tax_rate( $tax_rate ); diff --git a/includes/admin/meta-boxes/class-wc-meta-box-coupon-data.php b/includes/admin/meta-boxes/class-wc-meta-box-coupon-data.php index 495d36c3f60..8bd6aa1d99b 100644 --- a/includes/admin/meta-boxes/class-wc-meta-box-coupon-data.php +++ b/includes/admin/meta-boxes/class-wc-meta-box-coupon-data.php @@ -51,7 +51,7 @@ class WC_Meta_Box_Coupon_Data { 'label' => __( 'Usage Limits', 'woocommerce' ), 'target' => 'usage_limit_coupon_data', 'class' => '', - ) + ), ) ); foreach ( $coupon_data_tabs as $key => $tab ) { @@ -168,7 +168,7 @@ class WC_Meta_Box_Coupon_Data { // Customers woocommerce_wp_text_input( array( 'id' => 'customer_email', 'label' => __( 'Email restrictions', 'woocommerce' ), 'placeholder' => __( 'No restrictions', 'woocommerce' ), 'description' => __( 'List of allowed emails to check against the customer\'s billing email when an order is placed. Separate email addresses with commas.', 'woocommerce' ), 'value' => implode(', ', (array) get_post_meta( $post->ID, 'customer_email', true ) ), 'desc_tip' => true, 'type' => 'email', 'class' => '', 'custom_attributes' => array( - 'multiple' => 'multiple' + 'multiple' => 'multiple', ) ) ); echo '
'; @@ -183,19 +183,19 @@ class WC_Meta_Box_Coupon_Data { // Usage limit per coupons woocommerce_wp_text_input( array( 'id' => 'usage_limit', 'label' => __( 'Usage limit per coupon', 'woocommerce' ), 'placeholder' => _x('Unlimited usage', 'placeholder', 'woocommerce'), 'description' => __( 'How many times this coupon can be used before it is void.', 'woocommerce' ), 'type' => 'number', 'desc_tip' => true, 'class' => 'short', 'custom_attributes' => array( 'step' => '1', - 'min' => '0' + 'min' => '0', ) ) ); // Usage limit per product woocommerce_wp_text_input( array( 'id' => 'limit_usage_to_x_items', 'label' => __( 'Limit usage to X items', 'woocommerce' ), 'placeholder' => _x( 'Apply to all qualifying items in cart', 'placeholder', 'woocommerce' ), 'description' => __( 'The maximum number of individual items this coupon can apply to when using product discounts. Leave blank to apply to all qualifying items in cart.', 'woocommerce' ), 'desc_tip' => true, 'class' => 'short', 'type' => 'number', 'custom_attributes' => array( 'step' => '1', - 'min' => '0' + 'min' => '0', ) ) ); // Usage limit per users woocommerce_wp_text_input( array( 'id' => 'usage_limit_per_user', 'label' => __( 'Usage limit per user', 'woocommerce' ), 'placeholder' => _x( 'Unlimited usage', 'placeholder', 'woocommerce' ), 'description' => __( 'How many times this coupon can be used by an invidual user. Uses billing email for guests, and user ID for logged in users.', 'woocommerce' ), 'desc_tip' => true, 'class' => 'short', 'type' => 'number', 'custom_attributes' => array( 'step' => '1', - 'min' => '0' + 'min' => '0', ) ) ); echo ''; diff --git a/includes/admin/meta-boxes/class-wc-meta-box-order-data.php b/includes/admin/meta-boxes/class-wc-meta-box-order-data.php index 55587935333..a440118db12 100644 --- a/includes/admin/meta-boxes/class-wc-meta-box-order-data.php +++ b/includes/admin/meta-boxes/class-wc-meta-box-order-data.php @@ -41,43 +41,43 @@ class WC_Meta_Box_Order_Data { self::$billing_fields = apply_filters( 'woocommerce_admin_billing_fields', array( 'first_name' => array( 'label' => __( 'First Name', 'woocommerce' ), - 'show' => false + 'show' => false, ), 'last_name' => array( 'label' => __( 'Last Name', 'woocommerce' ), - 'show' => false + 'show' => false, ), 'company' => array( 'label' => __( 'Company', 'woocommerce' ), - 'show' => false + 'show' => false, ), 'address_1' => array( 'label' => __( 'Address 1', 'woocommerce' ), - 'show' => false + 'show' => false, ), 'address_2' => array( 'label' => __( 'Address 2', 'woocommerce' ), - 'show' => false + 'show' => false, ), 'city' => array( 'label' => __( 'City', 'woocommerce' ), - 'show' => false + 'show' => false, ), 'postcode' => array( 'label' => __( 'Postcode', 'woocommerce' ), - 'show' => false + 'show' => false, ), 'country' => array( 'label' => __( 'Country', 'woocommerce' ), 'show' => false, 'class' => 'js_field-country select short', 'type' => 'select', - 'options' => array( '' => __( 'Select a country…', 'woocommerce' ) ) + WC()->countries->get_allowed_countries() + 'options' => array( '' => __( 'Select a country…', 'woocommerce' ) ) + WC()->countries->get_allowed_countries(), ), 'state' => array( 'label' => __( 'State/County', 'woocommerce' ), 'class' => 'js_field-state select short', - 'show' => false + 'show' => false, ), 'email' => array( 'label' => __( 'Email', 'woocommerce' ), @@ -90,43 +90,43 @@ class WC_Meta_Box_Order_Data { self::$shipping_fields = apply_filters( 'woocommerce_admin_shipping_fields', array( 'first_name' => array( 'label' => __( 'First Name', 'woocommerce' ), - 'show' => false + 'show' => false, ), 'last_name' => array( 'label' => __( 'Last Name', 'woocommerce' ), - 'show' => false + 'show' => false, ), 'company' => array( 'label' => __( 'Company', 'woocommerce' ), - 'show' => false + 'show' => false, ), 'address_1' => array( 'label' => __( 'Address 1', 'woocommerce' ), - 'show' => false + 'show' => false, ), 'address_2' => array( 'label' => __( 'Address 2', 'woocommerce' ), - 'show' => false + 'show' => false, ), 'city' => array( 'label' => __( 'City', 'woocommerce' ), - 'show' => false + 'show' => false, ), 'postcode' => array( 'label' => __( 'Postcode', 'woocommerce' ), - 'show' => false + 'show' => false, ), 'country' => array( 'label' => __( 'Country', 'woocommerce' ), 'show' => false, 'type' => 'select', 'class' => 'js_field-country select short', - 'options' => array( '' => __( 'Select a country…', 'woocommerce' ) ) + WC()->countries->get_shipping_countries() + 'options' => array( '' => __( 'Select a country…', 'woocommerce' ) ) + WC()->countries->get_shipping_countries(), ), 'state' => array( 'label' => __( 'State/County', 'woocommerce' ), 'class' => 'js_field-state select short', - 'show' => false + 'show' => false, ), ) ); } @@ -222,7 +222,7 @@ class WC_Meta_Box_Order_Data { if ( $order->get_user_id() ) { $args = array( 'post_status' => 'all', 'post_type' => 'shop_order', - '_customer_user' => absint( $order->get_user_id() ) + '_customer_user' => absint( $order->get_user_id() ), ); printf( '%s →', esc_url( add_query_arg( $args, admin_url( 'edit.php' ) ) ), diff --git a/includes/admin/meta-boxes/class-wc-meta-box-order-downloads.php b/includes/admin/meta-boxes/class-wc-meta-box-order-downloads.php index 88da1ff744c..10b17296dcc 100644 --- a/includes/admin/meta-boxes/class-wc-meta-box-order-downloads.php +++ b/includes/admin/meta-boxes/class-wc-meta-box-order-downloads.php @@ -121,7 +121,7 @@ class WC_Meta_Box_Order_Downloads { array( 'order_id' => $post_id, 'product_id' => absint( $product_ids[ $i ] ), - 'download_id' => wc_clean( $download_ids[ $i ] ) + 'download_id' => wc_clean( $download_ids[ $i ] ), ), $format, array( '%d', '%d', '%s' ) ); diff --git a/includes/admin/meta-boxes/class-wc-meta-box-order-notes.php b/includes/admin/meta-boxes/class-wc-meta-box-order-notes.php index 850d0935dbf..57de0f13637 100644 --- a/includes/admin/meta-boxes/class-wc-meta-box-order-notes.php +++ b/includes/admin/meta-boxes/class-wc-meta-box-order-notes.php @@ -30,7 +30,7 @@ class WC_Meta_Box_Order_Notes { 'orderby' => 'comment_ID', 'order' => 'DESC', 'approve' => 'approve', - 'type' => 'order_note' + 'type' => 'order_note', ); remove_filter( 'comments_clauses', array( 'WC_Comments', 'exclude_order_comments' ), 10, 1 ); diff --git a/includes/admin/meta-boxes/class-wc-meta-box-product-data.php b/includes/admin/meta-boxes/class-wc-meta-box-product-data.php index 6c1fd2d582d..54158f0d14a 100644 --- a/includes/admin/meta-boxes/class-wc-meta-box-product-data.php +++ b/includes/admin/meta-boxes/class-wc-meta-box-product-data.php @@ -51,15 +51,15 @@ class WC_Meta_Box_Product_Data { 'wrapper_class' => 'show_if_simple', 'label' => __( 'Virtual', 'woocommerce' ), 'description' => __( 'Virtual products are intangible and aren\'t shipped.', 'woocommerce' ), - 'default' => 'no' + 'default' => 'no', ), 'downloadable' => array( 'id' => '_downloadable', 'wrapper_class' => 'show_if_simple', 'label' => __( 'Downloadable', 'woocommerce' ), 'description' => __( 'Downloadable products give access to a file upon purchase.', 'woocommerce' ), - 'default' => 'no' - ) + 'default' => 'no', + ), ) ); foreach ( $product_type_options as $key => $option ) { @@ -114,7 +114,7 @@ class WC_Meta_Box_Product_Data { 'label' => __( 'Advanced', 'woocommerce' ), 'target' => 'advanced_product_data', 'class' => array(), - ) + ), ) ); foreach ( $product_data_tabs as $key => $tab ) { @@ -192,7 +192,7 @@ class WC_Meta_Box_Product_Data { 'product_shipping_class', 'id' => 'product_shipping_class', 'selected' => $current_shipping_class, - 'class' => 'select short' + 'class' => 'select short', ); ?>

'menu_order', 'label' => __( 'Menu order', 'woocommerce' ), 'desc_tip' => 'true', 'description' => __( 'Custom ordering position.', 'woocommerce' ), 'value' => intval( $post->menu_order ), 'type' => 'number', 'custom_attributes' => array( - 'step' => '1' + 'step' => '1', ) ) ); ?> @@ -930,7 +930,7 @@ class WC_Meta_Box_Product_Data { 'position' => $attribute_position[ $i ], 'is_visible' => $is_visible, 'is_variation' => $is_variation, - 'is_taxonomy' => $is_taxonomy + 'is_taxonomy' => $is_taxonomy, ); } @@ -947,7 +947,7 @@ class WC_Meta_Box_Product_Data { 'position' => $attribute_position[ $i ], 'is_visible' => $is_visible, 'is_variation' => $is_variation, - 'is_taxonomy' => $is_taxonomy + 'is_taxonomy' => $is_taxonomy, ); } } @@ -1044,7 +1044,7 @@ class WC_Meta_Box_Product_Data { 'meta_key' => '_price', 'posts_per_page' => 1, 'post_type' => 'product', - 'fields' => 'ids' + 'fields' => 'ids', ) ); if ( $children_by_price ) { @@ -1182,7 +1182,7 @@ class WC_Meta_Box_Product_Data { $files[ $file_hash ] = array( 'name' => $file_name, - 'file' => $file_url + 'file' => $file_url, ); } } @@ -1298,7 +1298,7 @@ class WC_Meta_Box_Product_Data { 'post_author' => get_current_user_id(), 'post_parent' => $post_id, 'post_type' => 'product_variation', - 'menu_order' => $variable_menu_order[ $i ] + 'menu_order' => $variable_menu_order[ $i ], ); $variation_id = wp_insert_post( $variation ); @@ -1314,7 +1314,7 @@ class WC_Meta_Box_Product_Data { 'post_title' => $variation_post_title, 'menu_order' => $variable_menu_order[ $i ], 'post_modified' => $modified_date, - 'post_modified_gmt' => get_gmt_from_date( $modified_date ) + 'post_modified_gmt' => get_gmt_from_date( $modified_date ), ), array( 'ID' => $variation_id ) ); clean_post_cache( $variation_id ); @@ -1472,7 +1472,7 @@ class WC_Meta_Box_Product_Data { $files[ $file_hash ] = array( 'name' => $file_name, - 'file' => $file_url + 'file' => $file_url, ); } } diff --git a/includes/admin/meta-boxes/class-wc-meta-box-product-short-description.php b/includes/admin/meta-boxes/class-wc-meta-box-product-short-description.php index 8b81aedfceb..d5d394ef7e9 100644 --- a/includes/admin/meta-boxes/class-wc-meta-box-product-short-description.php +++ b/includes/admin/meta-boxes/class-wc-meta-box-product-short-description.php @@ -33,7 +33,7 @@ class WC_Meta_Box_Product_Short_Description { 'theme_advanced_buttons1' => 'bold,italic,strikethrough,separator,bullist,numlist,separator,blockquote,separator,justifyleft,justifycenter,justifyright,separator,link,unlink,separator,undo,redo,separator', 'theme_advanced_buttons2' => '', ), - 'editor_css' => '' + 'editor_css' => '', ); wp_editor( htmlspecialchars_decode( $post->post_excerpt ), 'excerpt', apply_filters( 'woocommerce_product_short_description_editor_settings', $settings ) ); diff --git a/includes/admin/meta-boxes/views/html-order-download-permission.php b/includes/admin/meta-boxes/views/html-order-download-permission.php index a801997b361..7ad00bb0962 100644 --- a/includes/admin/meta-boxes/views/html-order-download-permission.php +++ b/includes/admin/meta-boxes/views/html-order-download-permission.php @@ -33,7 +33,7 @@ if ( ! defined( 'ABSPATH' ) ) { 'download_file' => $download->product_id, 'order' => $download->order_key, 'email' => urlencode( $download->user_email ), - 'key' => $download->download_id + 'key' => $download->download_id, ), trailingslashit( home_url() ) ); echo '
' . esc_html( $file_count ) . ''; diff --git a/includes/admin/meta-boxes/views/html-product-attribute.php b/includes/admin/meta-boxes/views/html-product-attribute.php index ba8fd6f747a..7328257f6fa 100644 --- a/includes/admin/meta-boxes/views/html-product-attribute.php +++ b/includes/admin/meta-boxes/views/html-product-attribute.php @@ -31,7 +31,7 @@ 'name', - 'hide_empty' => 0 + 'hide_empty' => 0, ); $all_terms = get_terms( $taxonomy, apply_filters( 'woocommerce_product_attribute_terms', $args ) ); if ( $all_terms ) { diff --git a/includes/admin/meta-boxes/views/html-variation-admin.php b/includes/admin/meta-boxes/views/html-variation-admin.php index 276ffcbd79c..6cbfa838b0b 100644 --- a/includes/admin/meta-boxes/views/html-variation-admin.php +++ b/includes/admin/meta-boxes/views/html-variation-admin.php @@ -212,7 +212,7 @@ extract( $variation_data ); 'name' => 'variable_shipping_class[' . $loop . ']', 'id' => '', 'selected' => isset( $shipping_class ) ? esc_attr( $shipping_class ) : '', - 'echo' => 0 + 'echo' => 0, ); echo wp_dropdown_categories( $args ); @@ -267,7 +267,7 @@ extract( $variation_data ); if ( ! is_array( $file ) ) { $file = array( 'file' => $file, - 'name' => '' + 'name' => '', ); } include( 'html-product-variation-download.php' ); @@ -281,7 +281,7 @@ extract( $variation_data ); diff --git a/includes/admin/reports/class-wc-report-customer-list.php b/includes/admin/reports/class-wc-report-customer-list.php index 123c4e0b20b..06f9cbffbf6 100644 --- a/includes/admin/reports/class-wc-report-customer-list.php +++ b/includes/admin/reports/class-wc-report-customer-list.php @@ -26,7 +26,7 @@ class WC_Report_Customer_List extends WP_List_Table { parent::__construct( array( 'singular' => __( 'Customer', 'woocommerce' ), 'plural' => __( 'Customers', 'woocommerce' ), - 'ajax' => false + 'ajax' => false, ) ); } @@ -128,7 +128,7 @@ class WC_Report_Customer_List extends WP_List_Table { $orders = wc_get_orders( array( 'limit' => 1, 'status' => array( 'wc-completed', 'wc-processing' ), - 'customer' => $user->ID + 'customer' => $user->ID, ) ); if ( ! empty( $orders ) ) { @@ -151,19 +151,19 @@ class WC_Report_Customer_List extends WP_List_Table { $actions['refresh'] = array( 'url' => wp_nonce_url( add_query_arg( 'refresh', $user->ID ), 'refresh' ), 'name' => __( 'Refresh stats', 'woocommerce' ), - 'action' => "refresh" + 'action' => "refresh", ); $actions['edit'] = array( 'url' => admin_url( 'user-edit.php?user_id=' . $user->ID ), 'name' => __( 'Edit', 'woocommerce' ), - 'action' => "edit" + 'action' => "edit", ); $actions['view'] = array( 'url' => admin_url( 'edit.php?post_type=shop_order&_customer_user=' . $user->ID ), 'name' => __( 'View orders', 'woocommerce' ), - 'action' => "view" + 'action' => "view", ); $orders = wc_get_orders( array( @@ -176,7 +176,7 @@ class WC_Report_Customer_List extends WP_List_Table { $actions['link'] = array( 'url' => wp_nonce_url( add_query_arg( 'link_orders', $user->ID ), 'link_orders' ), 'name' => __( 'Link previous orders', 'woocommerce' ), - 'action' => "link" + 'action' => "link", ); } @@ -212,7 +212,7 @@ class WC_Report_Customer_List extends WP_List_Table { 'orders' => __( 'Orders', 'woocommerce' ), 'spent' => __( 'Money Spent', 'woocommerce' ), 'last_order' => __( 'Last order', 'woocommerce' ), - 'user_actions' => __( 'Actions', 'woocommerce' ) + 'user_actions' => __( 'Actions', 'woocommerce' ), ); return $columns; @@ -263,21 +263,21 @@ class WC_Report_Customer_List extends WP_List_Table { $admin_users = new WP_User_Query( array( 'role' => 'administrator1', - 'fields' => 'ID' + 'fields' => 'ID', ) ); $manager_users = new WP_User_Query( array( 'role' => 'shop_manager', - 'fields' => 'ID' + 'fields' => 'ID', ) ); $query = new WP_User_Query( array( 'exclude' => array_merge( $admin_users->get_results(), $manager_users->get_results() ), 'number' => $per_page, - 'offset' => ( $current_page - 1 ) * $per_page + 'offset' => ( $current_page - 1 ) * $per_page, ) ); $this->items = $query->get_results(); @@ -290,7 +290,7 @@ class WC_Report_Customer_List extends WP_List_Table { $this->set_pagination_args( array( 'total_items' => $query->total_users, 'per_page' => $per_page, - 'total_pages' => ceil( $query->total_users / $per_page ) + 'total_pages' => ceil( $query->total_users / $per_page ), ) ); } } diff --git a/includes/admin/reports/class-wc-report-customers.php b/includes/admin/reports/class-wc-report-customers.php index ad734325135..beeba70feac 100644 --- a/includes/admin/reports/class-wc-report-customers.php +++ b/includes/admin/reports/class-wc-report-customers.php @@ -39,7 +39,7 @@ class WC_Report_Customers extends WC_Admin_Report { $legend[] = array( 'title' => sprintf( __( '%s signups in this period', 'woocommerce' ), '' . sizeof( $this->customers ) . '' ), 'color' => $this->chart_colours['signups'], - 'highlight_series' => 2 + 'highlight_series' => 2, ); return $legend; @@ -55,7 +55,7 @@ class WC_Report_Customers extends WC_Admin_Report { $widgets[] = array( 'title' => '', - 'callback' => array( $this, 'customers_vs_guests' ) + 'callback' => array( $this, 'customers_vs_guests' ), ); return $widgets; @@ -71,17 +71,17 @@ class WC_Report_Customers extends WC_Admin_Report { 'ID' => array( 'type' => 'post_data', 'function' => 'COUNT', - 'name' => 'total_orders' - ) + 'name' => 'total_orders', + ), ), 'where_meta' => array( array( 'meta_key' => '_customer_user', 'meta_value' => '0', - 'operator' => '>' + 'operator' => '>', ) ), - 'filter_range' => true + 'filter_range' => true, ) ); $guest_order_totals = $this->get_order_report_data( array( @@ -89,17 +89,17 @@ class WC_Report_Customers extends WC_Admin_Report { 'ID' => array( 'type' => 'post_data', 'function' => 'COUNT', - 'name' => 'total_orders' - ) + 'name' => 'total_orders', + ), ), 'where_meta' => array( array( 'meta_key' => '_customer_user', 'meta_value' => '0', - 'operator' => '=' + 'operator' => '=', ) ), - 'filter_range' => true + 'filter_range' => true, ) ); ?>
@@ -162,13 +162,13 @@ class WC_Report_Customers 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( 'signups' => '#3498db', 'customers' => '#1abc9c', - 'guests' => '#8fdece' + 'guests' => '#8fdece', ); $current_range = ! empty( $_GET['range'] ) ? sanitize_text_field( $_GET['range'] ) : '7day'; @@ -182,21 +182,21 @@ class WC_Report_Customers extends WC_Admin_Report { $admin_users = new WP_User_Query( array( 'role' => 'administrator', - 'fields' => 'ID' + 'fields' => 'ID', ) ); $manager_users = new WP_User_Query( array( 'role' => 'shop_manager', - 'fields' => 'ID' + 'fields' => 'ID', ) ); $users_query = new WP_User_Query( array( 'fields' => array( 'user_registered' ), - 'exclude' => array_merge( $admin_users->get_results(), $manager_users->get_results() ) + 'exclude' => array_merge( $admin_users->get_results(), $manager_users->get_results() ), ) ); @@ -242,25 +242,25 @@ class WC_Report_Customers extends WC_Admin_Report { 'ID' => array( 'type' => 'post_data', 'function' => 'COUNT', - 'name' => 'total_orders' + 'name' => 'total_orders', ), 'post_date' => array( 'type' => 'post_data', 'function' => '', - 'name' => 'post_date' + 'name' => 'post_date', ), ), 'where_meta' => array( array( 'meta_key' => '_customer_user', 'meta_value' => '0', - 'operator' => '>' + 'operator' => '>', ) ), 'group_by' => $this->group_by_query, 'order_by' => 'post_date ASC', 'query_type' => 'get_results', - 'filter_range' => true + 'filter_range' => true, ) ); $guest_orders = $this->get_order_report_data( array( @@ -268,25 +268,25 @@ class WC_Report_Customers extends WC_Admin_Report { 'ID' => array( 'type' => 'post_data', 'function' => 'COUNT', - 'name' => 'total_orders' + 'name' => 'total_orders', ), 'post_date' => array( 'type' => 'post_data', 'function' => '', - 'name' => 'post_date' + 'name' => 'post_date', ), ), 'where_meta' => array( array( 'meta_key' => '_customer_user', 'meta_value' => '0', - 'operator' => '=' + 'operator' => '=', ) ), 'group_by' => $this->group_by_query, 'order_by' => 'post_date ASC', 'query_type' => 'get_results', - 'filter_range' => true + 'filter_range' => true, ) ); $signups = $this->prepare_chart_data( $this->customers, 'user_registered', '', $this->chart_interval, $this->start_date, $this->chart_groupby ); @@ -297,7 +297,7 @@ class WC_Report_Customers extends WC_Admin_Report { $chart_data = json_encode( array( 'signups' => array_values( $signups ), 'customer_orders' => array_values( $customer_orders ), - 'guest_orders' => array_values( $guest_orders ) + 'guest_orders' => array_values( $guest_orders ), ) ); ?>
diff --git a/includes/admin/reports/class-wc-report-sales-by-category.php b/includes/admin/reports/class-wc-report-sales-by-category.php index aaf61eb4467..0355d01f3a6 100644 --- a/includes/admin/reports/class-wc-report-sales-by-category.php +++ b/includes/admin/reports/class-wc-report-sales-by-category.php @@ -95,7 +95,7 @@ class WC_Report_Sales_By_Category extends WC_Admin_Report { $legend[] = array( 'title' => sprintf( __( '%s sales in %s', 'woocommerce' ), '' . wc_price( $total ) . '', $category->name ), 'color' => isset( $this->chart_colours[ $index ] ) ? $this->chart_colours[ $index ] : $this->chart_colours[ 0 ], - 'highlight_series' => $index + 'highlight_series' => $index, ); $index++; @@ -113,7 +113,7 @@ class WC_Report_Sales_By_Category 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( '#3498db', '#34495e', '#1abc9c', '#2ecc71', '#f1c40f', '#e67e22', '#e74c3c', '#2980b9', '#8e44ad', '#2c3e50', '#16a085', '#27ae60', '#f39c12', '#d35400', '#c0392b' ); @@ -134,23 +134,23 @@ class WC_Report_Sales_By_Category 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_amount' + 'name' => 'order_item_amount', ), 'post_date' => array( 'type' => 'post_data', 'function' => '', - 'name' => 'post_date' + 'name' => 'post_date', ), ), 'group_by' => 'ID, product_id, post_date', 'query_type' => 'get_results', - 'filter_range' => true + 'filter_range' => true, ) ); $this->item_sales = array(); @@ -190,7 +190,7 @@ class WC_Report_Sales_By_Category extends WC_Admin_Report { return array( array( 'title' => __( 'Categories', 'woocommerce' ), - 'callback' => array( $this, 'category_widget' ) + 'callback' => array( $this, 'category_widget' ), ) ); } diff --git a/includes/admin/reports/class-wc-report-sales-by-date.php b/includes/admin/reports/class-wc-report-sales-by-date.php index 531f0d5ca3b..e831b5731f5 100644 --- a/includes/admin/reports/class-wc-report-sales-by-date.php +++ b/includes/admin/reports/class-wc-report-sales-by-date.php @@ -56,15 +56,15 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report { 'post_date' => array( 'type' => 'post_data', 'function' => '', - 'name' => 'post_date' - ) + 'name' => 'post_date', + ), ), 'group_by' => $this->group_by_query, 'order_by' => 'post_date ASC', 'query_type' => 'get_results', 'filter_range' => true, 'order_types' => wc_get_order_types( 'order-count' ), - 'order_status' => array( 'completed', 'processing', 'on-hold', 'refunded' ) + 'order_status' => array( 'completed', 'processing', 'on-hold', 'refunded' ), ) ); $this->report_data->coupons = (array) $this->get_order_report_data( array( @@ -72,25 +72,25 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report { 'order_item_name' => array( 'type' => 'order_item', 'function' => '', - 'name' => 'order_item_name' + 'name' => 'order_item_name', ), 'discount_amount' => array( '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_items.order_item_type', 'value' => 'coupon', - 'operator' => '=' + 'operator' => '=', ) ), 'group_by' => $this->group_by_query . ', order_item_name', @@ -98,7 +98,7 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report { 'query_type' => 'get_results', 'filter_range' => true, 'order_types' => wc_get_order_types( 'order-count' ), - 'order_status' => array( 'completed', 'processing', 'on-hold', 'refunded' ) + 'order_status' => array( 'completed', 'processing', 'on-hold', 'refunded' ), ) ); // All items from orders - even those refunded @@ -108,19 +108,19 @@ class WC_Report_Sales_By_Date 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', ), ), 'where' => array( array( 'key' => 'order_items.order_item_type', 'value' => 'line_item', - 'operator' => '=' + 'operator' => '=', ) ), 'group_by' => $this->group_by_query, @@ -140,20 +140,20 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report { 'type' => 'order_item_meta', 'order_item_type' => 'line_item', 'function' => 'SUM', - 'name' => 'order_item_count' - ) + 'name' => 'order_item_count', + ), ), 'where' => array( array( 'key' => 'order_items.order_item_type', 'value' => 'line_item', - 'operator' => '=' + 'operator' => '=', ) ), 'query_type' => 'get_var', 'filter_range' => true, 'order_types' => wc_get_order_types( 'order-count' ), - 'order_status' => array( 'refunded' ) + 'order_status' => array( 'refunded' ), ) ) ); /** @@ -164,27 +164,27 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report { '_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', ), 'post_date' => array( 'type' => 'post_data', 'function' => '', - 'name' => 'post_date' + 'name' => 'post_date', ), ), 'group_by' => $this->group_by_query, @@ -192,7 +192,7 @@ class WC_Report_Sales_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', 'refunded' ) + 'order_status' => array( 'completed', 'processing', 'on-hold', 'refunded' ), ) ); /** @@ -204,34 +204,34 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report { '_order_total' => array( 'type' => 'parent_meta', 'function' => '', - 'name' => 'total_refund' + 'name' => 'total_refund', ), '_order_shipping' => array( 'type' => 'parent_meta', 'function' => '', - 'name' => 'total_shipping' + 'name' => 'total_shipping', ), '_order_tax' => array( 'type' => 'parent_meta', 'function' => '', - 'name' => 'total_tax' + 'name' => 'total_tax', ), '_order_shipping_tax' => array( 'type' => 'parent_meta', 'function' => '', - 'name' => 'total_shipping_tax' + 'name' => 'total_shipping_tax', ), 'post_date' => array( 'type' => 'post_data', 'function' => '', - 'name' => 'post_date' - ) + 'name' => 'post_date', + ), ), 'group_by' => 'posts.post_parent', 'query_type' => 'get_results', 'filter_range' => true, 'order_status' => false, - 'parent_order_status' => array( 'refunded' ) + 'parent_order_status' => array( 'refunded' ), ) ); /** @@ -242,53 +242,53 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report { 'ID' => array( 'type' => 'post_data', 'function' => '', - 'name' => 'refund_id' + 'name' => 'refund_id', ), '_refund_amount' => array( 'type' => 'meta', 'function' => '', - 'name' => 'total_refund' + 'name' => 'total_refund', ), 'post_date' => array( 'type' => 'post_data', 'function' => '', - 'name' => 'post_date' + 'name' => 'post_date', ), 'order_item_type' => array( 'type' => 'order_item', 'function' => '', 'name' => 'item_type', - 'join_type' => 'LEFT' + 'join_type' => 'LEFT', ), '_order_total' => array( 'type' => 'meta', 'function' => '', - 'name' => 'total_sales' + 'name' => 'total_sales', ), '_order_shipping' => array( 'type' => 'meta', 'function' => '', 'name' => 'total_shipping', - 'join_type' => 'LEFT' + 'join_type' => 'LEFT', ), '_order_tax' => array( 'type' => 'meta', 'function' => '', 'name' => 'total_tax', - 'join_type' => 'LEFT' + 'join_type' => 'LEFT', ), '_order_shipping_tax' => array( 'type' => 'meta', 'function' => '', 'name' => 'total_shipping_tax', - 'join_type' => 'LEFT' + 'join_type' => 'LEFT', ), '_qty' => array( 'type' => 'order_item_meta', 'function' => 'SUM', 'name' => 'order_item_count', - 'join_type' => 'LEFT' - ) + 'join_type' => 'LEFT', + ), ), 'group_by' => 'refund_id', 'order_by' => 'post_date ASC', @@ -373,13 +373,13 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report { 'title' => sprintf( __( '%s gross sales in this period', 'woocommerce' ), '' . wc_price( $data->total_sales ) . '' ), 'placeholder' => __( 'This is the sum of the order totals after any refunds and including shipping and taxes.', 'woocommerce' ), 'color' => $this->chart_colours['sales_amount'], - 'highlight_series' => 6 + 'highlight_series' => 6, ); if ( $data->average_total_sales > 0 ) { $legend[] = array( 'title' => $average_total_sales_title, 'color' => $this->chart_colours['average'], - 'highlight_series' => 2 + 'highlight_series' => 2, ); } @@ -387,41 +387,41 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report { 'title' => sprintf( __( '%s net sales in this period', 'woocommerce' ), '' . wc_price( $data->net_sales ) . '' ), 'placeholder' => __( 'This is the sum of the order totals after any refunds and excluding shipping and taxes.', 'woocommerce' ), 'color' => $this->chart_colours['net_sales_amount'], - 'highlight_series' => 7 + 'highlight_series' => 7, ); if ( $data->average_sales > 0 ) { $legend[] = array( 'title' => $average_sales_title, 'color' => $this->chart_colours['net_average'], - 'highlight_series' => 3 + 'highlight_series' => 3, ); } $legend[] = array( 'title' => sprintf( __( '%s orders placed', 'woocommerce' ), '' . $data->total_orders . '' ), 'color' => $this->chart_colours['order_count'], - 'highlight_series' => 1 + 'highlight_series' => 1, ); $legend[] = array( 'title' => sprintf( __( '%s items purchased', 'woocommerce' ), '' . $data->total_items . '' ), 'color' => $this->chart_colours['item_count'], - 'highlight_series' => 0 + 'highlight_series' => 0, ); $legend[] = array( 'title' => sprintf( _nx( '%s refunded %d order', '%s refunded %d orders', $this->report_data->total_refunded_orders, '%s = amount of the refunds, %d = number of refunded orders.', 'woocommerce' ), '' . wc_price( $data->total_refunds ) . '', $this->report_data->total_refunded_orders ) . ' (' . sprintf( _n( '%d item', '%d items', $this->report_data->refunded_order_items, 'woocommerce' ), $this->report_data->refunded_order_items ) . ')', 'color' => $this->chart_colours['refund_amount'], - 'highlight_series' => 8 + 'highlight_series' => 8, ); $legend[] = array( 'title' => sprintf( __( '%s charged for shipping', 'woocommerce' ), '' . wc_price( $data->total_shipping ) . '' ), 'color' => $this->chart_colours['shipping_amount'], - 'highlight_series' => 5 + 'highlight_series' => 5, ); $legend[] = array( 'title' => sprintf( __( '%s worth of coupons used', 'woocommerce' ), '' . wc_price( $data->total_coupons ) . '' ), 'color' => $this->chart_colours['coupon_amount'], - 'highlight_series' => 4 + 'highlight_series' => 4, ); return $legend; @@ -435,7 +435,7 @@ class WC_Report_Sales_By_Date 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( @@ -447,7 +447,7 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report { 'item_count' => '#ecf0f1', 'shipping_amount' => '#5cc488', 'coupon_amount' => '#f1c40f', - 'refund_amount' => '#e74c3c' + 'refund_amount' => '#e74c3c', ); $current_range = ! empty( $_GET['range'] ) ? sanitize_text_field( $_GET['range'] ) : '7day'; @@ -513,7 +513,7 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report { 'shipping_tax_amounts' => $this->prepare_chart_data( $this->report_data->orders, 'post_date', 'total_shipping_tax', $this->chart_interval, $this->start_date, $this->chart_groupby ), 'tax_amounts' => $this->prepare_chart_data( $this->report_data->orders, 'post_date', 'total_tax', $this->chart_interval, $this->start_date, $this->chart_groupby ), 'net_order_amounts' => array(), - 'gross_order_amounts' => array() + 'gross_order_amounts' => array(), ); foreach ( $data['order_amounts'] as $order_amount_key => $order_amount_value ) { @@ -541,7 +541,7 @@ class WC_Report_Sales_By_Date extends WC_Admin_Report { 'net_order_amounts' => array_map( array( $this, 'round_chart_totals' ), array_values( $data['net_order_amounts'] ) ), 'shipping_amounts' => array_map( array( $this, 'round_chart_totals' ), array_values( $data['shipping_amounts'] ) ), 'coupon_amounts' => array_map( array( $this, 'round_chart_totals' ), array_values( $data['coupon_amounts'] ) ), - 'refund_amounts' => array_map( array( $this, 'round_chart_totals' ), array_values( $data['refund_amounts'] ) ) + 'refund_amounts' => array_map( array( $this, 'round_chart_totals' ), array_values( $data['refund_amounts'] ) ), ) ); ?>
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' ), '' . wc_price( $total_sales ) . '' ), 'color' => $this->chart_colours['sales_amount'], - 'highlight_series' => 1 + 'highlight_series' => 1, ); $legend[] = array( 'title' => sprintf( __( '%s purchases for the selected items', 'woocommerce' ), '' . ( $total_items ) . '' ), '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 '
'; 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 ''; @@ -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 ''; @@ -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 ''; @@ -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 ''; @@ -144,7 +144,7 @@ if ( ! defined( 'ABSPATH' ) ) { __( '— No Change —', 'woocommerce' ), - '1' => __( 'Change to:', 'woocommerce' ) + '1' => __( 'Change to:', 'woocommerce' ), ); foreach ( $options as $key => $value ) { echo ''; @@ -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 ''; @@ -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 ''; @@ -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 ''; @@ -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 ''; @@ -258,7 +258,7 @@ if ( ! defined( 'ABSPATH' ) ) { __( '— No Change —', 'woocommerce' ), - '1' => __( 'Change to:', 'woocommerce' ) + '1' => __( 'Change to:', 'woocommerce' ), ); foreach ( $options as $key => $value ) { echo ''; @@ -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 ''; @@ -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 ''; 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 ''; @@ -70,7 +70,7 @@ if ( ! defined( 'ABSPATH' ) ) { 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 ); }