[7.0] Only show mobile messaging on Merchant New Order emails (#35025)
Adds a check to the mobile messaging callback to ensure it only gets inserted into the email footer for the New Order notification for merchants, and not for emails sent to customers. Fixes #35016
This commit is contained in:
parent
84a74b5edb
commit
322f7e8fc7
|
@ -0,0 +1,3 @@
|
|||
Significance: patch
|
||||
Type: fix
|
||||
Comment: This fixes bug described in https://github.com/woocommerce/woocommerce/issues/35016
|
|
@ -227,9 +227,11 @@ if ( ! class_exists( 'WC_Email_New_Order' ) ) :
|
|||
|
||||
/**
|
||||
* Add mobile messaging.
|
||||
*
|
||||
* @param WC_Email $email that called for mobile messaging. May not contain a WC_Email for legacy reasons.
|
||||
*/
|
||||
public function mobile_messaging() {
|
||||
if ( null !== $this->object ) {
|
||||
public function mobile_messaging( $email ) {
|
||||
if ( $email instanceof WC_Email_New_Order && null !== $this->object ) {
|
||||
$domain = wp_parse_url( home_url(), PHP_URL_HOST );
|
||||
wc_get_template(
|
||||
'emails/email-mobile-messaging.php',
|
||||
|
|
Loading…
Reference in New Issue