Jump to content

Remove country but phone area country code still shows


robetus

Recommended Posts

Using WHMCS 7.5.1 and I removed countires by adding the following to a countries.json file:

{
    "IR": false, "SD": false, "SY": false, "CU": false
}

It is working for the country drop down, but the country code in the phone number selector is still showing the countries. Any ideas on how I can remove these countries from everywhere in my WHMCS install?

Link to comment
Share on other sites

9 hours ago, robetus said:

Any ideas on how I can remove these countries from everywhere in my WHMCS install?

not sure about "everywhere", but to remove them from the phone number dropdown I think will require editing /templates/six (or custom)/js/scripts.min.js - or more conveniently, editing scripts.js (in the same directory), minifying it and then overwriting scripts.min.js with the minified code.

at line #36328 in scripts.js, there is the following option...

// don't display these countries
excludeCountries: [],

change that to...

// don't display these countries
excludeCountries: ["ir", "sd", "sy", "cu"],

and then those countries will be removed from the phone number dropdown list, e.g the removal of Cuba...

BENo4pm.png

unless/until WHMCS bring in another way to do this (i'm not sure you could use a hook for this but could be wrong), then you will almost certainly have to do this process after every WHMCS update.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated