diff --git a/includes/class-wc-emails.php b/includes/class-wc-emails.php index e4aeb5c185d..338c8caff18 100644 --- a/includes/class-wc-emails.php +++ b/includes/class-wc-emails.php @@ -190,7 +190,7 @@ class WC_Emails { $this->init(); // Email Header, Footer and content hooks. - add_action( 'woocommerce_email_header', array( $this, 'email_header' ) ); + add_action( 'woocommerce_email_header', array( $this, 'email_header' ), 10, 2 ); add_action( 'woocommerce_email_footer', array( $this, 'email_footer' ) ); add_action( 'woocommerce_email_order_details', array( $this, 'order_downloads' ), 10, 4 ); add_action( 'woocommerce_email_order_details', array( $this, 'order_details' ), 10, 4 ); @@ -263,17 +263,26 @@ class WC_Emails { /** * Get the email header. * - * @param mixed $email_heading Heading for the email. + * @param mixed $email_heading Heading for the email. + * @param WC_Email $email Email object for the email. */ - public function email_header( $email_heading ) { - wc_get_template( 'emails/email-header.php', array( 'email_heading' => $email_heading ) ); + public function email_header( $email_heading, $email ) { + wc_get_template( + 'emails/email-header.php', + array( + 'email_heading' => $email_heading, + 'email' => $email, + ) + ); } /** * Get the email footer. + * + * @param WC_Email $email Email object for the email. */ - public function email_footer() { - wc_get_template( 'emails/email-footer.php' ); + public function email_footer( $email ) { + wc_get_template( 'emails/email-footer.php', array( 'email' => $email ) ); } /**