Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: change Swiss Franc symbol to CHF instead of Fr. #4086

Closed
2 tasks done
Benunc opened this issue Apr 30, 2019 · 0 comments · Fixed by #4163
Closed
2 tasks done

fix: change Swiss Franc symbol to CHF instead of Fr. #4086

Benunc opened this issue Apr 30, 2019 · 0 comments · Fixed by #4163
Assignees
Milestone

Comments

@Benunc
Copy link
Member

Benunc commented Apr 30, 2019

Bug Report

User Story

As a site with Swiss Francs as the currency I want the symbol to default to CHF instead of Fr. because that's the generally accepted abbreviation.

From the customer:

The correct Currency Symbol for Swiss Franc used in Switzerland as of today is "CHF" not "Fr." anymore. Is there a way I can change that? Or can you please change this for all users. Nobody is using Fr. anymore in Switzerland.

Current Behavior

The abbreviate in the currency dropdowns is Fr

Expected Behavior

It should be CHF

Bug Type

  • This bug describes functionality that the underlying premise has changed, so it worked, but still needs changing.

Steps to Reproduce

  1. Go to the currency settings at Donations > Settings > General > Currency
  2. Select Swiss Francs
  3. Wrong symbol.

Possible Solution

I gave the customer this snippet as a workaround:

function my_give_add_custom_currency( $currencies ) {
	unset( $currencies['CHF']);

	$currencies['CHF'] = array(
		'admin_label' => sprintf( __( 'Swiss Franc (%1$s)', 'give' ), 'CHF' ),
		'symbol'      => 'CHF',
		'setting'     => array(
			'currency_position'   => 'before',
			'thousands_separator' => ' ',
			'decimal_separator'   => '.',
			'number_decimals'     => 2,
		),
	);
	return $currencies;
}
add_filter( 'give_currencies', 'my_give_add_custom_currency', 10, 1 );

Related

https://secure.helpscout.net/conversation/835820223/38088/

Acceptance Criteria

  • The Swiss Franc is properly represented everywhere it shows up in our code.

Environment

WordPress System Info ### WordPress Environment ###

Home URL: https://livegive.wpsteward.com
Site URL: https://livegive.wpsteward.com
WP Version: 5.1.1
WP Multisite: –
WP Memory Limit: 256 MB
WP Debug Mode: ✔
WP Cron: ✔
Language: en_US
Permalink Structure: /%year%/%monthnum%/%day%/%postname%/
Show on Front: posts
Table Prefix Length: wp_8138bfdc07_
Table Prefix Length: 14
Table Prefix Status: Acceptable
Admin AJAX: Accessible
Registered Post Statuses: publish, future, draft, pending, private, trash, auto-draft, inherit, request-pending, request-confirmed, request-failed, request-completed, refunded, failed, revoked, cancelled, abandoned, processing, preapproval, give_subscription

Server Environment

Hosting Provider: DBH: localhost, SRV: livegive.wpsteward.com
TLS Connection: Connection uses TLS 1.2
TLS Connection: Probably Okay
Server Info: Apache/2.4.39 (Unix) OpenSSL/1.0.1f
PHP Version: 7.1.28
PHP Post Max Size: 1 GB
PHP Time Limit: 30
PHP Max Input Vars: 5000
PHP Max Upload Size: 512 MB
cURL Version: ❌ 7.35.0, OpenSSL/1.0.1f - We recommend a minimum cURL version of 7.40.
SUHOSIN Installed: –
MySQL Version: ❌ 5.5.62 - We recommend a minimum MySQL version of 5.6. See: WordPress Requirements
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ✔
DOMDocument: ✔
gzip: ✔
GD Graphics Library: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔

Give Configuration

Give Version: 2.4.5
Give Cache: Enabled
Database Updates: All DB Updates Completed.
Database Tables: ✔ wp_8138bfdc07_give_donors - 1.0✔ wp_8138bfdc07_give_donormeta - 1.0✔ wp_8138bfdc07_give_comments - 1.0✔ wp_8138bfdc07_give_commentmeta - 1.0✔ wp_8138bfdc07_give_sessions - 1.0✔ wp_8138bfdc07_give_logs - 1.0✔ wp_8138bfdc07_give_logmeta - 1.0✔ wp_8138bfdc07_give_formmeta - 1.0✔ wp_8138bfdc07_give_sequential_ordering - 1.0✔ wp_8138bfdc07_give_donationmeta - 1.0
Give Cache: Enabled
Give Cache: ✔New Donation✔Donation Receipt✔New Offline Donation✔Offline Donation Instructions❌New User Registration✔User Registration Information❌Donor Note❌Email access✔Daily Email Report✔Weekly Email Report✔Monthly Email Report✔Renewal Receipt Email❌Renewal Receipt Email✔Subscription Cancelled Email❌Subscription Cancelled Email✔Subscription Completed Email✔Subscription Reminder Email❌Subscriptions Email Access
Upgraded From: 2.4.4
Test Mode: Enabled
Currency Code: USD
Currency Position: Before
Decimal Separator: .
Thousands Separator: ,
Success Page: https://livegive.wpsteward.com/donation-confirmation/
Failure Page: –
Donation History Page: https://livegive.wpsteward.com/donation-history/
Give Forms Slug: /donations/
Enabled Payment Gateways: Test Donation, Stripe - Credit Card, PayPal Payments Pro, Stripe + Plaid, PayPal Standard, Mollie Gateway, Braintree, Offline Donation
Default Payment Gateway: Test Donation
PayPal IPN Verification: Disabled
PayPal IPN Notifications: IPN received for #2451 ( 81G0673612678753U ) on 04/18/2019 at 16:49. Status N/A
Donor Email Access: Disabled

Active Give Add-ons

Give - Authorize.net Gateway: ✔ Licensed – by GiveWP – 1.4.6
Give - Braintree Gateway: ✔ Licensed – by GiveWP – 1.2.4
Give - Currency Switcher: ✔ Licensed – by GiveWP – 1.3.1
Give - Email Reports: ✔ Licensed – by WordImpress – 1.1.2
Give - Fee Recovery: ✔ Licensed – by GiveWP – 1.7.4
Give - Form Countdown: ❌ Unlicensed – by GiveWP – 1.0.1
Give - Form Field Manager: ✔ Licensed – by GiveWP – 1.4.3
Give - Google Analytics Donation Tracking: ✔ Licensed – by GiveWP – 1.2.2
Give - MailChimp: ✔ Licensed – by GiveWP – 1.4.4
Give - Manual Donations: ✔ Licensed – by GiveWP – 1.4.3
Give - Mollie Gateway: ❌ Unlicensed – by GiveWP – 1.2.1
Give - PayPal Pro Gateway: ✔ Licensed – by GiveWP – 1.2.1
Give - PDF Receipts: ✔ Licensed – by GiveWP – 2.3.3
Give - Per Form Gateways: ✔ Licensed – by GiveWP – 1.0.2
Give - Recurring Donations: ✔ Licensed – by GiveWP – 1.8.12
Give - Stripe Gateway: ✔ Licensed – by GiveWP – 2.1.8
Give - Tributes: ✔ Licensed – by GiveWP – 1.5.2
Give - Zapier: ✔ Licensed – by GiveWP – 1.2.2

Other Active Plugins

Ben's Helper Functions: by BenUNC –
Disable Gutenberg: by Jeff Starr – 1.8.1
Email Cop: by Ashfame – 0.1.1

Inactive Plugins

Give - AmeriCloud Payments: by AmeriCloud Solutions, Inc. – 1.3.1
Give - Database HealthCheck: by WordImpress – 0.0.2
Give - PayFast Payment Gateway: by WordImpress – 1.0.2
Google Analytics for WordPress by MonsterInsights: by MonsterInsights – 7.6.0
Hello Dolly: by Matt Mullenweg – 1.6
Loco Translate: by Tim Whitlock – 2.2.2
Query Monitor: by John Blackbourn – 3.3.4
Shortcode in Menus: by Gagan Deep Singh – 3.5
User Switching: by John Blackbourn & contributors – 1.5.0
WordPress Event Ticketing: by Tickera.com – 3.3.2
WP Crontrol: by John Blackbourn & crontributors – 1.7.1

Active MU Plugins

api-hacks.php: by –
helpr-mu.php: by –
per-form-currency.php: by –

Theme

Name: Twenty Seventeen
Version: 2.1
Author URL: https://wordpress.org/
Child Theme: No – If you're modifying Give on a parent theme you didn't build personally, then we recommend using a child theme. See: How to Create a Child Theme

ravinderk added a commit that referenced this issue Jul 9, 2019
fix: change Swiss Franc symbol to CHF instead of Fr. #4086
@ravinderk ravinderk added this to the July 2019 milestone Jul 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants