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