Skip to content

Add/currency of Angola #5867

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions includes/country-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ function edd_get_shop_states( $country = null ) {
case 'US' :
$states = edd_get_states_list();
break;
case 'AO' :
$states = edd_get_angola_list();
break;
case 'CA' :
$states = edd_get_provinces_list();
break;
Expand Down Expand Up @@ -476,6 +479,38 @@ function edd_get_states_list() {

return apply_filters( 'edd_us_states', $states );
}
/**
* Get Angola States
*
* @since 1.1
* @return array $states A list of states
*/
function edd_get_angola_list() {
$states = array(
'' => '',
'BGO' => __( 'Bengo', 'edd' ),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the formatting be fixed up here please - to ensure tabs are used and not spaces.

'BLU' => __( 'Benguela', 'edd' ),
'BIE' => __( 'Bié', 'edd' ),
'CAB' => __( 'Cabinda', 'edd' ),
'CNN' => __( 'Cunene', 'edd' ),
'HUA' => __( 'Huambo', 'edd' ),
'HUI' => __( 'Huíla', 'edd' ),
'CCU' => __( 'Kuando Kubango', 'edd' ),
'CNO' => __( 'Kwanza-Norte', 'edd' ),
'CUS' => __( 'Kwanza-Sul', 'edd' ),
'LUA' => __( 'Luanda', 'edd' ),
'LNO' => __( 'Lunda-Norte', 'edd' ),
'LSU' => __( 'Lunda-Sul', 'edd' ),
'MAL' => __( 'Malanje', 'edd' ),
'MOX' => __( 'Moxico', 'edd' ),
'NAM' => __( 'Namibe', 'edd' ),
'UIG' => __( 'Uíge', 'edd' ),
'ZAI' => __( 'Zaire', 'edd' )

);

return apply_filters( 'edd_angola_states', $states );
}

/**
* Get Provinces List
Expand Down Expand Up @@ -1622,3 +1657,4 @@ function edd_get_spain_states_list() {

return apply_filters( 'edd_spain_states', $states );
}

59 changes: 32 additions & 27 deletions includes/misc-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -301,33 +301,35 @@ function edd_is_host( $host = false ) {
*/
function edd_get_currencies() {
$currencies = array(
'USD' => __( 'US Dollars ($)', 'easy-digital-downloads' ),
'EUR' => __( 'Euros (€)', 'easy-digital-downloads' ),
'GBP' => __( 'Pound Sterling (£)', 'easy-digital-downloads' ),
'AUD' => __( 'Australian Dollars ($)', 'easy-digital-downloads' ),
'BRL' => __( 'Brazilian Real (R$)', 'easy-digital-downloads' ),
'CAD' => __( 'Canadian Dollars ($)', 'easy-digital-downloads' ),
'CZK' => __( 'Czech Koruna', 'easy-digital-downloads' ),
'DKK' => __( 'Danish Krone', 'easy-digital-downloads' ),
'HKD' => __( 'Hong Kong Dollar ($)', 'easy-digital-downloads' ),
'HUF' => __( 'Hungarian Forint', 'easy-digital-downloads' ),
'ILS' => __( 'Israeli Shekel (₪)', 'easy-digital-downloads' ),
'JPY' => __( 'Japanese Yen (¥)', 'easy-digital-downloads' ),
'MYR' => __( 'Malaysian Ringgits', 'easy-digital-downloads' ),
'MXN' => __( 'Mexican Peso ($)', 'easy-digital-downloads' ),
'NZD' => __( 'New Zealand Dollar ($)', 'easy-digital-downloads' ),
'NOK' => __( 'Norwegian Krone', 'easy-digital-downloads' ),
'PHP' => __( 'Philippine Pesos', 'easy-digital-downloads' ),
'PLN' => __( 'Polish Zloty', 'easy-digital-downloads' ),
'SGD' => __( 'Singapore Dollar ($)', 'easy-digital-downloads' ),
'SEK' => __( 'Swedish Krona', 'easy-digital-downloads' ),
'CHF' => __( 'Swiss Franc', 'easy-digital-downloads' ),
'TWD' => __( 'Taiwan New Dollars', 'easy-digital-downloads' ),
'THB' => __( 'Thai Baht (฿)', 'easy-digital-downloads' ),
'INR' => __( 'Indian Rupee (₹)', 'easy-digital-downloads' ),
'TRY' => __( 'Turkish Lira (₺)', 'easy-digital-downloads' ),
'RIAL' => __( 'Iranian Rial (﷼)', 'easy-digital-downloads' ),
'RUB' => __( 'Russian Rubles', 'easy-digital-downloads' )

'USD' => __( 'US Dollars ($)', 'edd' ),
'AOA' => __( 'Kwanz Angola (Kz)', 'edd' ),
'EUR' => __( 'Euros (€)', 'edd' ),
'GBP' => __( 'Pounds Sterling (£)', 'edd' ),
'AUD' => __( 'Australian Dollars ($)', 'edd' ),
'BRL' => __( 'Brazilian Real (R$)', 'edd' ),
'CAD' => __( 'Canadian Dollars ($)', 'edd' ),
'CZK' => __( 'Czech Koruna', 'edd' ),
'DKK' => __( 'Danish Krone', 'edd' ),
'HKD' => __( 'Hong Kong Dollar ($)', 'edd' ),
'HUF' => __( 'Hungarian Forint', 'edd' ),
'ILS' => __( 'Israeli Shekel (₪)', 'edd' ),
'JPY' => __( 'Japanese Yen (¥)', 'edd' ),
'MYR' => __( 'Malaysian Ringgits', 'edd' ),
'MXN' => __( 'Mexican Peso ($)', 'edd' ),
'NZD' => __( 'New Zealand Dollar ($)', 'edd' ),
'NOK' => __( 'Norwegian Krone', 'edd' ),
'PHP' => __( 'Philippine Pesos', 'edd' ),
'PLN' => __( 'Polish Zloty', 'edd' ),
'SGD' => __( 'Singapore Dollar ($)', 'edd' ),
'SEK' => __( 'Swedish Krona', 'edd' ),
'CHF' => __( 'Swiss Franc', 'edd' ),
'TWD' => __( 'Taiwan New Dollars', 'edd' ),
'THB' => __( 'Thai Baht (฿)', 'edd' ),
'INR' => __( 'Indian Rupee (₹)', 'edd' ),
'TRY' => __( 'Turkish Lira (₺)', 'edd' ),
'RIAL' => __( 'Iranian Rial (﷼)', 'edd' ),
'RUB' => __( 'Russian Rubles', 'edd' )
);

return apply_filters( 'edd_currencies', $currencies );
Expand Down Expand Up @@ -364,6 +366,9 @@ function edd_currency_symbol( $currency = '' ) {
case "BRL" :
$symbol = 'R$';
break;
case "AOA" :
$symbol = 'Kz';
break;
case "EUR" :
$symbol = '€';
break;
Expand Down