Commit 028d927661 for woocommerce

commit 028d9276619396e0d33f961fc3a03ba586cec0f9
Author: Jaclyn Chen <watertranquil@gmail.com>
Date:   Tue Jun 10 09:11:12 2025 +0800

    [Woo POS] Display store details from POS settings in email footer in HTML/plaintext formats (#58330)

    * Replace placeholders with POS store details in POS completed order email footer in a way that does not affect other emails.

    * Support POS store details placeholders in plain text format.

    * Include POS placeholders tests on plain text format.

    * Apply the same changes to POS refunded order email.

    * Add changelog.

diff --git a/plugins/woocommerce/changelog/display-pos-store-details-in-pos-email-footer-placeholders b/plugins/woocommerce/changelog/display-pos-store-details-in-pos-email-footer-placeholders
new file mode 100644
index 0000000000..baee1594c9
--- /dev/null
+++ b/plugins/woocommerce/changelog/display-pos-store-details-in-pos-email-footer-placeholders
@@ -0,0 +1,4 @@
+Significance: minor
+Type: add
+
+Replace {site_title}, {store_address}, and {store_email} placeholders with Point of Sale (POS) store details from POS settings in POS emails.
diff --git a/plugins/woocommerce/includes/emails/class-wc-email-customer-pos-completed-order.php b/plugins/woocommerce/includes/emails/class-wc-email-customer-pos-completed-order.php
index 37eb1c56c8..80c176d6a9 100644
--- a/plugins/woocommerce/includes/emails/class-wc-email-customer-pos-completed-order.php
+++ b/plugins/woocommerce/includes/emails/class-wc-email-customer-pos-completed-order.php
@@ -116,6 +116,7 @@ if ( ! class_exists( 'WC_Email_Customer_POS_Completed_Order', false ) ) :
 		public function get_content_html() {
 			$this->add_pos_customizations();
 			add_action( 'woocommerce_pos_email_header', array( $this, 'email_header' ) );
+			add_action( 'woocommerce_pos_email_footer', array( $this, 'email_footer' ) );
 			$content = wc_get_template_html(
 				$this->template_html,
 				array(
@@ -134,6 +135,7 @@ if ( ! class_exists( 'WC_Email_Customer_POS_Completed_Order', false ) ) :
 			);
 			$this->remove_pos_customizations();
 			remove_action( 'woocommerce_pos_email_header', array( $this, 'email_header' ) );
+			remove_action( 'woocommerce_pos_email_footer', array( $this, 'email_footer' ) );
 			return $content;
 		}

@@ -247,6 +249,8 @@ if ( ! class_exists( 'WC_Email_Customer_POS_Completed_Order', false ) ) :
 			add_action( 'woocommerce_order_item_meta_start', array( $this, 'add_unit_price' ), 10, 4 );
 			// Add filter to include additional details in the order item totals table.
 			add_filter( 'woocommerce_get_order_item_totals', array( $this, 'order_item_totals' ), 10, 3 );
+			// Add filter for custom footer text with highest priority to run before the default footer text filtering in `WC_Emails`.
+			add_filter( 'woocommerce_email_footer_text', array( $this, 'replace_footer_placeholders' ), 1, 2 );
 		}

 		/**
@@ -256,6 +260,7 @@ if ( ! class_exists( 'WC_Email_Customer_POS_Completed_Order', false ) ) :
 			// Remove actions and filters after generating content to avoid affecting other emails.
 			remove_action( 'woocommerce_order_item_meta_start', array( $this, 'add_unit_price' ), 10 );
 			remove_filter( 'woocommerce_get_order_item_totals', array( $this, 'order_item_totals' ), 10 );
+			remove_filter( 'woocommerce_email_footer_text', array( $this, 'replace_footer_placeholders' ), 1 );
 		}

 		/**
@@ -275,6 +280,22 @@ if ( ! class_exists( 'WC_Email_Customer_POS_Completed_Order', false ) ) :
 			);
 		}

+		/**
+		 * Get the email footer.
+		 *
+		 * @param mixed $email Email object.
+		 *
+		 * @internal For exclusive usage within this class, backwards compatibility not guaranteed.
+		 */
+		public function email_footer( $email ) {
+			wc_get_template(
+				'emails/email-footer.php',
+				array(
+					'email' => $email,
+				)
+			);
+		}
+
 		/**
 		 * Add unit price to order item meta start position.
 		 *
@@ -403,6 +424,36 @@ if ( ! class_exists( 'WC_Email_Customer_POS_Completed_Order', false ) ) :
 				get_option( 'woocommerce_pos_refund_returns_policy' )
 			);
 		}
+
+		/**
+		 * Replace footer text placeholders with POS-specific values.
+		 *
+		 * @param string $footer_text The footer text to be filtered.
+		 * @param mixed  $email       Email object.
+		 * @return string Modified footer text.
+		 *
+		 * @internal For exclusive usage within this class, backwards compatibility not guaranteed.
+		 */
+		public function replace_footer_placeholders( $footer_text, $email ) {
+			// Only replace placeholders if we're in the context of a POS email.
+			if ( $email->id !== $this->id ) {
+				return $footer_text;
+			}
+
+			return str_replace(
+				array(
+					'{site_title}',
+					'{store_address}',
+					'{store_email}',
+				),
+				array(
+					$this->get_pos_store_name(),
+					$this->get_pos_store_address(),
+					$this->get_pos_store_email(),
+				),
+				$footer_text
+			);
+		}
 	}

 endif;
diff --git a/plugins/woocommerce/includes/emails/class-wc-email-customer-pos-refunded-order.php b/plugins/woocommerce/includes/emails/class-wc-email-customer-pos-refunded-order.php
index 67479ff8a6..113872ba8a 100644
--- a/plugins/woocommerce/includes/emails/class-wc-email-customer-pos-refunded-order.php
+++ b/plugins/woocommerce/includes/emails/class-wc-email-customer-pos-refunded-order.php
@@ -226,6 +226,7 @@ if ( ! class_exists( 'WC_Email_Customer_POS_Refunded_Order', false ) ) :
 		public function get_content_html() {
 			$this->add_pos_customizations();
 			add_action( 'woocommerce_pos_email_header', array( $this, 'email_header' ) );
+			add_action( 'woocommerce_pos_email_footer', array( $this, 'email_footer' ) );
 			$content = wc_get_template_html(
 				$this->template_html,
 				array(
@@ -247,6 +248,7 @@ if ( ! class_exists( 'WC_Email_Customer_POS_Refunded_Order', false ) ) :
 			);
 			$this->remove_pos_customizations();
 			remove_action( 'woocommerce_pos_email_header', array( $this, 'email_header' ) );
+			remove_action( 'woocommerce_pos_email_footer', array( $this, 'email_footer' ) );
 			return $content;
 		}

@@ -378,6 +380,8 @@ if ( ! class_exists( 'WC_Email_Customer_POS_Refunded_Order', false ) ) :
 			add_action( 'woocommerce_order_item_meta_start', array( $this, 'add_unit_price' ), 10, 4 );
 			// Add filter to include additional details in the order item totals table.
 			add_filter( 'woocommerce_get_order_item_totals', array( $this, 'order_item_totals' ), 10, 3 );
+			// Add filter for custom footer text with highest priority to run before the default footer text filtering in `WC_Emails`.
+			add_filter( 'woocommerce_email_footer_text', array( $this, 'replace_footer_placeholders' ), 1, 2 );
 		}

 		/**
@@ -387,6 +391,7 @@ if ( ! class_exists( 'WC_Email_Customer_POS_Refunded_Order', false ) ) :
 			// Remove actions and filters after generating content to avoid affecting other emails.
 			remove_action( 'woocommerce_order_item_meta_start', array( $this, 'add_unit_price' ), 10 );
 			remove_filter( 'woocommerce_get_order_item_totals', array( $this, 'order_item_totals' ), 10 );
+			remove_filter( 'woocommerce_email_footer_text', array( $this, 'replace_footer_placeholders' ), 1 );
 		}

 		/**
@@ -406,6 +411,22 @@ if ( ! class_exists( 'WC_Email_Customer_POS_Refunded_Order', false ) ) :
 			);
 		}

+		/**
+		 * Get the email footer.
+		 *
+		 * @param mixed $email Email object.
+		 *
+		 * @internal For exclusive usage within this class, backwards compatibility not guaranteed.
+		 */
+		public function email_footer( $email ) {
+			wc_get_template(
+				'emails/email-footer.php',
+				array(
+					'email' => $email,
+				)
+			);
+		}
+
 		/**
 		 * Add unit price to order item meta start position.
 		 *
@@ -542,6 +563,37 @@ if ( ! class_exists( 'WC_Email_Customer_POS_Refunded_Order', false ) ) :
 				get_option( 'woocommerce_pos_refund_returns_policy' )
 			);
 		}
+
+
+		/**
+		 * Replace footer text placeholders with POS-specific values.
+		 *
+		 * @param string $footer_text The footer text to be filtered.
+		 * @param mixed  $email       Email object.
+		 * @return string Modified footer text.
+		 *
+		 * @internal For exclusive usage within this class, backwards compatibility not guaranteed.
+		 */
+		public function replace_footer_placeholders( $footer_text, $email ) {
+			// Only replace placeholders if we're in the context of a POS email.
+			if ( $email->id !== $this->id ) {
+				return $footer_text;
+			}
+
+			return str_replace(
+				array(
+					'{site_title}',
+					'{store_address}',
+					'{store_email}',
+				),
+				array(
+					$this->get_pos_store_name(),
+					$this->get_pos_store_address(),
+					$this->get_pos_store_email(),
+				),
+				$footer_text
+			);
+		}
 	}

 endif;
diff --git a/plugins/woocommerce/templates/emails/customer-pos-completed-order.php b/plugins/woocommerce/templates/emails/customer-pos-completed-order.php
index ad4a3e8fd7..7e8f453f56 100644
--- a/plugins/woocommerce/templates/emails/customer-pos-completed-order.php
+++ b/plugins/woocommerce/templates/emails/customer-pos-completed-order.php
@@ -116,6 +116,7 @@ if ( ! empty( $pos_refund_returns_policy ) ) {
 /**
  * Output the email footer
  *
- * @since 4.0.0
+ * @hooked WC_Email_Customer_POS_*::email_footer() Output the email footer
+ * @since 10.0.0
  */
-do_action( 'woocommerce_email_footer', $email );
+do_action( 'woocommerce_pos_email_footer', $email );
diff --git a/plugins/woocommerce/templates/emails/customer-pos-refunded-order.php b/plugins/woocommerce/templates/emails/customer-pos-refunded-order.php
index b7d914c090..ba4c7a66af 100644
--- a/plugins/woocommerce/templates/emails/customer-pos-refunded-order.php
+++ b/plugins/woocommerce/templates/emails/customer-pos-refunded-order.php
@@ -127,7 +127,7 @@ if ( ! empty( $pos_refund_returns_policy ) ) {
 /**
  * Hook for the woocommerce_email_footer.
  *
- * @hooked WC_Emails::email_footer() Output the email footer
- * @since 4.0.0
- */
-do_action( 'woocommerce_email_footer', $email );
+ * @hooked WC_Email_Customer_POS_*::email_footer() Output the email footer
+ * @since 10.0.0
+*/
+do_action( 'woocommerce_pos_email_footer', $email );
diff --git a/plugins/woocommerce/templates/emails/email-footer.php b/plugins/woocommerce/templates/emails/email-footer.php
index 84bfebfe90..4c5b29ff65 100644
--- a/plugins/woocommerce/templates/emails/email-footer.php
+++ b/plugins/woocommerce/templates/emails/email-footer.php
@@ -12,10 +12,13 @@
  *
  * @see https://woocommerce.com/document/template-structure/
  * @package WooCommerce\Templates\Emails
- * @version 9.6.0
+ * @version 10.0.0
  */

 defined( 'ABSPATH' ) || exit;
+
+$email = $email ?? null;
+
 ?>
 																		</div>
 																	</td>
@@ -61,7 +64,7 @@ defined( 'ABSPATH' ) || exit;
 																		 *
 																		 * @param string $email_footer_text
 																		 */
-																		apply_filters( 'woocommerce_email_footer_text', $email_footer_text )
+																		apply_filters( 'woocommerce_email_footer_text', $email_footer_text, $email )
 																	)
 																)
 															);
diff --git a/plugins/woocommerce/templates/emails/plain/customer-pos-completed-order.php b/plugins/woocommerce/templates/emails/plain/customer-pos-completed-order.php
index a13174ea0e..811ea13155 100644
--- a/plugins/woocommerce/templates/emails/plain/customer-pos-completed-order.php
+++ b/plugins/woocommerce/templates/emails/plain/customer-pos-completed-order.php
@@ -20,6 +20,7 @@ use Automattic\WooCommerce\Utilities\FeaturesUtil;
 defined( 'ABSPATH' ) || exit;

 $email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
+$email                      = $email ?? null;

 echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
 echo esc_html( wp_strip_all_tags( $email_heading ) );
@@ -105,4 +106,4 @@ if ( ! empty( $pos_refund_returns_policy ) ) {
  *
  * @since 4.0.0
  */
-echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );
+echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ), $email ) );
diff --git a/plugins/woocommerce/templates/emails/plain/customer-pos-refunded-order.php b/plugins/woocommerce/templates/emails/plain/customer-pos-refunded-order.php
index e4f72974c8..5004884179 100644
--- a/plugins/woocommerce/templates/emails/plain/customer-pos-refunded-order.php
+++ b/plugins/woocommerce/templates/emails/plain/customer-pos-refunded-order.php
@@ -20,6 +20,7 @@ use Automattic\WooCommerce\Utilities\FeaturesUtil;
 defined( 'ABSPATH' ) || exit;

 $email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
+$email                      = $email ?? null;

 echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
 echo esc_html( wp_strip_all_tags( $email_heading ) );
@@ -112,4 +113,4 @@ if ( ! empty( $pos_refund_returns_policy ) ) {
  *
  * @since 4.0.0
  */
-echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );
+echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ), $email ) );
diff --git a/plugins/woocommerce/tests/php/includes/emails/class-wc-email-customer-pos-completed-order-test.php b/plugins/woocommerce/tests/php/includes/emails/class-wc-email-customer-pos-completed-order-test.php
index 08d5b2026b..ba1171c553 100644
--- a/plugins/woocommerce/tests/php/includes/emails/class-wc-email-customer-pos-completed-order-test.php
+++ b/plugins/woocommerce/tests/php/includes/emails/class-wc-email-customer-pos-completed-order-test.php
@@ -225,6 +225,73 @@ class WC_Email_Customer_POS_Completed_Order_Test extends \WC_Unit_Test_Case {
 		$this->assertStringContainsString( '<title>Online Store</title>', $regular_content );
 	}

+	/**
+	 * @testdox POS email replaces placeholders with POS store details in email footer HTML while regular email does not.
+	 */
+	public function test_pos_email_replaces_placeholders_with_pos_store_details_in_email_footer_while_regular_email_does_not() {
+		// Initialize WC_Emails to set up actions and filters for email header in regular emails.
+		$emails = new WC_Emails();
+
+		// Given POS store details.
+		update_option( 'woocommerce_pos_store_name', 'Physical Store' );
+		update_option( 'woocommerce_pos_store_email', 'pos@example.com' );
+		update_option( 'woocommerce_pos_store_address', '134 Main St, Anytown, USA' );
+		// Placeholders that are set in the regular email.
+		update_option( 'woocommerce_store_address', '606 2nd St, Anytown, USA' );
+		update_option( 'woocommerce_email_from_address', 'online@example.com' );
+		update_option( 'blogname', 'Online Store' );
+
+		// Footer text that includes placeholders that can be replaced with POS store details.
+		update_option( 'woocommerce_email_footer_text', 'footer_title: {site_title}; footer_address: {store_address}; footer_email: {store_email}' );
+
+		// When getting content from both email classes.
+		$pos_email     = new WC_Email_Customer_POS_Completed_Order();
+		$regular_email = new WC_Email_Customer_Completed_Order();
+
+		// Set the order on both email classes.
+		$pos_email->object     = OrderHelper::create_order();
+		$regular_email->object = OrderHelper::create_order();
+
+		$pos_content     = $pos_email->get_content_html();
+		$regular_content = $regular_email->get_content_html();
+
+		// Then POS email should include POS store details.
+		$this->assertStringContainsString( 'footer_title: Physical Store; footer_address', $pos_content );
+		$this->assertStringNotContainsString( 'footer_title: Online Store; footer_address', $pos_content );
+		$this->assertStringContainsString( 'footer_address: 134 Main St, Anytown, USA', $pos_content );
+		$this->assertStringNotContainsString( 'footer_address: 606 2nd St, Anytown, USA', $pos_content );
+		$this->assertStringContainsString( 'footer_email: pos@example.com', $pos_content );
+		$this->assertStringNotContainsString( 'footer_email: online@example.com', $pos_content );
+
+		// And regular email should include details from WC/WP settings.
+		$this->assertStringNotContainsString( 'footer_title: Physical Store; footer_address', $regular_content );
+		$this->assertStringContainsString( 'footer_title: Online Store; footer_address', $regular_content );
+		$this->assertStringNotContainsString( 'footer_address: 134 Main St, Anytown, USA', $regular_content );
+		$this->assertStringContainsString( 'footer_address: 606 2nd St, Anytown, USA', $regular_content );
+		$this->assertStringNotContainsString( 'footer_email: pos@example.com', $regular_content );
+		$this->assertStringContainsString( 'footer_email: online@example.com', $regular_content );
+
+		// When generating plain text emails.
+		$pos_plain_text     = $pos_email->get_content_plain();
+		$regular_plain_text = $regular_email->get_content_plain();
+
+		// Then POS email should include additional rows.
+		$this->assertStringContainsString( 'footer_title: Physical Store; footer_address', $pos_plain_text );
+		$this->assertStringNotContainsString( 'footer_title: Online Store; footer_address', $pos_plain_text );
+		$this->assertStringContainsString( 'footer_address: 134 Main St, Anytown, USA', $pos_plain_text );
+		$this->assertStringNotContainsString( 'footer_address: 606 2nd St, Anytown, USA', $pos_plain_text );
+		$this->assertStringContainsString( 'footer_email: pos@example.com', $pos_plain_text );
+		$this->assertStringNotContainsString( 'footer_email: online@example.com', $pos_plain_text );
+
+		// And regular email should not include these rows.
+		$this->assertStringNotContainsString( 'footer_title: Physical Store; footer_address', $regular_plain_text );
+		$this->assertStringContainsString( 'footer_title: Online Store; footer_address', $regular_plain_text );
+		$this->assertStringNotContainsString( 'footer_address: 134 Main St, Anytown, USA', $regular_plain_text );
+		$this->assertStringContainsString( 'footer_address: 606 2nd St, Anytown, USA', $regular_plain_text );
+		$this->assertStringNotContainsString( 'footer_email: pos@example.com', $regular_plain_text );
+		$this->assertStringContainsString( 'footer_email: online@example.com', $regular_plain_text );
+	}
+
 	/**
 	 * @testdox POS email includes blog name in email header HTML when POS store name is not set.
 	 */
diff --git a/plugins/woocommerce/tests/php/includes/emails/class-wc-email-customer-pos-refunded-order-test.php b/plugins/woocommerce/tests/php/includes/emails/class-wc-email-customer-pos-refunded-order-test.php
index 1b4166f984..6a81853cae 100644
--- a/plugins/woocommerce/tests/php/includes/emails/class-wc-email-customer-pos-refunded-order-test.php
+++ b/plugins/woocommerce/tests/php/includes/emails/class-wc-email-customer-pos-refunded-order-test.php
@@ -201,6 +201,73 @@ class WC_Email_Customer_POS_Refunded_Order_Test extends \WC_Unit_Test_Case {
 		$this->assertStringContainsString( '<title>Online Store</title>', $regular_content );
 	}

+	/**
+	 * @testdox POS email replaces placeholders with POS store details in email footer HTML while regular email does not.
+	 */
+	public function test_pos_email_replaces_placeholders_with_pos_store_details_in_email_footer_while_regular_email_does_not() {
+		// Initialize WC_Emails to set up actions and filters for email header in regular emails.
+		$emails = new WC_Emails();
+
+		// Given POS store details.
+		update_option( 'woocommerce_pos_store_name', 'Physical Store' );
+		update_option( 'woocommerce_pos_store_email', 'pos@example.com' );
+		update_option( 'woocommerce_pos_store_address', '134 Main St, Anytown, USA' );
+		// Placeholders that are set in the regular email.
+		update_option( 'woocommerce_store_address', '606 2nd St, Anytown, USA' );
+		update_option( 'woocommerce_email_from_address', 'online@example.com' );
+		update_option( 'blogname', 'Online Store' );
+
+		// Footer text that includes placeholders that can be replaced with POS store details.
+		update_option( 'woocommerce_email_footer_text', 'footer_title: {site_title}; footer_address: {store_address}; footer_email: {store_email}' );
+
+		// When getting content from both email classes.
+		$pos_email     = new WC_Email_Customer_POS_Refunded_Order();
+		$regular_email = new WC_Email_Customer_Refunded_Order();
+
+		// Set the order on both email classes.
+		$pos_email->object     = OrderHelper::create_order();
+		$regular_email->object = OrderHelper::create_order();
+
+		$pos_content     = $pos_email->get_content_html();
+		$regular_content = $regular_email->get_content_html();
+
+		// Then POS email should include POS store details.
+		$this->assertStringContainsString( 'footer_title: Physical Store; footer_address', $pos_content );
+		$this->assertStringNotContainsString( 'footer_title: Online Store; footer_address', $pos_content );
+		$this->assertStringContainsString( 'footer_address: 134 Main St, Anytown, USA', $pos_content );
+		$this->assertStringNotContainsString( 'footer_address: 606 2nd St, Anytown, USA', $pos_content );
+		$this->assertStringContainsString( 'footer_email: pos@example.com', $pos_content );
+		$this->assertStringNotContainsString( 'footer_email: online@example.com', $pos_content );
+
+		// And regular email should include details from WC/WP settings.
+		$this->assertStringNotContainsString( 'footer_title: Physical Store; footer_address', $regular_content );
+		$this->assertStringContainsString( 'footer_title: Online Store; footer_address', $regular_content );
+		$this->assertStringNotContainsString( 'footer_address: 134 Main St, Anytown, USA', $regular_content );
+		$this->assertStringContainsString( 'footer_address: 606 2nd St, Anytown, USA', $regular_content );
+		$this->assertStringNotContainsString( 'footer_email: pos@example.com', $regular_content );
+		$this->assertStringContainsString( 'footer_email: online@example.com', $regular_content );
+
+		// When generating plain text emails.
+		$pos_plain_text     = $pos_email->get_content_plain();
+		$regular_plain_text = $regular_email->get_content_plain();
+
+		// Then POS email should include additional rows.
+		$this->assertStringContainsString( 'footer_title: Physical Store; footer_address', $pos_plain_text );
+		$this->assertStringNotContainsString( 'footer_title: Online Store; footer_address', $pos_plain_text );
+		$this->assertStringContainsString( 'footer_address: 134 Main St, Anytown, USA', $pos_plain_text );
+		$this->assertStringNotContainsString( 'footer_address: 606 2nd St, Anytown, USA', $pos_plain_text );
+		$this->assertStringContainsString( 'footer_email: pos@example.com', $pos_plain_text );
+		$this->assertStringNotContainsString( 'footer_email: online@example.com', $pos_plain_text );
+
+		// And regular email should not include these rows.
+		$this->assertStringNotContainsString( 'footer_title: Physical Store; footer_address', $regular_plain_text );
+		$this->assertStringContainsString( 'footer_title: Online Store; footer_address', $regular_plain_text );
+		$this->assertStringNotContainsString( 'footer_address: 134 Main St, Anytown, USA', $regular_plain_text );
+		$this->assertStringContainsString( 'footer_address: 606 2nd St, Anytown, USA', $regular_plain_text );
+		$this->assertStringNotContainsString( 'footer_email: pos@example.com', $regular_plain_text );
+		$this->assertStringContainsString( 'footer_email: online@example.com', $regular_plain_text );
+	}
+
 	/**
 	 * @testdox POS email includes blog name in email header HTML when POS store name is not set.
 	 */