plugin updates

This commit is contained in:
Tony Volpe
2024-09-05 11:04:01 -04:00
parent ed6b060261
commit 50cd64dd3d
925 changed files with 16918 additions and 13003 deletions

View File

@@ -171,13 +171,8 @@ class WC_Customer_Download extends WC_Data implements ArrayAccess {
*/
public function get_download_count( $context = 'view' ) {
// Check for count of download logs.
$data_store = WC_Data_Store::load( 'customer-download-log' );
$download_log_ids = $data_store->get_download_logs_for_permission( $this->get_id() );
$download_log_count = 0;
if ( ! empty( $download_log_ids ) ) {
$download_log_count = count( $download_log_ids );
}
$data_store = WC_Data_Store::load( 'customer-download-log' );
$download_log_count = $data_store->get_download_logs_count_for_permission( $this->get_id() );
// Check download count in prop.
$download_count_prop = $this->get_prop( 'download_count', $context );