PHP 클래스 WC_Customer_Data_Store

저자: WooThemes
상속: extends WC_Data_Store_WP, implements WC_Customer_Data_Store_Interface, implements WC_Object_Data_Store_Interface
파일 보기 프로젝트 열기: woocommerce/woocommerce

보호된 프로퍼티들

프로퍼티 타입 설명
$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