Support » Plugin: WP eCommerce » Move USA to top of Country list

  • Resolved saiyajinss


    Is there a way to move USA to the top of the country drop down list? 99.9% of my customers are in the USA and a few have complained about having to scroll through all those other countries. I have removed a few but I want to allow most countries to purchase from my store.

Viewing 5 replies - 1 through 5 (of 5 total)
  • So it seems that the list is generated when the plugin is installed and resides in the data base. Does anyone know how to change this?

    You are probably going to have to modify the code. The WPSC_Countries class has a private function ‘_compare_countries_by_name’ that does a text string comparison. You might want to change that function to always show US as the first country.

    I tried a few things without any luck. Does anyone else have any suggestions? Maybe as part of a future upgrade from the developers?

    I just noticed after the last update all of the countries are now in a random order making it vary hard to find anything in the list. I really do not want to remove too many countries since we get international orders. Any help would be appreciated.

    Plugin Author Justin Sainton


    Hi saiyajinss,

    I would try flushing your transients if at all possible.

    The next version of WP eCommerce will have filters on the WPSC_Countries::get_countries() and WPSC_Countries::get_countries_array() functions. They will be named wpsc_get_countries and wpsc_get_countries_array, respectively.

    If you want to add those now, you’ll be in great shape to use them to sort countries however you see fit.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Move USA to top of Country list’ is closed to new replies.