Restore blogname placeholder, but do not list in admin

Closes #17200
This commit is contained in:
Mike Jolley 2017-10-13 17:42:12 +01:00
parent 93a6f68408
commit 6647b35585
1 changed files with 4 additions and 0 deletions

View File

@ -261,6 +261,10 @@ class WC_Email extends WC_Settings_API {
$find = array_merge( (array) $this->find, $find );
$replace = array_merge( (array) $this->replace, $replace );
// Take care of blogname which is no longer defined as a valid placeholder.
$find[] = '{blogname}';
$replace[] = $this->get_blogname();
// If using the older style filters for find and replace, ensure the array is associative and then pass through filters. @todo deprecate in 4.0.0.
if ( has_filter( 'woocommerce_email_format_string_replace' ) || has_filter( 'woocommerce_email_format_string_find' ) ) {
$legacy_find = $this->find;