Merge pull request #24118 from aslamshekh/issue-24115

Fix-24115, Downloads report not getting 503 any more, If previously d…
This commit is contained in:
Gerhard Potgieter 2019-07-10 15:06:42 +02:00 committed by GitHub
commit d38359e06f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 4 deletions

View File

@ -164,11 +164,15 @@ class WC_Report_Downloads extends WP_List_Table {
// File information.
$file = $product->get_file( $permission->get_download_id() );
echo esc_html( $file->get_name() . ' - ' . basename( $file->get_file() ) );
if ( false === $file ) {
echo esc_html__( 'File does not exist', 'woocommerce' );
} else {
echo esc_html( $file->get_name() . ' - ' . basename( $file->get_file() ) );
echo '<div class="row-actions">';
echo '<a href="' . esc_url( add_query_arg( 'download_id', $permission->get_download_id() ) ) . '">' . esc_html__( 'Filter by file', 'woocommerce' ) . '</a>';
echo '</div>';
echo '<div class="row-actions">';
echo '<a href="' . esc_url( add_query_arg( 'download_id', $permission->get_download_id() ) ) . '">' . esc_html__( 'Filter by file', 'woocommerce' ) . '</a>';
echo '</div>';
}
}
break;
case 'order':