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:
commit
8870f76afe
|
@ -366,6 +366,8 @@ function wc_downloadable_file_permission( $download_id, $product, $order, $qty =
|
||||||
$download->set_access_expires( strtotime( $from_date . ' + ' . $expiry . ' DAY' ) );
|
$download->set_access_expires( strtotime( $from_date . ' + ' . $expiry . ' DAY' ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$download = apply_filters( 'woocommerce_downloadable_file_permission', $download, $product, $order, $qty );
|
||||||
|
|
||||||
return $download->save();
|
return $download->save();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue