You appear to be a bot. Output may be restricted
Description
Checks if the download can be purchased
NOTE: Currently only checks on edd_get_cart_contents() and edd_add_to_cart()
Usage
$bool = EDD_Download::can_purchase();
Parameters
Returns
bool If the current user can purcahse the download ID
Source
File name: easy-digital-downloads/includes/class-edd-download.php
Lines:
1 to 9 of 9
public function can_purchase() { $can_purchase = true; if ( ! current_user_can( 'edit_post', $this->ID ) && $this->post_status != 'publish' ) { $can_purchase = false; } return (bool) apply_filters( 'edd_can_purchase_download', $can_purchase, $this ); }