Added default additional content to 'woocommerce_email_additional_content_' filter (#35195)

* Added default additional content to 'woocommerce_email_additional_content_' . $this->id filter

* Changelog.

Co-authored-by: Mattia Lerda <mattia.lerda@delitestudio.com>
This commit is contained in:
Peter Fabian 2022-10-20 15:08:53 +02:00 committed by GitHub
parent cc0c4ef447
commit bf61c6bf19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 3 deletions

View File

@ -0,0 +1,4 @@
Significance: patch
Type: fix
Added default additional content to emails via filter woocommerce_email_additional_content_.

View File

@ -400,9 +400,7 @@ class WC_Email extends WC_Settings_API {
* @return string * @return string
*/ */
public function get_additional_content() { public function get_additional_content() {
$content = $this->get_option( 'additional_content', '' ); return apply_filters( 'woocommerce_email_additional_content_' . $this->id, $this->format_string( $this->get_option( 'additional_content', $this->get_default_additional_content() ) ), $this->object, $this );
return apply_filters( 'woocommerce_email_additional_content_' . $this->id, $this->format_string( $content ), $this->object, $this );
} }
/** /**