email-header.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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://docs.woocommerce.com/document/template-structure/
  14. * @author WooThemes
  15. * @package WooCommerce/Templates/Emails
  16. * @version 2.4.0
  17. */
  18. if ( ! defined( 'ABSPATH' ) ) {
  19. exit; // Exit if accessed directly
  20. }
  21. ?>
  22. <!DOCTYPE html>
  23. <html <?php language_attributes(); ?>>
  24. <head>
  25. <meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo( 'charset' ); ?>" />
  26. <title><?php echo get_bloginfo( 'name', 'display' ); ?></title>
  27. </head>
  28. <body <?php echo is_rtl() ? 'rightmargin' : 'leftmargin'; ?>="0" marginwidth="0" topmargin="0" marginheight="0" offset="0">
  29. <div id="wrapper" dir="<?php echo is_rtl() ? 'rtl' : 'ltr'?>">
  30. <table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%">
  31. <tr>
  32. <td align="center" valign="top">
  33. <div id="template_header_image">
  34. <?php
  35. if ( $img = get_option( 'woocommerce_email_header_image' ) ) {
  36. echo '<p style="margin-top:0;"><img src="' . esc_url( $img ) . '" alt="' . get_bloginfo( 'name', 'display' ) . '" /></p>';
  37. }
  38. ?>
  39. </div>
  40. <table border="0" cellpadding="0" cellspacing="0" width="600" id="template_container">
  41. <tr>
  42. <td align="center" valign="top">
  43. <!-- Header -->
  44. <table border="0" cellpadding="0" cellspacing="0" width="600" id="template_header">
  45. <tr>
  46. <td id="header_wrapper">
  47. <h1><?php echo $email_heading; ?></h1>
  48. </td>
  49. </tr>
  50. </table>
  51. <!-- End Header -->
  52. </td>
  53. </tr>
  54. <tr>
  55. <td align="center" valign="top">
  56. <!-- Body -->
  57. <table border="0" cellpadding="0" cellspacing="0" width="600" id="template_body">
  58. <tr>
  59. <td valign="top" id="body_content">
  60. <!-- Content -->
  61. <table border="0" cellpadding="20" cellspacing="0" width="100%">
  62. <tr>
  63. <td valign="top">
  64. <div id="body_content_inner">