WC_Customer_Download_Data_Store_Interface
in
WC Customer Download Data Store Interface.
Tags
Table of Contents
- delete_by_download_id() : mixed
- Method to delete a download permission from the database by download ID.
- delete_by_id() : mixed
- Method to delete a download permission from the database by ID.
- delete_by_order_id() : mixed
- Method to delete a download permission from the database by order ID.
- get_downloads() : array<string|int, mixed>
- Get array of download ids by specified args.
- get_downloads_for_customer() : array<string|int, mixed>
- Get a customers downloads.
- update_download_id() : mixed
- Update download ids if the hash changes.
- update_user_by_order_id() : mixed
- Update user prop for downloads based on order id.
Methods
delete_by_download_id()
Method to delete a download permission from the database by download ID.
public
delete_by_download_id(int $id) : mixed
Parameters
- $id : int
-
Download ID.
Return values
mixed —delete_by_id()
Method to delete a download permission from the database by ID.
public
delete_by_id(int $id) : mixed
Parameters
- $id : int
-
Download Permission ID.
Return values
mixed —delete_by_order_id()
Method to delete a download permission from the database by order ID.
public
delete_by_order_id(int $id) : mixed
Parameters
- $id : int
-
Order ID.
Return values
mixed —get_downloads()
Get array of download ids by specified args.
public
get_downloads([array<string|int, mixed> $args = array() ]) : array<string|int, mixed>
Parameters
- $args : array<string|int, mixed> = array()
-
Arguments.
Return values
array<string|int, mixed> — of WC_Customer_Downloadget_downloads_for_customer()
Get a customers downloads.
public
get_downloads_for_customer(int $customer_id) : array<string|int, mixed>
Parameters
- $customer_id : int
-
Customer ID.
Return values
array<string|int, mixed> —update_download_id()
Update download ids if the hash changes.
public
update_download_id(int $product_id, string $old_id, string $new_id) : mixed
Parameters
- $product_id : int
-
Product ID.
- $old_id : string
-
Old ID.
- $new_id : string
-
New ID.
Return values
mixed —update_user_by_order_id()
Update user prop for downloads based on order id.
public
update_user_by_order_id(int $order_id, int $customer_id, string $email) : mixed
Parameters
- $order_id : int
-
Order ID.
- $customer_id : int
-
Customer ID.
- $email : string
-
Email Address.