updated plugin Easy Digital Downloads version 3.1.1.2

This commit is contained in:
2023-03-17 22:34:04 +00:00
committed by Gitium
parent e8a66564bd
commit 19e086d1c4
647 changed files with 20986 additions and 27305 deletions

View File

@ -356,9 +356,6 @@ function edd_ajax_generate_file_download_link() {
die( '-3' );
}
$payment_key = edd_get_payment_key( $payment_id );
$email = edd_get_payment_user_email( $payment_id );
$limit = edd_get_file_download_limit( $download_id );
if ( ! empty( $limit ) ) {
// Increase the file download limit when generating new links
@ -370,10 +367,10 @@ function edd_ajax_generate_file_download_link() {
die( '-4' );
}
$order = edd_get_order( $payment_id );
$file_urls = '';
foreach( $files as $file_key => $file ) {
$file_urls .= edd_get_download_file_url( $payment_key, $email, $file_key, $download_id, $price_id );
foreach ( $files as $file_key => $file ) {
$file_urls .= edd_get_download_file_url( $order, $order->email, $file_key, $download_id, $price_id );
$file_urls .= "\n\n";
}
@ -587,15 +584,18 @@ function edd_orders_list_table_process_bulk_actions() {
_doing_it_wrong( __FUNCTION__, 'This method is not meant to be called directly.', 'EDD 3.0' );
}
// Check the current user's capability.
if ( ! current_user_can( 'edit_shop_payments' ) ) {
return;
}
$action = isset( $_REQUEST['action'] ) // WPCS: CSRF ok.
? sanitize_text_field( $_REQUEST['action'] )
: '';
// If this is a 'delete' action, the capability changes from edit to delete.
$cap = 'delete' === $action ? 'delete_shop_payments' : 'edit_shop_payments';
// Check the current user's capability.
if ( ! current_user_can( $cap ) ) {
return;
}
// Bail if we aren't processing bulk actions.
if ( '-1' === $action ) {
return;
@ -625,6 +625,9 @@ function edd_orders_list_table_process_bulk_actions() {
case 'restore':
edd_restore_order( $id );
break;
case 'delete':
edd_destroy_order( $id );
break;
case 'set-status-complete':
edd_update_payment_status( $id, 'complete' );
break;