Kadence WooCommerce Email Designer - Version 1.5.4

Version Description

  • Fix: Possible bug with get_id for WPML filter.
Download this release

Release Info

Developer britner
Plugin Icon 128x128 Kadence WooCommerce Email Designer
Version 1.5.4
Comparing to
See all releases

Code changes from version 1.5.3 to 1.5.4

kadence-woocommerce-email-designer.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: Kadence WooCommerce Email Designer
4
  * Plugin URI: http://kadencewp.com/products/woocommerce-email-designer/
5
  * Description: Customize the default woocommerce email templates design and text through the native WordPress customizer. Preview emails and send test emails.
6
- * Version: 1.5.3
7
  * Author: Kadence WP
8
  * Author URI: http://kadencewp.com/
9
  * License: GPLv2 or later
@@ -391,6 +391,14 @@ class Kadence_Woomail_Designer {
391
  $body_text = str_replace( '{customer_company}', $order->get_billing_company(), $body_text );
392
  $body_text = str_replace( '{customer_email}', $order->get_billing_email(), $body_text );
393
  $body_text = str_replace( '{customer_username}', self::get_username_from_id( $user_id ), $body_text );
 
 
 
 
 
 
 
 
394
  }
395
 
396
  $body_text = apply_filters( 'kadence_woomail_order_body_text', $body_text, $order, $sent_to_admin, $plain_text, $email );
@@ -469,24 +477,21 @@ class Kadence_Woomail_Designer {
469
  $subtitle = str_replace( '{customer_company}', $email->object->get_billing_company(), $subtitle );
470
  $subtitle = str_replace( '{customer_email}', $email->object->get_billing_email(), $subtitle );
471
  $subtitle = str_replace( '{customer_username}', self::get_username_from_id( $user_id ), $subtitle );
 
 
 
 
 
 
 
 
 
 
 
472
 
473
  } elseif ( is_a( $email->object, 'WC_Product' ) ) {
474
  $subtitle = str_replace( '{product_title}', $email->object->get_title(), $subtitle );
475
  }
476
- if ( class_exists( 'WCML_Orders' ) ) {
477
- $order_id = ( method_exists( $email->object, 'get_id' ) ? $email->object->get_id() : '' );
478
- if ( empty( $order_id ) ) {
479
- $order_id = ( is_array( $email->object ) && isset( $email->object['ID'] ) ? $email->object['ID'] : '' );
480
- }
481
- $order_language = WCML_Orders::getLanguage( $order_id );
482
- if ( $order_language ) {
483
- if ( isset( $email ) && is_object( $email ) && isset( $email->id ) ) {
484
- $setting_key = $email->id;
485
- $name = '[kt_woomail]' . $setting_key;
486
- $subtitle = apply_filters( 'wpml_translate_single_string', $subtitle, 'admin_texts_kt_woomail', $name, $order_language );
487
- }
488
- }
489
- }
490
  return $subtitle;
491
 
492
  }
@@ -561,14 +566,6 @@ class Kadence_Woomail_Designer {
561
  }
562
 
563
  $body_text = apply_filters( 'kadence_woomail_no_order_body_text', $body_text, $email );
564
- if ( class_exists( 'WCML_Orders' ) ) {
565
- $order_language = WCML_Orders::getLanguage( $order->get_id() );
566
- if ( $order_language ) {
567
- $language_code = $order_language;
568
- $name = '[kt_woomail]' . $setting_key;
569
- $body_text = apply_filters( 'wpml_translate_single_string', $body_text, 'admin_texts_kt_woomail', $name, $order_language );
570
- }
571
- }
572
 
573
  // auto wrap text.
574
  $body_text = wpautop( $body_text );
3
  * Plugin Name: Kadence WooCommerce Email Designer
4
  * Plugin URI: http://kadencewp.com/products/woocommerce-email-designer/
5
  * Description: Customize the default woocommerce email templates design and text through the native WordPress customizer. Preview emails and send test emails.
6
+ * Version: 1.5.4
7
  * Author: Kadence WP
8
  * Author URI: http://kadencewp.com/
9
  * License: GPLv2 or later
391
  $body_text = str_replace( '{customer_company}', $order->get_billing_company(), $body_text );
392
  $body_text = str_replace( '{customer_email}', $order->get_billing_email(), $body_text );
393
  $body_text = str_replace( '{customer_username}', self::get_username_from_id( $user_id ), $body_text );
394
+ if ( class_exists( 'WCML_Orders' ) ) {
395
+ $order_language = WCML_Orders::getLanguage( $order->get_id() );
396
+ if ( $order_language ) {
397
+ $language_code = $order_language;
398
+ $name = '[kt_woomail]' . $setting_key;
399
+ $body_text = apply_filters( 'wpml_translate_single_string', $body_text, 'admin_texts_kt_woomail', $name, $order_language );
400
+ }
401
+ }
402
  }
403
 
404
  $body_text = apply_filters( 'kadence_woomail_order_body_text', $body_text, $order, $sent_to_admin, $plain_text, $email );
477
  $subtitle = str_replace( '{customer_company}', $email->object->get_billing_company(), $subtitle );
478
  $subtitle = str_replace( '{customer_email}', $email->object->get_billing_email(), $subtitle );
479
  $subtitle = str_replace( '{customer_username}', self::get_username_from_id( $user_id ), $subtitle );
480
+ if ( class_exists( 'WCML_Orders' ) ) {
481
+ $order_id = ( method_exists( $email->object, 'get_id' ) ? $email->object->get_id() : '' );
482
+ $order_language = WCML_Orders::getLanguage( $order_id );
483
+ if ( $order_language ) {
484
+ if ( isset( $email ) && is_object( $email ) && isset( $email->id ) ) {
485
+ $setting_key = $email->id;
486
+ $name = '[kt_woomail]' . $setting_key;
487
+ $subtitle = apply_filters( 'wpml_translate_single_string', $subtitle, 'admin_texts_kt_woomail', $name, $order_language );
488
+ }
489
+ }
490
+ }
491
 
492
  } elseif ( is_a( $email->object, 'WC_Product' ) ) {
493
  $subtitle = str_replace( '{product_title}', $email->object->get_title(), $subtitle );
494
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
495
  return $subtitle;
496
 
497
  }
566
  }
567
 
568
  $body_text = apply_filters( 'kadence_woomail_no_order_body_text', $body_text, $email );
 
 
 
 
 
 
 
 
569
 
570
  // auto wrap text.
571
  $body_text = wpautop( $body_text );
readme.txt CHANGED
@@ -5,7 +5,7 @@ Donate link: https://www.kadencewp.com/about-us/
5
  Requires PHP: 5.2.4
6
  Requires at least: 5.3
7
  Tested up to: 6.0
8
- Stable tag: 1.5.3
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -81,6 +81,9 @@ After you create your translations make sure to clear your server cache from any
81
 
82
  == Changelog ==
83
 
 
 
 
84
  = 1.5.3 =
85
  * Update: Add some filters for body content and subtitle WPML support.
86
 
5
  Requires PHP: 5.2.4
6
  Requires at least: 5.3
7
  Tested up to: 6.0
8
+ Stable tag: 1.5.4
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
81
 
82
  == Changelog ==
83
 
84
+ = 1.5.4 =
85
+ * Fix: Possible bug with get_id for WPML filter.
86
+
87
  = 1.5.3 =
88
  * Update: Add some filters for body content and subtitle WPML support.
89