diff --git a/includes/admin/class-wc-admin-setup-wizard.php b/includes/admin/class-wc-admin-setup-wizard.php index 14c11081d8c..255776aa251 100644 --- a/includes/admin/class-wc-admin-setup-wizard.php +++ b/includes/admin/class-wc-admin-setup-wizard.php @@ -481,7 +481,7 @@ class WC_Admin_Setup_Wizard { $state = WC()->countries->get_base_state(); $country = WC()->countries->get_base_country(); $postcode = WC()->countries->get_base_postcode(); - $currency = get_option( 'woocommerce_currency', 'GBP' ); + $currency = get_option( 'woocommerce_currency', 'USD' ); $product_type = get_option( 'woocommerce_product_type', 'both' ); $sell_in_person = get_option( 'woocommerce_sell_in_person', 'none_selected' ); diff --git a/includes/admin/settings/class-wc-settings-general.php b/includes/admin/settings/class-wc-settings-general.php index 28864828d0d..1476c428c0c 100644 --- a/includes/admin/settings/class-wc-settings-general.php +++ b/includes/admin/settings/class-wc-settings-general.php @@ -229,7 +229,7 @@ class WC_Settings_General extends WC_Settings_Page { 'title' => __( 'Currency', 'woocommerce' ), 'desc' => __( 'This controls what currency prices are listed at in the catalog and which currency gateways will take payments in.', 'woocommerce' ), 'id' => 'woocommerce_currency', - 'default' => 'GBP', + 'default' => 'USD', 'type' => 'select', 'class' => 'wc-enhanced-select', 'desc_tip' => true, diff --git a/tests/legacy/unit-tests/formatting/functions.php b/tests/legacy/unit-tests/formatting/functions.php index 7ddc4ba9865..ae237dacf6e 100644 --- a/tests/legacy/unit-tests/formatting/functions.php +++ b/tests/legacy/unit-tests/formatting/functions.php @@ -593,32 +593,32 @@ class WC_Tests_Formatting_Functions extends WC_Unit_Test_Case { */ public function test_wc_price() { // Common prices. - $this->assertEquals( '£1.00', wc_price( 1 ) ); - $this->assertEquals( '£1.10', wc_price( 1.1 ) ); - $this->assertEquals( '£1.17', wc_price( 1.17 ) ); - $this->assertEquals( '£1,111.17', wc_price( 1111.17 ) ); - $this->assertEquals( '£0.00', wc_price( 0 ) ); + $this->assertEquals( '$1.00', wc_price( 1 ) ); + $this->assertEquals( '$1.10', wc_price( 1.1 ) ); + $this->assertEquals( '$1.17', wc_price( 1.17 ) ); + $this->assertEquals( '$1,111.17', wc_price( 1111.17 ) ); + $this->assertEquals( '$0.00', wc_price( 0 ) ); // Different currency. - $this->assertEquals( '$1,111.17', wc_price( 1111.17, array( 'currency' => 'USD' ) ) ); + $this->assertEquals( '£1,111.17', wc_price( 1111.17, array( 'currency' => 'GBP' ) ) ); // Negative price. - $this->assertEquals( '-£1.17', wc_price( -1.17 ) ); + $this->assertEquals( '-$1.17', wc_price( -1.17 ) ); // Bogus prices. - $this->assertEquals( '£0.00', wc_price( null ) ); - $this->assertEquals( '£0.00', wc_price( 'Q' ) ); - $this->assertEquals( '£0.00', wc_price( 'ಠ_ಠ' ) ); + $this->assertEquals( '$0.00', wc_price( null ) ); + $this->assertEquals( '$0.00', wc_price( 'Q' ) ); + $this->assertEquals( '$0.00', wc_price( 'ಠ_ಠ' ) ); // Trim zeros. add_filter( 'woocommerce_price_trim_zeros', '__return_true' ); - $this->assertEquals( '£1', wc_price( 1.00 ) ); + $this->assertEquals( '$1', wc_price( 1.00 ) ); remove_filter( 'woocommerce_price_trim_zeros', '__return_true' ); // Ex tax label. $calc_taxes = get_option( 'woocommerce_calc_taxes' ); update_option( 'woocommerce_calc_taxes', 'yes' ); - $this->assertEquals( '£1,111.17 (ex. tax)', wc_price( '1111.17', array( 'ex_tax_label' => true ) ) ); + $this->assertEquals( '$1,111.17 (ex. tax)', wc_price( '1111.17', array( 'ex_tax_label' => true ) ) ); update_option( 'woocommerce_calc_taxes', $calc_taxes ); } @@ -926,7 +926,7 @@ class WC_Tests_Formatting_Functions extends WC_Unit_Test_Case { * @since 3.3.0 */ public function test_wc_format_sale_price() { - $this->assertEquals( ' £5.00', wc_format_sale_price( '10', '5' ) ); + $this->assertEquals( ' $5.00', wc_format_sale_price( '10', '5' ) ); } /** @@ -935,7 +935,7 @@ class WC_Tests_Formatting_Functions extends WC_Unit_Test_Case { * @since 3.3.0 */ public function test_wc_format_price_range() { - $this->assertEquals( '£10.00£5.00', wc_format_price_range( '10', '5' ) ); + $this->assertEquals( '$10.00$5.00', wc_format_price_range( '10', '5' ) ); } /** diff --git a/tests/legacy/unit-tests/product/data.php b/tests/legacy/unit-tests/product/data.php index b3beb1f9f2a..09c5f78ea57 100644 --- a/tests/legacy/unit-tests/product/data.php +++ b/tests/legacy/unit-tests/product/data.php @@ -259,15 +259,15 @@ class WC_Tests_Product_Data extends WC_Unit_Test_Case { $product = wc_get_product( $product1_id ); $this->assertEquals( $product1_id, $product->get_id() ); - $this->assertEquals( ' £7.00', $product->get_price_html() ); + $this->assertEquals( ' $7.00', $product->get_price_html() ); $product = wc_get_product( $product2_id ); $this->assertEquals( $product2_id, $product->get_id() ); - $this->assertEquals( ' £16.00', $product->get_price_html() ); + $this->assertEquals( ' $16.00', $product->get_price_html() ); $product = wc_get_product( $product3_id ); $this->assertEquals( $product3_id, $product->get_id() ); - $this->assertEquals( '£50.00', $product->get_price_html() ); + $this->assertEquals( '$50.00', $product->get_price_html() ); } /** diff --git a/tests/legacy/unit-tests/util/class-wc-tests-core-functions.php b/tests/legacy/unit-tests/util/class-wc-tests-core-functions.php index 8f5b1419fbe..6f2c17b7d5e 100644 --- a/tests/legacy/unit-tests/util/class-wc-tests-core-functions.php +++ b/tests/legacy/unit-tests/util/class-wc-tests-core-functions.php @@ -30,7 +30,7 @@ class WC_Tests_Core_Functions extends WC_Unit_Test_Case { */ public function test_get_woocommerce_currency() { - $this->assertEquals( 'GBP', get_woocommerce_currency() ); + $this->assertEquals( 'USD', get_woocommerce_currency() ); } /** @@ -222,10 +222,10 @@ class WC_Tests_Core_Functions extends WC_Unit_Test_Case { public function test_get_woocommerce_currency_symbol() { // Default currency. - $this->assertEquals( '£', get_woocommerce_currency_symbol() ); + $this->assertEquals( '$', get_woocommerce_currency_symbol() ); // Given specific currency. - $this->assertEquals( '$', get_woocommerce_currency_symbol( 'USD' ) ); + $this->assertEquals( '£', get_woocommerce_currency_symbol( 'GBP' ) ); // Each case. foreach ( array_keys( get_woocommerce_currencies() ) as $currency_code ) {