2016-11-14 18:18:08 +00:00
|
|
|
<?php
|
2018-03-06 08:14:45 +00:00
|
|
|
/**
|
|
|
|
* Customer Data Store Interface
|
|
|
|
*
|
|
|
|
* @version 3.0.0
|
|
|
|
* @package WooCommerce/Interface
|
|
|
|
*/
|
|
|
|
|
2016-11-14 18:18:08 +00:00
|
|
|
if ( ! defined( 'ABSPATH' ) ) {
|
|
|
|
exit;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* WC Customer Data Store Interface
|
|
|
|
*
|
|
|
|
* Functions that must be defined by customer store classes.
|
|
|
|
*
|
2017-03-15 16:36:53 +00:00
|
|
|
* @version 3.0.0
|
2016-11-14 18:18:08 +00:00
|
|
|
*/
|
|
|
|
interface WC_Customer_Data_Store_Interface {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the customers last order.
|
|
|
|
*
|
2018-03-06 08:14:45 +00:00
|
|
|
* @param WC_Customer $customer Customer object.
|
2016-11-14 18:18:08 +00:00
|
|
|
* @return WC_Order|false
|
|
|
|
*/
|
|
|
|
public function get_last_order( &$customer );
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return the number of orders this customer has.
|
|
|
|
*
|
2018-03-06 08:14:45 +00:00
|
|
|
* @param WC_Customer $customer Customer object.
|
2016-11-14 18:18:08 +00:00
|
|
|
* @return integer
|
|
|
|
*/
|
|
|
|
public function get_order_count( &$customer );
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return how much money this customer has spent.
|
|
|
|
*
|
2018-03-06 08:14:45 +00:00
|
|
|
* @param WC_Customer $customer Customer object.
|
2016-11-14 18:18:08 +00:00
|
|
|
* @return float
|
|
|
|
*/
|
|
|
|
public function get_total_spent( &$customer );
|
|
|
|
}
|