$items_table = call_user_func_array(array($order, 'email_order_items_table'), $args);
            } else {
                // 2.5 doesn't support both the show_download_links or show_purchase_note parameters but uses $order->is_download_permitted and  $order->is_paid instead
                $show_download_links_callback = isset($args['show_download_links']) && $args['show_download_links'] ? '__return_true' : '__return_false';
                $show_purchase_note_callback = isset($args['show_purchase_note']) && $args['show_purchase_note'] ? '__return_true' : '__return_false';
                unset($args['show_download_links']);
                unset($args['show_purchase_note']);
                add_filter('woocommerce_order_is_download_permitted', $show_download_links_callback);
                add_filter('woocommerce_order_is_paid', $show_purchase_note_callback);
                $items_table = $order->email_order_items_table($args);
                remove_filter('woocommerce_order_is_download_permitted', $show_download_links_callback);
                remove_filter('woocommerce_order_is_paid', $show_purchase_note_callback);
            }
        }
        return $items_table;
    }
    /**
     * Init the mailer and call the notifications for the current filter.
     *
     * @param int $user_id The ID of the user who the subscription belongs to
     * @param string $subscription_key A subscription key of the form created by @see self::get_subscription_key()
     * @return void
     * @deprecated 2.0
     */
    public static function send_subscription_email($user_id, $subscription_key)
    {
        _deprecated_function(__FUNCTION__, '2.0');
    }
}
WC_Subscriptions_Email::init();
esc_html_e('Product', 'woocommerce-subscriptions');
?>
</th>
			<th scope="col" style="text-align:left; border: 1px solid #eee;"><?php 
esc_html_e('Quantity', 'woocommerce-subscriptions');
?>
</th>
			<th scope="col" style="text-align:left; border: 1px solid #eee;"><?php 
esc_html_e('Price', 'woocommerce-subscriptions');
?>
</th>
		</tr>
	</thead>
	<tbody>
		<?php 
echo wp_kses_post(WC_Subscriptions_Email::email_order_items_table($order, array('show_download_links' => true, 'show_sku' => false, 'show_purchase_note' => true)));
?>
	</tbody>
	<tfoot>
		<?php 
if ($totals = $order->get_order_item_totals()) {
    $i = 0;
    foreach ($totals as $total) {
        $i++;
        ?>
				<tr>
					<th scope="row" colspan="2" style="text-align:left; border: 1px solid #eee; <?php 
        if (1 == $i) {
            echo 'border-top-width: 4px;';
        }
        ?>
echo date_i18n(_x('jS F Y', 'date format for order date in new switching email', 'woocommerce-subscriptions'), strtotime($order->order_date)) . "\n";
do_action('woocommerce_email_order_meta', $order, true, true);
echo "\n" . WC_Subscriptions_Email::email_order_items_table($order, array('show_download_links' => false, 'show_sku' => true, 'show_purchase_note' => '', 'show_image' => '', 'image_size' => '', 'plain_text' => true));
echo "***********\n\n";
if ($totals = $order->get_order_item_totals()) {
    foreach ($totals as $total) {
        echo $total['label'] . "\t " . $total['value'] . "\n";
    }
}
echo "\n" . sprintf(__('View order: %s', 'woocommerce-subscriptions'), wcs_get_edit_post_link($order->id)) . "\n";
echo "\n****************************************************\n\n";
do_action('woocommerce_email_after_order_table', $order, true, true);
remove_filter('woocommerce_order_item_meta_end', 'WC_Subscriptions_Switcher::print_switch_link', 10);
foreach ($subscriptions as $subscription) {
    do_action('woocommerce_email_before_subscription_table', $subscription, true, true);
    echo strtoupper(sprintf(__('Subscription number: %s', 'woocommerce-subscriptions'), $subscription->get_order_number())) . "\n";
    echo "\n" . WC_Subscriptions_Email::email_order_items_table($subscription, array('show_download_links' => false, 'show_sku' => true, 'show_purchase_note' => '', 'show_image' => '', 'image_size' => '', 'plain_text' => true));
    echo "***********\n";
    if ($totals = $subscription->get_order_item_totals()) {
        foreach ($totals as $total) {
            echo $total['label'] . "\t " . $total['value'] . "\n";
        }
    }
    echo "\n" . sprintf(__('View Subscription: %s', 'woocommerce-subscriptions'), wcs_get_edit_post_link($subscription->id)) . "\n";
    do_action('woocommerce_email_after_subscription_table', $subscription, true, true);
}
add_filter('woocommerce_order_item_meta_end', 'WC_Subscriptions_Switcher::print_switch_link', 10);
echo "\n***************************************************\n\n";
do_action('woocommerce_email_customer_details', $order, true, true);
echo "\n****************************************************\n\n";
echo apply_filters('woocommerce_email_footer_text', get_option('woocommerce_email_footer_text'));
echo esc_html_x('Product', 'table headings in notification email', 'woocommerce-subscriptions');
?>
</th>
			<th scope="col" style="text-align:left; border: 1px solid #eee;"><?php 
echo esc_html_x('Quantity', 'table headings in notification email', 'woocommerce-subscriptions');
?>
</th>
			<th scope="col" style="text-align:left; border: 1px solid #eee;"><?php 
echo esc_html_x('Price', 'table headings in notification email', 'woocommerce-subscriptions');
?>
</th>
		</tr>
	</thead>
	<tbody>
		<?php 
echo wp_kses_post(WC_Subscriptions_Email::email_order_items_table($order, array('show_download_links' => $order->is_download_permitted(), 'show_sku' => true, 'show_purchase_note' => 'processing' == $order->status ? true : false)));
?>
	</tbody>
	<tfoot>
		<?php 
if ($totals = $order->get_order_item_totals()) {
    $i = 0;
    foreach ($totals as $total) {
        $i++;
        ?>
				<tr>
					<th scope="row" colspan="2" style="text-align:left; border: 1px solid #eee; <?php 
        if (1 == $i) {
            echo 'border-top-width: 4px;';
        }
        ?>
if ($order->status == 'pending') {
    echo sprintf(__('An invoice has been created for you to renew your subscription with %s. To pay for this order please use the following link: %s', 'woocommerce-subscriptions'), get_bloginfo('name'), $order->get_checkout_payment_url()) . "\n\n";
} elseif ('failed' == $order->status) {
    echo sprintf(__('The automatic payment to renew your subscription with %s has failed. To reactivate the subscription, please login and pay for the renewal from you account page: %s', 'woocommerce-subscriptions'), get_bloginfo('name'), $order->get_checkout_payment_url());
}
echo "****************************************************\n\n";
do_action('woocommerce_email_before_order_table', $order, false, true);
echo sprintf(__('Order number: %s', 'woocommerce-subscriptions'), $order->get_order_number()) . "\n";
echo sprintf(__('Order date: %s', 'woocommerce-subscriptions'), date_i18n(woocommerce_date_format(), strtotime($order->order_date))) . "\n";
do_action('woocommerce_email_order_meta', $order, false, true);
echo "\n";
switch ($order->status) {
    case 'completed':
        echo WC_Subscriptions_Email::email_order_items_table($order, array('show_download_links' => $order->is_download_permitted(), 'show_sku' => false, 'show_purchase_note' => true, 'show_image' => '', 'image_size' => '', 'plain_text' => true));
        break;
    case 'processing':
        echo WC_Subscriptions_Email::email_order_items_table($order, array('show_download_links' => $order->is_download_permitted(), 'show_sku' => true, 'show_purchase_note' => true, 'show_image' => '', 'image_size' => '', 'plain_text' => true));
        break;
    default:
        echo WC_Subscriptions_Email::email_order_items_table($order, array('show_download_links' => $order->is_download_permitted(), 'show_sku' => true, 'show_purchase_note' => false, 'show_image' => '', 'image_size' => '', 'plain_text' => true));
        break;
}
echo "----------\n\n";
if ($totals = $order->get_order_item_totals()) {
    foreach ($totals as $total) {
        echo $total['label'] . "\t " . $total['value'] . "\n";
    }
}
echo "\n****************************************************\n\n";
do_action('woocommerce_email_after_order_table', $order, false, true);
echo apply_filters('woocommerce_email_footer_text', get_option('woocommerce_email_footer_text'));
 /**
  * Sets up the internal $woocommerce_email property for this class.
  * 
  * @since 1.0
  */
 public static function set_email($wc_email)
 {
     self::$woocommerce_email = $wc_email;
 }