Maintain old show/hide email order item logic

When SHA: 7b3a9b introduced wc_get_email_order_items(), it slightly
changed the logic applied to determine whether to display:
* download links; and
* purchase notes.

In WC 2.6.13 and older, WC_Abstract_Order::email_order_items_table()
would only display download links and purchase note in emails *not*
sent to the admin. This patch preserves that behaviour.
This commit is contained in:
Brent Shepherd 2017-02-01 18:12:21 -08:00
parent 247c9aff50
commit 75bcbbf959
1 changed files with 2 additions and 2 deletions

View File

@ -2370,9 +2370,9 @@ if ( ! function_exists( 'wc_get_email_order_items' ) ) {
wc_get_template( $template, array(
'order' => $order,
'items' => $order->get_items(),
'show_download_links' => $order->is_download_permitted(),
'show_download_links' => $order->is_download_permitted() && ! $args['sent_to_admin'],
'show_sku' => $args['show_sku'],
'show_purchase_note' => $order->is_paid(),
'show_purchase_note' => $order->is_paid() && ! $args['sent_to_admin'],
'show_image' => $args['show_image'],
'image_size' => $args['image_size'],
'plain_text' => $args['plain_text'],