template_html & template_plain variables duplicate code in both if and else conditions when there is no change in template files for partial refund or full refund

This commit is contained in:
Mehul 2016-02-10 15:32:34 +05:30
parent 75cbb74520
commit 9302f3ac6d
1 changed files with 3 additions and 4 deletions

View File

@ -60,12 +60,13 @@ class WC_Email_Customer_Refunded_Order extends WC_Email {
$this->heading_full = $this->get_option( 'heading_full', __( 'Your order has been fully refunded', 'woocommerce' ) );
$this->heading_partial = $this->get_option( 'heading_partial', __( 'Your order has been partially refunded', 'woocommerce' ) );
$this->template_html = 'emails/customer-refunded-order.php';
$this->template_plain = 'emails/plain/customer-refunded-order.php';
if ( $partial_refund ) {
$this->id = 'customer_partially_refunded_order';
$this->title = __( 'Partially Refunded order', 'woocommerce' );
$this->description = __( 'Order partially refunded emails are sent to customers when their orders are partially refunded.', 'woocommerce' );
$this->template_html = 'emails/customer-refunded-order.php';
$this->template_plain = 'emails/plain/customer-refunded-order.php';
$this->heading = $this->heading_partial;
$this->subject = $this->subject_partial;
}
@ -73,8 +74,6 @@ class WC_Email_Customer_Refunded_Order extends WC_Email {
$this->id = 'customer_refunded_order';
$this->title = __( 'Refunded order', 'woocommerce' );
$this->description = __( 'Order refunded emails are sent to customers when their orders are marked refunded.', 'woocommerce' );
$this->template_html = 'emails/customer-refunded-order.php';
$this->template_plain = 'emails/plain/customer-refunded-order.php';
$this->heading = $this->heading_full;
$this->subject = $this->subject_full;
}