Remove the default text in "Additional content" being sent for all emails when the field is empty for Admin New Order email
This commit is contained in:
parent
230ff742bf
commit
7ae2e66e58
|
@ -1,4 +1,4 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
|
||||
Remove the default text in "Additional content" being sent for all emails when the field is empty
|
||||
Remove the default text in "Additional content" being sent for all emails when the field is empty for Admin New Order email
|
|
@ -165,6 +165,18 @@ if ( ! class_exists( 'WC_Email_New_Order' ) ) :
|
|||
return __( 'Congratulations on the sale.', 'woocommerce' );
|
||||
}
|
||||
|
||||
/**
|
||||
* Return content from the additional_content field.
|
||||
*
|
||||
* Displayed above the footer.
|
||||
*
|
||||
* @since 3.7.0
|
||||
* @return string
|
||||
*/
|
||||
public function get_additional_content() {
|
||||
return apply_filters( 'woocommerce_email_additional_content_' . $this->id, $this->format_string( $this->get_option( 'additional_content' ) ), $this->object, $this );
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialise settings form fields.
|
||||
*/
|
||||
|
|
|
@ -400,7 +400,7 @@ class WC_Email extends WC_Settings_API {
|
|||
* @return string
|
||||
*/
|
||||
public function get_additional_content() {
|
||||
return apply_filters( 'woocommerce_email_additional_content_' . $this->id, $this->format_string( $this->get_option( 'additional_content' ) ), $this->object, $this );
|
||||
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 );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue