| @@ -95,19 +95,9 @@ | ||
| 95 | 95 | if ( ! file_exists( $template_path ) ) { |
| 96 | 96 | return $located; |
| 97 | 97 | } |
| 98 | 98 | |
| 99 | - $order = apply_filters( 'yaymail_order_for_language', isset( $args['order'] ) ? $args['order'] : null, $args ); | |
| 100 | - | |
| 101 | - $language = $this->get_language( $order ); | |
| 102 | - | |
| 103 | - $this->template = new YayMailTemplate( $this->id, $language ); | |
| 104 | - | |
| 105 | - if ( ! $this->template->is_enabled() ) { | |
| 106 | - return $located; | |
| 107 | - } | |
| 108 | - | |
| 109 | - return $template_path; | |
| 99 | + return $this->load_template( $args ) ? $template_path : $located; | |
| 110 | 100 | } |
| 111 | 101 | |
| 112 | 102 | public function get_template_path() { |
| 113 | 103 | return yaymail_get_template( 'emails/customer-refunded-order.php', '', YAYMAIL_PLUGIN_PATH . 'templates/' ); |