WordPress at Your Fingertips
function is not described

WC_Emails::replace_placeholders() public WC 3.7.0

Replace placeholder text in strings.

{} It's a method of the class: WC_Emails{}

No Hooks.

Return

String. Email footer text with any replacements done.

Usage

$WC_Emails = new WC_Emails();
$WC_Emails->replace_placeholders( $string );
$string(string) (required)
Email footer text.

Changelog

Since 3.7.0 Introduced.

Code of WC_Emails::replace_placeholders() WC 5.6.0

public function replace_placeholders( $string ) {
	$domain = wp_parse_url( home_url(), PHP_URL_HOST );

	return str_replace(
		array(
			'{site_title}',
			'{site_address}',
			'{site_url}',
			'{woocommerce}',
			'{WooCommerce}',
		),
		array(
			$this->get_blogname(),
			$domain,
			$domain,
			'<a href="https://woocommerce.com">WooCommerce</a>',
			'<a href="https://woocommerce.com">WooCommerce</a>',
		),
		$string
	);
}