Details
Description
When checking a domain's availability, if multiple TLDs are selected and they are subsets of one another (e.g. ".co" and ".com.co"), then it is possible for the pricing for both results to use only the pricing from the ".co" package. In this case, the pricing for ".com.co" is incorrect.
This issue is due to the order in which the appropriate packages are determined from the package group for the set of TLDs.
To resolve the issue, sort the TLDs such that longer TLDs (e.g. ".com.co") are evaluated before shorter subset TLDs (e.g. ".co").
Update /order/lib/order_types/domain/order_type_domain.php.
in ::getTlds()
Replace:
ksort($tlds);
with:
array_multisort( array_map( function($tld) { return strlen($tld); }, array_keys($tlds) ), SORT_DESC, $tlds, array_keys($tlds), SORT_ASC );
This will sort the TLDs by length, then order them A-Z,
e.g.
.com.net
.com.co
.co.uk
.biz
.com
.net
.co
.uk