Don't display Downloads section on refund emails.

This commit is contained in:
Peter Fabian 2019-11-01 15:51:30 +01:00
parent 3abae6db1b
commit a2cd974d79
1 changed files with 1 additions and 1 deletions

View File

@ -428,7 +428,7 @@ class WC_Emails {
* @param string $email Email address.
*/
public function order_downloads( $order, $sent_to_admin = false, $plain_text = false, $email = '' ) {
$show_downloads = $order->has_downloadable_item() && $order->is_download_permitted() && ! $sent_to_admin;
$show_downloads = $order->has_downloadable_item() && $order->is_download_permitted() && ! $sent_to_admin && ! is_a( $email, 'WC_Email_Customer_Refunded_Order' );
if ( ! $show_downloads ) {
return;