PHP Interface WC_Customer_Download_Data_Store_Interface

Author: WooThemes
Show file Open project: woocommerce/woocommerce

Public Methods

Method Description
delete_by_download_id ( integer $id ) Method to delete a download permission from the database by download ID.
delete_by_id ( integer $id ) Method to delete a download permission from the database by ID.
delete_by_order_id ( integer $id ) Method to delete a download permission from the database by order ID.
get_downloads ( array $args = [] ) : array Get array of download ids by specified args.
get_downloads_for_customer ( integer $customer_id ) : array Get a customers downloads.
update_download_id ( integer $product_id, string $old_id, string $new_id ) Update download ids if the hash changes.
update_user_by_order_id ( integer $order_id, integer $customer_id, string $email ) Update user prop for downloads based on order id.

Method Details

delete_by_download_id() public method

Method to delete a download permission from the database by download ID.

delete_by_id() public method

Method to delete a download permission from the database by ID.
public delete_by_id ( integer $id )
$id integer

delete_by_order_id() public method

Method to delete a download permission from the database by order ID.
public delete_by_order_id ( integer $id )
$id integer

get_downloads() public method

Get array of download ids by specified args.
public get_downloads ( array $args = [] ) : array
$args array
return array of WC_Customer_Download

get_downloads_for_customer() public method

Get a customers downloads.
public get_downloads_for_customer ( integer $customer_id ) : array
$customer_id integer
return array

update_download_id() public method

Update download ids if the hash changes.
public update_download_id ( integer $product_id, string $old_id, string $new_id )
$product_id integer
$old_id string
$new_id string

update_user_by_order_id() public method

Update user prop for downloads based on order id.
public update_user_by_order_id ( integer $order_id, integer $customer_id, string $email )
$order_id integer
$customer_id integer
$email string