暫無描述

class-wc-customer-data-store-interface.php 820B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. * Customer Data Store Interface
  4. *
  5. * @version 3.0.0
  6. * @package WooCommerce\Interface
  7. */
  8. /**
  9. * WC Customer Data Store Interface
  10. *
  11. * Functions that must be defined by customer store classes.
  12. *
  13. * @version 3.0.0
  14. */
  15. interface WC_Customer_Data_Store_Interface {
  16. /**
  17. * Gets the customers last order.
  18. *
  19. * @param WC_Customer $customer Customer object.
  20. * @return WC_Order|false
  21. */
  22. public function get_last_order( &$customer );
  23. /**
  24. * Return the number of orders this customer has.
  25. *
  26. * @param WC_Customer $customer Customer object.
  27. * @return integer
  28. */
  29. public function get_order_count( &$customer );
  30. /**
  31. * Return how much money this customer has spent.
  32. *
  33. * @param WC_Customer $customer Customer object.
  34. * @return float
  35. */
  36. public function get_total_spent( &$customer );
  37. }