PHP Class WC_Customer_Data_Store_Session

Author: WooThemes
Inheritance: extends WC_Data_Store_WP, implements WC_Customer_Data_Store_Interface, implements WC_Object_Data_Store_Interface
Afficher le fichier Open project: woocommerce/woocommerce

Protected Properties

Свойство Type Description
$session_keys array ..)

Méthodes publiques

Méthode Description
create ( &$customer ) Simply update the session.
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 ) Read customer data from the session.
save_to_session ( $customer ) Saves all customer data to the session.
update ( &$customer ) Simply update the session.

Méthodes protégées

Méthode Description
set_defaults ( &$customer ) Load default values if props are unset.

Method Details

create() public méthode

Simply update the session.
public create ( &$customer )

delete() public méthode

Deletes a customer from the database.
Since: 2.7.0
public delete ( &$customer, array $args = [] )
$args array Array of args to pass to the delete method.

get_last_order() public méthode

Gets the customers last order.
Since: 2.7.0
public get_last_order ( &$customer ) : WC_Order | false
Résultat WC_Order | false

get_order_count() public méthode

Return the number of orders this customer has.
Since: 2.7.0
public get_order_count ( &$customer ) : integer
Résultat integer

get_total_spent() public méthode

Return how much money this customer has spent.
Since: 2.7.0
public get_total_spent ( &$customer ) : float
Résultat float

read() public méthode

Read customer data from the session.
Since: 2.7.0
public read ( &$customer )

save_to_session() public méthode

Saves all customer data to the session.
public save_to_session ( $customer )

set_defaults() protected méthode

Load default values if props are unset.
protected set_defaults ( &$customer )

update() public méthode

Simply update the session.
public update ( &$customer )

Property Details

$session_keys protected_oe property

..)
protected array $session_keys
Résultat array