Merge pull request #19575 from woocommerce/add/downlodable-file-permission-hook

Adds new hook to allow customize downlodable file permissions
This commit is contained in:
Claudiu Lodromanean 2018-03-29 10:05:35 -07:00 committed by GitHub
commit 8870f76afe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -366,6 +366,8 @@ function wc_downloadable_file_permission( $download_id, $product, $order, $qty =
$download->set_access_expires( strtotime( $from_date . ' + ' . $expiry . ' DAY' ) );
}
$download = apply_filters( 'woocommerce_downloadable_file_permission', $download, $product, $order, $qty );
return $download->save();
}