2016-11-14 18:18:08 +00:00
|
|
|
<?php
|
|
|
|
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
|
|
|
* @category Interface
|
|
|
|
* @author WooThemes
|
|
|
|
*/
|
|
|
|
interface WC_Customer_Data_Store_Interface {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Gets the customers last order.
|
|
|
|
*
|
2017-03-28 17:52:32 +00:00
|
|
|
* @param WC_Customer &$customer
|
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.
|
|
|
|
*
|
2017-03-28 17:52:32 +00:00
|
|
|
* @param WC_Customer &$customer
|
2016-11-14 18:18:08 +00:00
|
|
|
* @return integer
|
|
|
|
*/
|
|
|
|
public function get_order_count( &$customer );
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return how much money this customer has spent.
|
|
|
|
*
|
2017-03-28 17:52:32 +00:00
|
|
|
* @param WC_Customer &$customer
|
2016-11-14 18:18:08 +00:00
|
|
|
* @return float
|
|
|
|
*/
|
|
|
|
public function get_total_spent( &$customer );
|
|
|
|
}
|