block
3 weeks ago
plain
3 weeks ago
admin-cancelled-order.php
1 year ago
admin-failed-order.php
9 months ago
admin-new-order.php
9 months ago
admin-payment-gateway-enabled.php
5 months ago
customer-abandoned-cart-recovery.php
1 month ago
customer-cancelled-order.php
9 months ago
customer-completed-order.php
9 months ago
customer-failed-order.php
9 months ago
customer-fulfillment-created.php
9 months ago
customer-fulfillment-deleted.php
9 months ago
customer-fulfillment-updated.php
4 months ago
customer-invoice.php
3 weeks ago
customer-new-account.php
2 months ago
customer-note.php
9 months ago
customer-on-hold-order.php
9 months ago
customer-pos-completed-order.php
9 months ago
customer-pos-refunded-order.php
9 months ago
customer-processing-order.php
9 months ago
customer-refunded-order.php
9 months ago
customer-reset-password.php
2 months ago
customer-review-request.php
3 months ago
customer-stock-notification-verified.php
2 months ago
customer-stock-notification-verify.php
1 year ago
customer-stock-notification.php
1 year ago
customer-verify-email.php
1 month ago
email-addresses.php
6 months ago
email-button.php
1 month ago
email-customer-details.php
1 year ago
email-downloads.php
9 months ago
email-footer.php
9 months ago
email-fulfillment-details.php
5 months ago
email-fulfillment-items.php
1 month ago
email-header.php
5 months ago
email-mobile-messaging.php
2 years ago
email-order-details.php
3 weeks ago
email-order-items.php
1 month ago
email-styles.php
1 month ago
email-addresses.php
105 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Email Addresses |
| 4 | * |
| 5 | * This template can be overridden by copying it to yourtheme/woocommerce/emails/email-addresses.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 10.6.0 |
| 16 | */ |
| 17 | |
| 18 | use Automattic\WooCommerce\Utilities\FeaturesUtil; |
| 19 | |
| 20 | if ( ! defined( 'ABSPATH' ) ) { |
| 21 | exit; |
| 22 | } |
| 23 | |
| 24 | $address = $order->get_formatted_billing_address(); |
| 25 | $shipping = $order->get_formatted_shipping_address(); |
| 26 | |
| 27 | $email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' ); |
| 28 | |
| 29 | /** |
| 30 | * Filter whether to display the section divider in the email body. |
| 31 | * |
| 32 | * @since 10.6.0 |
| 33 | * @param bool $display_section_divider Whether to display the section divider. Default true. |
| 34 | */ |
| 35 | $display_section_divider = (bool) apply_filters( 'woocommerce_email_body_display_section_divider', true ); |
| 36 | |
| 37 | ?> |
| 38 | <?php if ( $display_section_divider ) : ?> |
| 39 | <hr style="border: 0; border-top: 1px solid #1E1E1E; border-top-color: rgba(30, 30, 30, 0.2); margin: 20px 0;"> |
| 40 | <?php endif; ?> |
| 41 | <table id="addresses" cellspacing="0" cellpadding="0" style="width: 100%; vertical-align: top; margin-bottom: <?php echo $email_improvements_enabled ? '0' : '40px'; ?>; padding:0;" border="0" role="presentation"> |
| 42 | <tr> |
| 43 | <td class="font-family text-align-left" style="border:0; padding:0;" valign="top" width="50%"> |
| 44 | <?php if ( $email_improvements_enabled ) { ?> |
| 45 | <b class="address-title"><?php esc_html_e( 'Billing address', 'woocommerce' ); ?></b> |
| 46 | <?php } else { ?> |
| 47 | <h2><?php esc_html_e( 'Billing address', 'woocommerce' ); ?></h2> |
| 48 | <?php } ?> |
| 49 | |
| 50 | <address class="address"> |
| 51 | <?php echo wp_kses_post( $address ? $address : esc_html__( 'N/A', 'woocommerce' ) ); ?> |
| 52 | <?php if ( $order->get_billing_phone() ) : ?> |
| 53 | <br/><?php echo wc_make_phone_clickable( $order->get_billing_phone() ); ?> |
| 54 | <?php endif; ?> |
| 55 | <?php if ( $order->get_billing_email() ) : ?> |
| 56 | <br/><?php echo esc_html( $order->get_billing_email() ); ?> |
| 57 | <?php endif; ?> |
| 58 | <?php |
| 59 | /** |
| 60 | * Fires after the core address fields in emails. |
| 61 | * |
| 62 | * @since 8.6.0 |
| 63 | * |
| 64 | * @param string $type Address type. Either 'billing' or 'shipping'. |
| 65 | * @param WC_Order $order Order instance. |
| 66 | * @param bool $sent_to_admin If this email is being sent to the admin or not. |
| 67 | * @param bool $plain_text If this email is plain text or not. |
| 68 | */ |
| 69 | do_action( 'woocommerce_email_customer_address_section', 'billing', $order, $sent_to_admin, false ); |
| 70 | ?> |
| 71 | </address> |
| 72 | </td> |
| 73 | <?php if ( ! wc_ship_to_billing_address_only() && $order->needs_shipping_address() && $shipping ) : ?> |
| 74 | <td class="font-family text-align-left" style="padding:0;" valign="top" width="50%"> |
| 75 | <?php if ( $email_improvements_enabled ) { ?> |
| 76 | <b class="address-title"><?php esc_html_e( 'Shipping address', 'woocommerce' ); ?></b> |
| 77 | <?php } else { ?> |
| 78 | <h2><?php esc_html_e( 'Shipping address', 'woocommerce' ); ?></h2> |
| 79 | <?php } ?> |
| 80 | |
| 81 | <address class="address"> |
| 82 | <?php echo wp_kses_post( $shipping ); ?> |
| 83 | <?php if ( $order->get_shipping_phone() ) : ?> |
| 84 | <br /><?php echo wc_make_phone_clickable( $order->get_shipping_phone() ); ?> |
| 85 | <?php endif; ?> |
| 86 | <?php |
| 87 | /** |
| 88 | * Fires after the core address fields in emails. |
| 89 | * |
| 90 | * @since 8.6.0 |
| 91 | * |
| 92 | * @param string $type Address type. Either 'billing' or 'shipping'. |
| 93 | * @param WC_Order $order Order instance. |
| 94 | * @param bool $sent_to_admin If this email is being sent to the admin or not. |
| 95 | * @param bool $plain_text If this email is plain text or not. |
| 96 | */ |
| 97 | do_action( 'woocommerce_email_customer_address_section', 'shipping', $order, $sent_to_admin, false ); |
| 98 | ?> |
| 99 | </address> |
| 100 | </td> |
| 101 | <?php endif; ?> |
| 102 | </tr> |
| 103 | </table> |
| 104 | <?php echo $email_improvements_enabled ? '<br>' : ''; ?> |
| 105 |