WC_Customer_Download_Log_Data_Store::get_download_logs_count_for_permission
Get the count of download logs for a given download permission.
Method of the class: WC_Customer_Download_Log_Data_Store{}
No Hooks.
Returns
Int.
Usage
$WC_Customer_Download_Log_Data_Store = new WC_Customer_Download_Log_Data_Store(); $WC_Customer_Download_Log_Data_Store->get_download_logs_count_for_permission( $permission_id );
- $permission_id(int) (required)
- Permission to get logs count for.
WC_Customer_Download_Log_Data_Store::get_download_logs_count_for_permission() WC Customer Download Log Data Store::get download logs count for permission code WC 10.3.6
public function get_download_logs_count_for_permission( $permission_id ) {
// If no permission_id is passed, return an empty array.
if ( empty( $permission_id ) ) {
return 0;
}
return $this->get_download_logs(
array(
'permission_id' => $permission_id,
'return' => 'count',
)
);
}