PluginProbe
YayMail – WooCommerce Email Customizer / 4.3.3
YayMail – WooCommerce Email Customizer v4.3.3
4.4.7 4.4.6 4.4.5 4.4.4 4.4.3 4.4.2 4.4.1 trunk 1.9.6 2.1.4 2.1.5 3.2.2 3.2.6 3.2.7.1 3.2.8.1 3.2.9 3.3 3.3.1 3.3.4 3.3.5 3.3.6 3.3.7 3.3.8 3.3.9 3.4 All 58 releases
← All changes | src/Emails/CustomerPOSRefundedOrder.php +12 -2 4.4.6 → 4.3.3 View file →
@@ -97,11 +97,21 @@
97 97 if ( ! file_exists( $template_path ) ) {
98 98 return $located;
99 99 }
100 100
101 - return $this->load_template( $args ) ? $template_path : $located;
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;
102 112 }
103 113
104 114 public function get_template_path() {
105 - return yaymail_get_template( 'emails/customer-pos-refunded-order.php', '', YAYMAIL_PLUGIN_PATH . 'templates/' );
115 + return YAYMAIL_PLUGIN_PATH . 'templates/emails/customer-pos-refunded-order.php';
106 116 }
107 117 }