WC_Email_Customer_POS_Refunded_Order::replace_footer_placeholderspublicWC 1.0

Replace footer text placeholders with POS-specific values.

Method of the class: WC_Email_Customer_POS_Refunded_Order{}

No Hooks.

Returns

String. Modified footer text.

Usage

$WC_Email_Customer_POS_Refunded_Order = new WC_Email_Customer_POS_Refunded_Order();
$WC_Email_Customer_POS_Refunded_Order->replace_footer_placeholders( $footer_text, $email );
$footer_text(string) (required)
The footer text to be filtered.
$email(mixed) (required)
Email object.

WC_Email_Customer_POS_Refunded_Order::replace_footer_placeholders() code WC 10.7.0

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
	);
}