class-wc-abstract-order-data-store-interface.php
5 years ago
class-wc-coupon-data-store-interface.php
5 years ago
class-wc-customer-data-store-interface.php
5 years ago
class-wc-customer-download-data-store-interface.php
5 years ago
class-wc-customer-download-log-data-store-interface.php
5 years ago
class-wc-importer-interface.php
5 years ago
class-wc-log-handler-interface.php
5 years ago
class-wc-logger-interface.php
5 years ago
class-wc-object-data-store-interface.php
5 years ago
class-wc-order-data-store-interface.php
1 year ago
class-wc-order-item-data-store-interface.php
3 years ago
class-wc-order-item-product-data-store-interface.php
5 years ago
class-wc-order-item-type-data-store-interface.php
5 years ago
class-wc-order-refund-data-store-interface.php
5 years ago
class-wc-payment-token-data-store-interface.php
5 years ago
class-wc-product-data-store-interface.php
1 year ago
class-wc-product-variable-data-store-interface.php
5 years ago
class-wc-queue-interface.php
4 months ago
class-wc-shipping-zone-data-store-interface.php
4 years ago
class-wc-webhooks-data-store-interface.php
5 years ago
class-wc-customer-download-data-store-interface.php
71 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Customer Download Data Store Interface |
| 4 | * |
| 5 | * @version 3.0.0 |
| 6 | * @package WooCommerce\Interface |
| 7 | */ |
| 8 | |
| 9 | /** |
| 10 | * WC Customer Download Data Store Interface. |
| 11 | * |
| 12 | * @version 3.0.0 |
| 13 | */ |
| 14 | interface WC_Customer_Download_Data_Store_Interface { |
| 15 | |
| 16 | /** |
| 17 | * Method to delete a download permission from the database by ID. |
| 18 | * |
| 19 | * @param int $id Download Permission ID. |
| 20 | */ |
| 21 | public function delete_by_id( $id ); |
| 22 | |
| 23 | /** |
| 24 | * Method to delete a download permission from the database by order ID. |
| 25 | * |
| 26 | * @param int $id Order ID. |
| 27 | */ |
| 28 | public function delete_by_order_id( $id ); |
| 29 | |
| 30 | /** |
| 31 | * Method to delete a download permission from the database by download ID. |
| 32 | * |
| 33 | * @param int $id Download ID. |
| 34 | */ |
| 35 | public function delete_by_download_id( $id ); |
| 36 | |
| 37 | /** |
| 38 | * Get array of download ids by specified args. |
| 39 | * |
| 40 | * @param array $args Arguments. |
| 41 | * @return array of WC_Customer_Download |
| 42 | */ |
| 43 | public function get_downloads( $args = array() ); |
| 44 | |
| 45 | /** |
| 46 | * Update download ids if the hash changes. |
| 47 | * |
| 48 | * @param int $product_id Product ID. |
| 49 | * @param string $old_id Old ID. |
| 50 | * @param string $new_id New ID. |
| 51 | */ |
| 52 | public function update_download_id( $product_id, $old_id, $new_id ); |
| 53 | |
| 54 | /** |
| 55 | * Get a customers downloads. |
| 56 | * |
| 57 | * @param int $customer_id Customer ID. |
| 58 | * @return array |
| 59 | */ |
| 60 | public function get_downloads_for_customer( $customer_id ); |
| 61 | |
| 62 | /** |
| 63 | * Update user prop for downloads based on order id. |
| 64 | * |
| 65 | * @param int $order_id Order ID. |
| 66 | * @param int $customer_id Customer ID. |
| 67 | * @param string $email Email Address. |
| 68 | */ |
| 69 | public function update_user_by_order_id( $order_id, $customer_id, $email ); |
| 70 | } |
| 71 |