use new list of countries and adapt backend and frontend to it

This commit is contained in:
GotPPay
2018-09-13 05:50:10 +02:00
committed by Bilal Catic
parent 5d91576fb7
commit b93aed107b
4 changed files with 28 additions and 47 deletions

View File

@@ -8,7 +8,7 @@ defined( 'ABSPATH' ) || exit;
class Wiaas_User {
public static function init() {
include_once dirname( __FILE__ ) . '/user/class-wiaas-user-profile.php';
include_once dirname( __FILE__ ) . '/class-wiaas-countries.php';
add_action('init', array(__CLASS__, 'load_user_organization'));
add_action('plugins_loaded', array(__CLASS__, 'remove_default_user_groups'), 30);
@@ -45,7 +45,7 @@ class Wiaas_User {
if ($received_address->id){
$updated = array(
'id' => $received_address->id,
'countryName' => Wiaas_User_Profile::get_country_name_by_id($received_address->idCountrySelected),
'countryName' => Wiaas_Countries::get_country_name_by_id($received_address->idCountrySelected),
'deliveryMail' => $received_address->deliveryMail,
'idCountrySelected' => $received_address->idCountrySelected,
'city' => $received_address->city,
@@ -64,7 +64,7 @@ class Wiaas_User {
}else{
$new_delivery_address = array(
'id' => time(),
'countryName' => Wiaas_User_Profile::get_country_name_by_id($received_address->idCountrySelected),
'countryName' => Wiaas_Countries::get_country_name_by_id($received_address->idCountrySelected),
'deliveryMail' => $received_address->deliveryMail,
'idCountrySelected' => $received_address->idCountrySelected,
'city' => $received_address->city,
@@ -89,7 +89,7 @@ class Wiaas_User {
if ($received_address->id){
$updated = array(
'id' => $received_address->id,
'countryName' => Wiaas_User_Profile::get_country_name_by_id($received_address->idCountrySelected),
'countryName' => Wiaas_Countries::get_country_name_by_id($received_address->idCountrySelected),
'deliveryMail' => $received_address->deliveryMail,
'idCountrySelected' => $received_address->idCountrySelected,
'city' => $received_address->city,
@@ -108,7 +108,7 @@ class Wiaas_User {
}else{
$new_billing_address = array(
'id' => time(),
'countryName' => Wiaas_User_Profile::get_country_name_by_id($received_address->idCountrySelected),
'countryName' => Wiaas_Countries::get_country_name_by_id($received_address->idCountrySelected),
'deliveryMail' => $received_address->deliveryMail,
'idCountrySelected' => $received_address->idCountrySelected,
'city' => $received_address->city,