Property | Type | Description | |
---|---|---|---|
$internal_meta_keys | array | Data stored in meta keys, but not considered "meta". | |
$meta_type | string | Internal meta type used to store user data. |
Method | Description | |
---|---|---|
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. |
Method | Description | |
---|---|---|
exclude_internal_meta_keys ( object $meta ) : boolean | Callback to remove unwanted meta data. |
Method | Description | |
---|---|---|
update_user_meta ( $customer ) | Helper method that updates all the meta for a customer. Used for update & create. |
public create ( &$customer ) |
protected exclude_internal_meta_keys ( object $meta ) : boolean | ||
$meta | object | |
return | boolean |
public get_last_order ( &$customer ) : WC_Order | false | ||
return | WC_Order | false |
public get_order_count ( &$customer ) : integer | ||
return | integer |
public get_total_spent ( &$customer ) : float | ||
return | float |
public search_customers ( string $term ) : array | ||
$term | string | |
return | array |
protected array $internal_meta_keys | ||
return | array |
protected string $meta_type | ||
return | string |