PHP Класс WC_Customer_Data_Store

Автор: WooThemes
Наследование: extends WC_Data_Store_WP, implements WC_Customer_Data_Store_Interface, implements WC_Object_Data_Store_Interface
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$internal_meta_keys array Data stored in meta keys, but not considered "meta".
$meta_type string Internal meta type used to store user data.

Открытые методы

Метод Описание
create ( &$customer ) Method to create a new customer in the database.
delete ( &$customer, array $args = [] ) Deletes a customer from the database.
get_last_order ( &$customer ) : WC_Order | false Gets the customers last order.
get_order_count ( &$customer ) : integer Return the number of orders this customer has.
get_total_spent ( &$customer ) : float Return how much money this customer has spent.
read ( &$customer ) Method to read a customer object.
search_customers ( string $term ) : array Search customers and return customer IDs.
update ( &$customer ) Updates a customer in the database.

Защищенные методы

Метод Описание
exclude_internal_meta_keys ( object $meta ) : boolean Callback to remove unwanted meta data.

Приватные методы

Метод Описание
update_user_meta ( $customer ) Helper method that updates all the meta for a customer. Used for update & create.

Описание методов

create() публичный Метод

Method to create a new customer in the database.
С версии: 2.7.0
public create ( &$customer )

delete() публичный Метод

Deletes a customer from the database.
С версии: 2.7.0
public delete ( &$customer, array $args = [] )
$args array Array of args to pass to the delete method.

exclude_internal_meta_keys() защищенный Метод

Callback to remove unwanted meta data.
protected exclude_internal_meta_keys ( object $meta ) : boolean
$meta object
Результат boolean

get_last_order() публичный Метод

Gets the customers last order.
С версии: 2.7.0
public get_last_order ( &$customer ) : WC_Order | false
Результат WC_Order | false

get_order_count() публичный Метод

Return the number of orders this customer has.
С версии: 2.7.0
public get_order_count ( &$customer ) : integer
Результат integer

get_total_spent() публичный Метод

Return how much money this customer has spent.
С версии: 2.7.0
public get_total_spent ( &$customer ) : float
Результат float

read() публичный Метод

Method to read a customer object.
С версии: 2.7.0
public read ( &$customer )

search_customers() публичный Метод

Search customers and return customer IDs.
public search_customers ( string $term ) : array
$term string
Результат array

update() публичный Метод

Updates a customer in the database.
С версии: 2.7.0
public update ( &$customer )

Описание свойств

$internal_meta_keys защищенное свойство

Data stored in meta keys, but not considered "meta".
С версии: 2.7.0
protected array $internal_meta_keys
Результат array

$meta_type защищенное свойство

Internal meta type used to store user data.
protected string $meta_type
Результат string