Support » Plugin: Stripe Payments » Countries are not in alphabetical order

  • I’m using the plugin in Spanish and getting messages from customers saying they can’t make the payment because their countries don’t appear in the list when typing their addresses. I checked and the problem is the countries don’t appear in alphabetical order. For example, Spain in Spanish is “España”, and instead of appearing in the “E”, it still appears in the “S” as if it were written in English.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Alexander C.



    Indeed, translated countries are not sorted by name.

    You can fix that by adding this to your theme’s functions.php file:

    function asp_sort_countries_by_name( $countries ) {
    	asort( $countries );
    	return $countries;
    add_filter( 'asp_ng_pp_countries_list', 'asp_sort_countries_by_name' );

    Thank you. Please fix this in future releases.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.