WP eCommerce
[resolved] Move USA to top of Country list (6 posts)

  1. saiyajinss
    Posted 2 years ago #

    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.


  2. saiyajinss
    Posted 2 years ago #

    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?

  3. Jeffrey Schutzman
    Posted 2 years ago #

    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.

  4. saiyajinss
    Posted 1 year ago #

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

  5. saiyajinss
    Posted 1 year ago #

    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.

  6. Justin Sainton
    Plugin Author

    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic