plain
1 year ago
admin-cancelled-order.php
1 year ago
admin-failed-order.php
1 year ago
admin-new-order.php
1 year ago
customer-completed-order.php
1 year ago
customer-failed-order.php
1 year ago
customer-invoice.php
1 year ago
customer-new-account-blocks.php
1 year ago
customer-new-account.php
1 year ago
customer-note.php
1 year ago
customer-on-hold-order.php
1 year ago
customer-processing-order.php
1 year ago
customer-refunded-order.php
1 year ago
customer-reset-password.php
1 year ago
email-addresses.php
1 year ago
email-customer-details.php
1 year ago
email-downloads.php
1 year ago
email-footer.php
1 year ago
email-header.php
1 year ago
email-mobile-messaging.php
2 years ago
email-order-details.php
1 year ago
email-order-items.php
1 year ago
email-styles.php
1 year ago
email-header.php
104 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Email Header |
| 4 | * |
| 5 | * This template can be overridden by copying it to yourtheme/woocommerce/emails/email-header.php. |
| 6 | * |
| 7 | * HOWEVER, on occasion WooCommerce will need to update template files and you |
| 8 | * (the theme developer) will need to copy the new files to your theme to |
| 9 | * maintain compatibility. We try to do this as little as possible, but it does |
| 10 | * happen. When this occurs the version of the template file will be bumped and |
| 11 | * the readme will list any important changes. |
| 12 | * |
| 13 | * @see https://woocommerce.com/document/template-structure/ |
| 14 | * @package WooCommerce\Templates\Emails |
| 15 | * @version 9.8.0 |
| 16 | */ |
| 17 | |
| 18 | use Automattic\WooCommerce\Utilities\FeaturesUtil; |
| 19 | |
| 20 | if ( ! defined( 'ABSPATH' ) ) { |
| 21 | exit; // Exit if accessed directly |
| 22 | } |
| 23 | |
| 24 | $email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' ); |
| 25 | |
| 26 | ?> |
| 27 | <!DOCTYPE html> |
| 28 | <html <?php language_attributes(); ?>> |
| 29 | <head> |
| 30 | <meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo( 'charset' ); ?>" /> |
| 31 | <meta content="width=device-width, initial-scale=1.0" name="viewport"> |
| 32 | <title><?php echo get_bloginfo( 'name', 'display' ); ?></title> |
| 33 | </head> |
| 34 | <body <?php echo is_rtl() ? 'rightmargin' : 'leftmargin'; ?>="0" marginwidth="0" topmargin="0" marginheight="0" offset="0"> |
| 35 | <table width="100%" id="outer_wrapper"> |
| 36 | <tr> |
| 37 | <td><!-- Deliberately empty to support consistent sizing and layout across multiple email clients. --></td> |
| 38 | <td width="600"> |
| 39 | <div id="wrapper" dir="<?php echo is_rtl() ? 'rtl' : 'ltr'; ?>"> |
| 40 | <table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="inner_wrapper"> |
| 41 | <tr> |
| 42 | <td align="center" valign="top"> |
| 43 | <?php |
| 44 | $img = get_option( 'woocommerce_email_header_image' ); |
| 45 | /** |
| 46 | * This filter is documented in templates/emails/email-styles.php |
| 47 | * |
| 48 | * @since 9.6.0 |
| 49 | */ |
| 50 | if ( apply_filters( 'woocommerce_is_email_preview', false ) ) { |
| 51 | $img_transient = get_transient( 'woocommerce_email_header_image' ); |
| 52 | $img = false !== $img_transient ? $img_transient : $img; |
| 53 | } |
| 54 | |
| 55 | if ( $email_improvements_enabled ) : |
| 56 | ?> |
| 57 | <table border="0" cellpadding="0" cellspacing="0" width="100%"> |
| 58 | <tr> |
| 59 | <td id="template_header_image"> |
| 60 | <?php |
| 61 | if ( $img ) { |
| 62 | echo '<p style="margin-top:0;"><img src="' . esc_url( $img ) . '" alt="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" /></p>'; |
| 63 | } else { |
| 64 | echo '<p class="email-logo-text">' . esc_html( get_bloginfo( 'name', 'display' ) ) . '</p>'; |
| 65 | } |
| 66 | ?> |
| 67 | </td> |
| 68 | </tr> |
| 69 | </table> |
| 70 | <?php else : ?> |
| 71 | <div id="template_header_image"> |
| 72 | <?php |
| 73 | if ( $img ) { |
| 74 | echo '<p style="margin-top:0;"><img src="' . esc_url( $img ) . '" alt="' . esc_attr( get_bloginfo( 'name', 'display' ) ) . '" /></p>'; |
| 75 | } |
| 76 | ?> |
| 77 | </div> |
| 78 | <?php endif; ?> |
| 79 | <table border="0" cellpadding="0" cellspacing="0" width="100%" id="template_container"> |
| 80 | <tr> |
| 81 | <td align="center" valign="top"> |
| 82 | <!-- Header --> |
| 83 | <table border="0" cellpadding="0" cellspacing="0" width="100%" id="template_header"> |
| 84 | <tr> |
| 85 | <td id="header_wrapper"> |
| 86 | <h1><?php echo esc_html( $email_heading ); ?></h1> |
| 87 | </td> |
| 88 | </tr> |
| 89 | </table> |
| 90 | <!-- End Header --> |
| 91 | </td> |
| 92 | </tr> |
| 93 | <tr> |
| 94 | <td align="center" valign="top"> |
| 95 | <!-- Body --> |
| 96 | <table border="0" cellpadding="0" cellspacing="0" width="100%" id="template_body"> |
| 97 | <tr> |
| 98 | <td valign="top" id="body_content"> |
| 99 | <!-- Content --> |
| 100 | <table border="0" cellpadding="20" cellspacing="0" width="100%"> |
| 101 | <tr> |
| 102 | <td valign="top" id="body_content_inner_cell"> |
| 103 | <div id="body_content_inner"> |
| 104 |