Skip to content

Commit

Permalink
Merge pull request #96 from SynergyWholesale/bugfix/SW-2484-fix-au-tl…
Browse files Browse the repository at this point in the history
…d-matchcase-conditions

bugfix/SW-2484-fix-au-tld-matchcase-conditions
  • Loading branch information
Sn0wCrack authored Dec 7, 2022
2 parents 60da65f + 8f879d4 commit 73be91f
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

use Illuminate\Database\Capsule\Manager as Capsule;
use Carbon\Carbon;
use Illuminate\Support\Str;

define('API_ENDPOINT', 'https://{{API}}');
define('WHOIS_URL', 'https://{{FRONTEND}}/home/whmcs-whois-json');
Expand Down Expand Up @@ -2287,7 +2288,7 @@ function synergywholesaledomains_ClientAreaCustomButtonArray(array $params)
'Manage DNSSEC Records' => 'manageDNSSEC',
];

if (substr($params['tld'], -3) == '.au') {
if (Str::endsWith($params['tld'], 'au')) {
$pages = array_merge($pages, ['Initiate CoR' => 'initiateAuCorClient']);
}

Expand Down Expand Up @@ -2537,7 +2538,7 @@ function synergywholesaledomains_AdminCustomButtonArray(array $params)
'Push' => 'push',
];

if (substr($params['tld'], -3) == '.au') {
if (Str::endsWith($params['tld'], 'au')) {
$buttons = array_merge($buttons, ['Initiate .au CoR' => 'initiateAuCor']);
}

Expand Down Expand Up @@ -3046,7 +3047,7 @@ function synergywholesaledomains_GetTldPricing(array $params)
$transfer_price = $extension->transfer;
$register_price = $extension->register_1_year;

if (preg_match('/\.au$/', $tld)) {
if (preg_match('/\.?au$/', $tld)) {
$transfer_price = 0.00;
}

Expand Down

0 comments on commit 73be91f

Please sign in to comment.