wc_get_customer_download_permissions

Get customer download permissions from the database.

Description

(array) wc_get_customer_download_permissions( (int) $customer_id ); 

Returns (array)

Parameters (1)

0. $customer_id (int)
The customer id.

Usage

  1. if ( !function_exists( 'wc_get_customer_download_permissions' ) ) { 
  2. require_once ABSPATH . PLUGINDIR . 'woocommerce/includes/wc-user-functions.php'; 
  3.  
  4. // The customer id. 
  5. $customer_id = -1; 
  6.  
  7. // NOTICE! Understand what this does before running. 
  8. $result = wc_get_customer_download_permissions($customer_id); 
  9.  

Defined (1)

The function is defined in the following location(s).

/includes/wc-user-functions.php  
  1. function wc_get_customer_download_permissions( $customer_id ) { 
  2. $data_store = WC_Data_Store::load( 'customer-download' ); 
  3. return apply_filters( 'woocommerce_permission_list', $data_store->get_downloads_for_customer( $customer_id ), $customer_id );