Merge pull request #10312 from mehulkaklotar/master

Code refactor for unwanted duplication of variable value set in conditions
This commit is contained in:
Mike Jolley 2016-02-10 13:06:55 +00:00
commit 0a2b1607bb
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;
}