Skip to content

Commit

Permalink
Merge pull request #151 from godaddy/feat/remove-currencies
Browse files Browse the repository at this point in the history
feat: remove unsupported currencies
  • Loading branch information
cbicuti-godaddy authored Jul 5, 2023
2 parents a18a364 + e0d7ace commit 94ed041
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 5 deletions.
2 changes: 1 addition & 1 deletion class-plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ final class Plugin {
*
* @var string
*/
const VERSION = '2.2.11';
const VERSION = '2.2.12';

/**
* Plugin prefix.
Expand Down
9 changes: 8 additions & 1 deletion includes/class-settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ final class Settings {
*
* @var array
*/
static $currencies = [ 'default', 'USD', 'AED', 'ARS', 'AUD', 'BRL', 'CAD', 'CHF', 'CLP', 'CNY', 'COP', 'CZK', 'DKK', 'EGP', 'EUR', 'GBP', 'HKD', 'HUF', 'IDR', 'ILS', 'INR', 'JPY', 'KRW', 'MAD', 'MXN', 'MYR', 'NOK', 'NZD', 'PEN', 'PHP', 'PKR', 'PLN', 'RON', 'RUB', 'SAR', 'SEK', 'SGD', 'THB', 'TRY', 'TWD', 'UAH', 'UYU', 'VND', 'ZAR' ]; // @codingStandardsIgnoreLine
static $currencies = [ 'default', 'USD', 'AED', 'AUD', 'CAD', 'CHF', 'CLP', 'CNY', 'COP', 'DKK', 'EUR', 'GBP', 'HKD', 'IDR', 'ILS', 'INR', 'JPY', 'KRW', 'MXN', 'MYR', 'NOK', 'NZD', 'PEN', 'PHP', 'PKR', 'PLN', 'SAR', 'SEK', 'SGD', 'THB', 'TWD', 'UAH', 'VND', 'ZAR' ]; // @codingStandardsIgnoreLine

/**
* Array of markets.
Expand Down Expand Up @@ -761,6 +761,13 @@ public function render_settings_page() {

}

$currentCurrency = rstore_get_option('rstore_api_currency');
$currencies = Settings::$currencies;
if (!in_array($currentCurrency, $currencies)) {
rstore_update_option('rstore_api_currency', 'USD');
rstore_delete_option( 'next_sync' );
}

$active_tab = $this->get_active_tab();

$this->settings_output( $active_tab );
Expand Down
6 changes: 5 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
**Requires at least:** 4.6
**Tested up to:** 6.2.2
**Requires PHP:** 5.4
**Stable tag:** 2.2.11
**Stable tag:** 2.2.12
**License:** GPL-2.0
**License URI:** https://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -102,6 +102,10 @@ While we recommend you use our widgets for your storefront, we do have a shortco
You can add `?domainToCheck=example.com` to your query string on any page that has the domain search widget and the widget will perform an automatic search on page load.

## Changelog ##
### 2.2.12 - July 2023 ###

* Update: Remove currencies ARS, BRL, CZK, EGP, HUF, MAD, RON, RUB, TRY, UYU

### 2.2.11 - June 2023 ###

* Update: Asset updates
Expand Down
6 changes: 5 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tags: reseller, program, storefront, products, posts, shortcode, ec
Requires at least: 4.6
Tested up to: 6.2.2
Requires PHP: 5.4
Stable tag: 2.2.11
Stable tag: 2.2.12
License: GPL-2.0
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -98,6 +98,10 @@ While we recommend you use our widgets for your storefront, we do have a shortco
You can add `?domainToCheck=example.com` to your query string on any page that has the domain search widget and the widget will perform an automatic search on page load.

== Changelog ==
= 2.2.12 - July 2023 =

* Update: Remove currencies ARS, BRL, CZK, EGP, HUF, MAD, RON, RUB, TRY, UYU

= 2.2.11 - June 2023 =

* Update: Asset updates
Expand Down
2 changes: 1 addition & 1 deletion reseller-store.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Plugin Name: Reseller Store
* Description: Sell hosting, domains, and more right from your WordPress site.
* Version: 2.2.11
* Version: 2.2.12
* Author: GoDaddy
* Author URI: https://reseller.godaddy.com/
* License: GPL-2.0
Expand Down

0 comments on commit 94ed041

Please sign in to comment.