Ei kuvausta

class-wc-customer-download-data-store-interface.php 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <?php
  2. /**
  3. * Customer Download Data Store Interface
  4. *
  5. * @version 3.0.0
  6. * @package WooCommerce\Interface
  7. */
  8. /**
  9. * WC Customer Download Data Store Interface.
  10. *
  11. * @version 3.0.0
  12. */
  13. interface WC_Customer_Download_Data_Store_Interface {
  14. /**
  15. * Method to delete a download permission from the database by ID.
  16. *
  17. * @param int $id Download Permission ID.
  18. */
  19. public function delete_by_id( $id );
  20. /**
  21. * Method to delete a download permission from the database by order ID.
  22. *
  23. * @param int $id Order ID.
  24. */
  25. public function delete_by_order_id( $id );
  26. /**
  27. * Method to delete a download permission from the database by download ID.
  28. *
  29. * @param int $id Download ID.
  30. */
  31. public function delete_by_download_id( $id );
  32. /**
  33. * Get array of download ids by specified args.
  34. *
  35. * @param array $args Arguments.
  36. * @return array of WC_Customer_Download
  37. */
  38. public function get_downloads( $args = array() );
  39. /**
  40. * Update download ids if the hash changes.
  41. *
  42. * @param int $product_id Product ID.
  43. * @param string $old_id Old ID.
  44. * @param string $new_id New ID.
  45. */
  46. public function update_download_id( $product_id, $old_id, $new_id );
  47. /**
  48. * Get a customers downloads.
  49. *
  50. * @param int $customer_id Customer ID.
  51. * @return array
  52. */
  53. public function get_downloads_for_customer( $customer_id );
  54. /**
  55. * Update user prop for downloads based on order id.
  56. *
  57. * @param int $order_id Order ID.
  58. * @param int $customer_id Customer ID.
  59. * @param string $email Email Address.
  60. */
  61. public function update_user_by_order_id( $order_id, $customer_id, $email );
  62. }