Implement shop search and refactor

This commit is contained in:
Almira Krdzic
2018-10-17 00:36:19 +02:00
parent afab22a30b
commit 8769606a4b
24 changed files with 379 additions and 182 deletions

View File

@@ -33,6 +33,18 @@ class Wiaas_Customer {
return $result;
}
/**
* Retrieve available shops for customer
*
* @return array of available shops for customer
*/
public static function get_customer_shops() {
$customer_id = wiaas_get_current_user_organization_id();
return Wiaas_Shop_DB::get_customer_shops($customer_id);
}
public static function get_customer_profile_addresses($customer_id){
return get_user_meta($customer_id, 'profile_addresses', true) ?: [];
}