Merge pull request #10312 from mehulkaklotar/master
Code refactor for unwanted duplication of variable value set in conditions
This commit is contained in:
commit
0a2b1607bb
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue