Revert "pass email object to header and footer templates"
This reverts commit 8821bf41c5
.
This commit is contained in:
parent
3a0bb38c9d
commit
5885e9a29e
|
@ -190,7 +190,7 @@ class WC_Emails {
|
|||
$this->init();
|
||||
|
||||
// Email Header, Footer and content hooks.
|
||||
add_action( 'woocommerce_email_header', array( $this, 'email_header' ), 10, 2 );
|
||||
add_action( 'woocommerce_email_header', array( $this, 'email_header' ) );
|
||||
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,26 +263,17 @@ class WC_Emails {
|
|||
/**
|
||||
* Get the email header.
|
||||
*
|
||||
* @param mixed $email_heading Heading for the email.
|
||||
* @param WC_Email $email Email object for the email.
|
||||
* @param mixed $email_heading Heading for the email.
|
||||
*/
|
||||
public function email_header( $email_heading, $email ) {
|
||||
wc_get_template(
|
||||
'emails/email-header.php',
|
||||
array(
|
||||
'email_heading' => $email_heading,
|
||||
'email' => $email,
|
||||
)
|
||||
);
|
||||
public function email_header( $email_heading ) {
|
||||
wc_get_template( 'emails/email-header.php', array( 'email_heading' => $email_heading ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the email footer.
|
||||
*
|
||||
* @param WC_Email $email Email object for the email.
|
||||
*/
|
||||
public function email_footer( $email ) {
|
||||
wc_get_template( 'emails/email-footer.php', array( 'email' => $email ) );
|
||||
public function email_footer() {
|
||||
wc_get_template( 'emails/email-footer.php' );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue