Merge pull request #29631 from raicem/fix/download-permissions
Call "wc_downloadable_file_permission" with the right product id
This commit is contained in:
commit
9e8db78ad6
|
@ -810,7 +810,7 @@ class WC_AJAX {
|
||||||
|
|
||||||
if ( ! empty( $files ) ) {
|
if ( ! empty( $files ) ) {
|
||||||
foreach ( $files as $download_id => $file ) {
|
foreach ( $files as $download_id => $file ) {
|
||||||
$inserted_id = wc_downloadable_file_permission( $download_id, $product_id, $order, $item->get_quantity(), $item );
|
$inserted_id = wc_downloadable_file_permission( $download_id, $product->get_id(), $order, $item->get_quantity(), $item );
|
||||||
if ( $inserted_id ) {
|
if ( $inserted_id ) {
|
||||||
$download = new WC_Customer_Download( $inserted_id );
|
$download = new WC_Customer_Download( $inserted_id );
|
||||||
$loop ++;
|
$loop ++;
|
||||||
|
|
Loading…
Reference in New Issue