Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
/**
* Order details table shown in emails.
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/email-order-details.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://docs.woocommerce.com/document/template-structure/
* @package WooCommerce/Templates/Emails
* @version 3.7.0
*/
defined( 'ABSPATH' ) || exit;
?>
<tbody>
<tr>
<td style="padding: 0 10px;" valign="top">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%">
<tbody>
<tr>
<td style="padding: 5px 10px;" valign="top">
<table border="0" cellpadding="0" cellspacing="0" role="presentation">
<tbody>
<tr>
<td style="border-radius: 8px; padding: 14px 19px; background-color: #1595E7;" bgcolor="#1595E7" valign="top" align="center">
<?php $order_url = $sent_to_admin ? $order->get_edit_order_url() : $order->get_view_order_url(); ?>
<a class="pc-fb-font" href="<?php echo esc_url($order_url); ?>" style="text-decoration: none; word-break: break-word; line-height: 24px; letter-spacing: -0.2px; font-family: 'Fira Sans', Helvetica, Arial, sans-serif; font-size: 16px; font-weight: 500; color: #ffffff; display: block;">
<?php esc_html_e('View my order', 'woocommerce'); ?>
</a>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td height="25" style="line-height: 1px; font-size: 1px;">&nbsp;</td>
</tr>
</tbody>
<tbody>
<tr>
<td valign="top">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%">
<tbody>
<tr>
<td style="font-size: 0;" valign="top">
<!--[if (gte mso 9)|(IE)]><table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%"><tr><td width="280" valign="top"><![endif]-->
<div class="pc-sm-mw-100pc" style="display: inline-block; max-width: 280px; width: 100%; vertical-align: top;">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%">
<tbody>
<tr>
<td style="padding: 10px 20px;" valign="top">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%">
<tbody>
<tr>
<td class="pc-fb-font" style="border-bottom: 1px solid #E5E5E5; padding-bottom: 10px; letter-spacing: -0.2px; line-height: 26px; font-family: 'Fira Sans', Helvetica, Arial, sans-serif; font-size: 16px; font-weight: bold; color: #151515;" valign="top">
<?php esc_html_e('Order number', 'woocommerce'); ?>
</td>
</tr>
<tr>
<td height="10" style="line-height: 1px; font-size: 1px;">&nbsp;</td>
</tr>
</tbody>
<tbody>
<tr>
<td class="pc-fb-font" style="letter-spacing: -0.2px; line-height: 26px; font-family: 'Fira Sans', Helvetica, Arial, sans-serif; font-size: 16px; color: #151515; padding: 10px 0 0;" valign="top">
<?php echo $order->get_order_number(); ?>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<!--[if (gte mso 9)|(IE)]></td><td width="280" valign="top"><![endif]-->
<div class="pc-sm-mw-100pc" style="display: inline-block; max-width: 280px; width: 100%; vertical-align: top;">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%">
<tbody>
<tr>
<td style="padding: 10px 20px;" valign="top">
<table border="0" cellpadding="0" cellspacing="0" role="presentation" width="100%">
<tbody>
<tr>
<td class="pc-fb-font" style="border-bottom: 1px solid #E5E5E5; padding-bottom: 10px; letter-spacing: -0.2px; line-height: 26px; font-family: 'Fira Sans', Helvetica, Arial, sans-serif; font-size: 16px; font-weight: bold; color: #151515;" valign="top">
<?php esc_html_e('Order date', 'woocommerce'); ?>
</td>
</tr>
<tr>
<td height="10" style="line-height: 1px; font-size: 1px;">&nbsp;</td>
</tr>
</tbody>
<tbody>
<tr>
<td class="pc-fb-font" style="letter-spacing: -0.2px; line-height: 26px; font-family: 'Fira Sans', Helvetica, Arial, sans-serif; font-size: 16px; color: #151515; padding: 10px 0 0;" valign="top">
<?php echo $order->get_date_created()->format('F d Y'); ?>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
<!--[if (gte mso 9)|(IE)]></td></tr></table><![endif]-->
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td style="height: 10px; line-height: 1px; font-size: 1px;" height="10">&nbsp;</td>
</tr>
<tr>
<td valign="top">
<?php
/*
* @hooked WC_Emails::customer_details() Shows customer details
* @hooked WC_Emails::email_address() Shows email address
*/
do_action('woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email);
?>
</td>
</tr>
</tbody>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.