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

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