a598ebe4 by Jeff Balicki

emails

Signed-off-by: Jeff <jeff@gotenzing.com>
1 parent 350555a8
Showing 36 changed files with 2290 additions and 0 deletions
1 <?php
2 /**
3 * Admin cancelled order email
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/emails/admin-cancelled-order.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 * @package WooCommerce\Templates\Emails
15 * @version 4.1.0
16 */
17
18 if ( ! defined( 'ABSPATH' ) ) {
19 exit;
20 }
21
22 /*
23 * @hooked WC_Emails::email_header() Output the email header
24 */
25 do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
26
27 <?php /* translators: %1$s: Order number, %2$s: Customer full name. */ ?>
28 <p><?php printf( esc_html__( 'Notification to let you know &mdash; order #%1$s belonging to %2$s has been cancelled:', 'woocommerce' ), esc_html( $order->get_order_number() ), esc_html( $order->get_formatted_billing_full_name() ) ); ?></p>
29
30 <?php
31 /*
32 * @hooked WC_Emails::order_details() Shows the order details table.
33 * @hooked WC_Structured_Data::generate_order_data() Generates structured data.
34 * @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
35 * @since 2.5.0
36 */
37 do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
38
39 /*
40 * @hooked WC_Emails::order_meta() Shows order meta data.
41 */
42 do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
43
44 /*
45 * @hooked WC_Emails::customer_details() Shows customer details
46 * @hooked WC_Emails::email_address() Shows email address
47 */
48 do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
49
50 /**
51 * Show user-defined additional content - this is set in each email's settings.
52 */
53 if ( $additional_content ) {
54 echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
55 }
56
57 /*
58 * @hooked WC_Emails::email_footer() Output the email footer
59 */
60 do_action( 'woocommerce_email_footer', $email );
1 <?php
2 /**
3 * Admin failed order email
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/emails/admin-failed-order.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 * @package WooCommerce\Templates\Emails
15 * @version 3.7.0
16 */
17
18 if ( ! defined( 'ABSPATH' ) ) {
19 exit;
20 }
21
22 /*
23 * @hooked WC_Emails::email_header() Output the email header
24 */
25 do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
26
27 <?php /* translators: %1$s: Order number. %2$s: Customer full name. */ ?>
28 <p><?php printf( esc_html__( 'Payment for order #%1$s from %2$s has failed. The order was as follows:', 'woocommerce' ), esc_html( $order->get_order_number() ), esc_html( $order->get_formatted_billing_full_name() ) ); ?></p>
29
30 <?php
31
32 /*
33 * @hooked WC_Emails::order_details() Shows the order details table.
34 * @hooked WC_Structured_Data::generate_order_data() Generates structured data.
35 * @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
36 * @since 2.5.0
37 */
38 do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
39
40 /*
41 * @hooked WC_Emails::order_meta() Shows order meta data.
42 */
43 do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
44
45 /*
46 * @hooked WC_Emails::customer_details() Shows customer details
47 * @hooked WC_Emails::email_address() Shows email address
48 */
49 do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
50
51 /**
52 * Show user-defined additional content - this is set in each email's settings.
53 */
54 if ( $additional_content ) {
55 echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
56 }
57
58 /*
59 * @hooked WC_Emails::email_footer() Output the email footer
60 */
61 do_action( 'woocommerce_email_footer', $email );
1 <?php
2 /**
3 * Admin new order email
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/emails/admin-new-order.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 * @package WooCommerce\Templates\Emails\HTML
15 * @version 3.7.0
16 */
17
18 defined( 'ABSPATH' ) || exit;
19
20 /*
21 * @hooked WC_Emails::email_header() Output the email header
22 */
23 do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
24
25 <?php /* translators: %s: Customer billing full name */ ?>
26 <p><?php printf( esc_html__( 'You’ve received the following order from %s:', 'woocommerce' ), $order->get_formatted_billing_full_name() ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
27 <?php
28
29 /*
30 * @hooked WC_Emails::order_details() Shows the order details table.
31 * @hooked WC_Structured_Data::generate_order_data() Generates structured data.
32 * @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
33 * @since 2.5.0
34 */
35 do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
36
37 /*
38 * @hooked WC_Emails::order_meta() Shows order meta data.
39 */
40 do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
41
42 /*
43 * @hooked WC_Emails::customer_details() Shows customer details
44 * @hooked WC_Emails::email_address() Shows email address
45 */
46 do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
47
48 /**
49 * Show user-defined additional content - this is set in each email's settings.
50 */
51 if ( $additional_content ) {
52 echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
53 }
54
55 /*
56 * @hooked WC_Emails::email_footer() Output the email footer
57 */
58 do_action( 'woocommerce_email_footer', $email );
1 <?php
2 /**
3 * Customer completed order email
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-completed-order.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 * @package WooCommerce\Templates\Emails
15 * @version 3.7.0
16 */
17
18 if ( ! defined( 'ABSPATH' ) ) {
19 exit;
20 }
21
22 /*
23 * @hooked WC_Emails::email_header() Output the email header
24 */
25 do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
26
27 <?php /* translators: %s: Customer first name */ ?>
28 <p><?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); ?></p>
29 <p><?php esc_html_e( 'We have finished processing your order.', 'woocommerce' ); ?></p>
30 <?php
31
32 /*
33 * @hooked WC_Emails::order_details() Shows the order details table.
34 * @hooked WC_Structured_Data::generate_order_data() Generates structured data.
35 * @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
36 * @since 2.5.0
37 */
38 do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
39
40 /*
41 * @hooked WC_Emails::order_meta() Shows order meta data.
42 */
43 do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
44
45 /*
46 * @hooked WC_Emails::customer_details() Shows customer details
47 * @hooked WC_Emails::email_address() Shows email address
48 */
49 do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
50
51 /**
52 * Show user-defined additional content - this is set in each email's settings.
53 */
54 if ( $additional_content ) {
55 echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
56 }
57
58 /*
59 * @hooked WC_Emails::email_footer() Output the email footer
60 */
61 do_action( 'woocommerce_email_footer', $email );
1 <?php
2 /**
3 * Customer invoice email
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-invoice.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 * @package WooCommerce\Templates\Emails
15 * @version 3.7.0
16 */
17
18 if ( ! defined( 'ABSPATH' ) ) {
19 exit;
20 }
21
22 /**
23 * Executes the e-mail header.
24 *
25 * @hooked WC_Emails::email_header() Output the email header
26 */
27 do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
28
29 <?php /* translators: %s: Customer first name */ ?>
30 <p><?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); ?></p>
31
32 <?php if ( $order->needs_payment() ) { ?>
33 <p>
34 <?php
35 printf(
36 wp_kses(
37 /* translators: %1$s Site title, %2$s Order pay link */
38 __( 'An order has been created for you on %1$s. Your invoice is below, with a link to make payment when you’re ready: %2$s', 'woocommerce' ),
39 array(
40 'a' => array(
41 'href' => array(),
42 ),
43 )
44 ),
45 esc_html( get_bloginfo( 'name', 'display' ) ),
46 '<a href="' . esc_url( $order->get_checkout_payment_url() ) . '">' . esc_html__( 'Pay for this order', 'woocommerce' ) . '</a>'
47 );
48 ?>
49 </p>
50
51 <?php } else { ?>
52 <p>
53 <?php
54 /* translators: %s Order date */
55 printf( esc_html__( 'Here are the details of your order placed on %s:', 'woocommerce' ), esc_html( wc_format_datetime( $order->get_date_created() ) ) );
56 ?>
57 </p>
58 <?php
59 }
60
61 /**
62 * Hook for the woocommerce_email_order_details.
63 *
64 * @hooked WC_Emails::order_details() Shows the order details table.
65 * @hooked WC_Structured_Data::generate_order_data() Generates structured data.
66 * @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
67 * @since 2.5.0
68 */
69 do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
70
71 /**
72 * Hook for the woocommerce_email_order_meta.
73 *
74 * @hooked WC_Emails::order_meta() Shows order meta data.
75 */
76 do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
77
78 /**
79 * Hook for woocommerce_email_customer_details.
80 *
81 * @hooked WC_Emails::customer_details() Shows customer details
82 * @hooked WC_Emails::email_address() Shows email address
83 */
84 do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
85
86 /**
87 * Show user-defined additional content - this is set in each email's settings.
88 */
89 if ( $additional_content ) {
90 echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
91 }
92
93 /**
94 * Executes the email footer.
95 *
96 * @hooked WC_Emails::email_footer() Output the email footer
97 */
98 do_action( 'woocommerce_email_footer', $email );
1 <?php
2 /**
3 * Customer new account email
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-new-account.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 * @package WooCommerce\Templates\Emails
15 * @version 6.0.0
16 */
17
18 defined( 'ABSPATH' ) || exit;
19
20 do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
21
22 <?php /* translators: %s: Customer username */ ?>
23 <p><?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $user_login ) ); ?></p>
24 <?php /* translators: %1$s: Site title, %2$s: Username, %3$s: My account link */ ?>
25 <p><?php printf( esc_html__( 'Thank you for creating an account with the %1$s. Your username is %2$s. You can access your account area to view orders, change your password, bookmark resources, and more at: %3$s', 'woocommerce' ), esc_html( $blogname ), '<strong>' . esc_html( $user_login ) . '</strong>', make_clickable( esc_url( wc_get_page_permalink( 'myaccount' ) ) ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
26 <?php if ( 'yes' === get_option( 'woocommerce_registration_generate_password' ) && $password_generated && $set_password_url ) : ?>
27 <?php // If the password has not been set by the user during the sign up process, send them a link to set a new password ?>
28 <p><a href="<?php echo esc_attr( $set_password_url ); ?>"><?php printf( esc_html__( 'Click here to set your new password.', 'woocommerce' ) ); ?></a></p>
29 <?php endif; ?>
30
31 <?php
32 /**
33 * Show user-defined additional content - this is set in each email's settings.
34 */
35 if ( $additional_content ) {
36 echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
37 }
38
39 do_action( 'woocommerce_email_footer', $email );
1 <?php
2 /**
3 * Customer note email
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-note.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 * @package WooCommerce\Templates\Emails
15 * @version 3.7.0
16 */
17
18 if ( ! defined( 'ABSPATH' ) ) {
19 exit;
20 }
21
22 /*
23 * @hooked WC_Emails::email_header() Output the email header
24 */
25 do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
26
27 <?php /* translators: %s: Customer first name */ ?>
28 <p><?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); ?></p>
29 <p><?php esc_html_e( 'The following note has been added to your order:', 'woocommerce' ); ?></p>
30
31 <blockquote><?php echo wpautop( wptexturize( make_clickable( $customer_note ) ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></blockquote>
32
33 <p><?php esc_html_e( 'As a reminder, here are your order details:', 'woocommerce' ); ?></p>
34
35 <?php
36
37 /*
38 * @hooked WC_Emails::order_details() Shows the order details table.
39 * @hooked WC_Structured_Data::generate_order_data() Generates structured data.
40 * @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
41 * @since 2.5.0
42 */
43 do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
44
45 /*
46 * @hooked WC_Emails::order_meta() Shows order meta data.
47 */
48 do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
49
50 /*
51 * @hooked WC_Emails::customer_details() Shows customer details
52 * @hooked WC_Emails::email_address() Shows email address
53 */
54 do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
55
56 /**
57 * Show user-defined additional content - this is set in each email's settings.
58 */
59 if ( $additional_content ) {
60 echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
61 }
62
63 /*
64 * @hooked WC_Emails::email_footer() Output the email footer
65 */
66 do_action( 'woocommerce_email_footer', $email );
1 <?php
2 /**
3 * Customer on-hold order email
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-on-hold-order.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 * @package WooCommerce\Templates\Emails
15 * @version 7.3.0
16 */
17
18 defined( 'ABSPATH' ) || exit;
19
20 /*
21 * @hooked WC_Emails::email_header() Output the email header
22 */
23 do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
24
25 <?php /* translators: %s: Customer first name */ ?>
26 <p><?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); ?></p>
27 <p><?php esc_html_e( 'Thanks for your order. It’s on-hold until we confirm that payment has been received.', 'woocommerce' ); ?></p>
28
29 <?php
30
31 /*
32 * @hooked WC_Emails::order_details() Shows the order details table.
33 * @hooked WC_Structured_Data::generate_order_data() Generates structured data.
34 * @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
35 * @since 2.5.0
36 */
37 do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
38
39 /*
40 * @hooked WC_Emails::order_meta() Shows order meta data.
41 */
42 do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
43
44 /*
45 * @hooked WC_Emails::customer_details() Shows customer details
46 * @hooked WC_Emails::email_address() Shows email address
47 */
48 do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
49
50 /**
51 * Show user-defined additional content - this is set in each email's settings.
52 */
53 if ( $additional_content ) {
54 echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
55 }
56
57 /*
58 * @hooked WC_Emails::email_footer() Output the email footer
59 */
60 do_action( 'woocommerce_email_footer', $email );
1 <?php
2 /**
3 * Customer processing order email
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-processing-order.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 * @package WooCommerce\Templates\Emails
15 * @version 3.7.0
16 */
17
18 if ( ! defined( 'ABSPATH' ) ) {
19 exit;
20 }
21
22 /*
23 * @hooked WC_Emails::email_header() Output the email header
24 */
25 do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
26
27 <?php /* translators: %s: Customer first name */ ?>
28 <p><?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); ?></p>
29 <?php /* translators: %s: Order number */ ?>
30 <p><?php printf( esc_html__( 'Just to let you know &mdash; we\'ve received your order #%s, and it is now being processed:', 'woocommerce' ), esc_html( $order->get_order_number() ) ); ?></p>
31
32 <?php
33
34 /*
35 * @hooked WC_Emails::order_details() Shows the order details table.
36 * @hooked WC_Structured_Data::generate_order_data() Generates structured data.
37 * @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
38 * @since 2.5.0
39 */
40 do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
41
42 /*
43 * @hooked WC_Emails::order_meta() Shows order meta data.
44 */
45 do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
46
47 /*
48 * @hooked WC_Emails::customer_details() Shows customer details
49 * @hooked WC_Emails::email_address() Shows email address
50 */
51 do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
52
53 /**
54 * Show user-defined additional content - this is set in each email's settings.
55 */
56 if ( $additional_content ) {
57 echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
58 }
59
60 /*
61 * @hooked WC_Emails::email_footer() Output the email footer
62 */
63 do_action( 'woocommerce_email_footer', $email );
1 <?php
2 /**
3 * Customer refunded order email
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-refunded-order.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 * @package WooCommerce\Templates\Emails
15 * @version 3.7.0
16 */
17
18 defined( 'ABSPATH' ) || exit;
19
20 /*
21 * @hooked WC_Emails::email_header() Output the email header
22 */
23 do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
24
25 <?php /* translators: %s: Customer first name */ ?>
26 <p><?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); ?></p>
27
28 <p>
29 <?php
30 if ( $partial_refund ) {
31 /* translators: %s: Site title */
32 printf( esc_html__( 'Your order on %s has been partially refunded. There are more details below for your reference:', 'woocommerce' ), wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ) ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
33 } else {
34 /* translators: %s: Site title */
35 printf( esc_html__( 'Your order on %s has been refunded. There are more details below for your reference:', 'woocommerce' ), wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ) ); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
36 }
37 ?>
38 </p>
39 <?php
40
41 /*
42 * @hooked WC_Emails::order_details() Shows the order details table.
43 * @hooked WC_Structured_Data::generate_order_data() Generates structured data.
44 * @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
45 * @since 2.5.0
46 */
47 do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
48
49 /*
50 * @hooked WC_Emails::order_meta() Shows order meta data.
51 */
52 do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
53
54 /*
55 * @hooked WC_Emails::customer_details() Shows customer details
56 * @hooked WC_Emails::email_address() Shows email address
57 */
58 do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
59
60 /**
61 * Show user-defined additional content - this is set in each email's settings.
62 */
63 if ( $additional_content ) {
64 echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
65 }
66
67 /*
68 * @hooked WC_Emails::email_footer() Output the email footer
69 */
70 do_action( 'woocommerce_email_footer', $email );
1 <?php
2 /**
3 * Customer Reset Password email
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-reset-password.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 * @package WooCommerce\Templates\Emails
15 * @version 4.0.0
16 */
17
18 if ( ! defined( 'ABSPATH' ) ) {
19 exit; // Exit if accessed directly.
20 }
21
22 ?>
23
24 <?php do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
25
26 <?php /* translators: %s: Customer username */ ?>
27 <p><?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $user_login ) ); ?></p>
28 <?php /* translators: %s: Store name */ ?>
29 <p><?php printf( esc_html__( 'Someone has requested a new password for the following account on %s:', 'woocommerce' ), esc_html( wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ) ) ); ?></p>
30 <?php /* translators: %s: Customer username */ ?>
31 <p><?php printf( esc_html__( 'Username: %s', 'woocommerce' ), esc_html( $user_login ) ); ?></p>
32 <p><?php esc_html_e( 'If you didn\'t make this request, just ignore this email. If you\'d like to proceed:', 'woocommerce' ); ?></p>
33 <p>
34 <a class="link" href="<?php echo esc_url( add_query_arg( array( 'key' => $reset_key, 'id' => $user_id ), wc_get_endpoint_url( 'lost-password', '', wc_get_page_permalink( 'myaccount' ) ) ) ); ?>"><?php // phpcs:ignore ?>
35 <?php esc_html_e( 'Click here to reset your password', 'woocommerce' ); ?>
36 </a>
37 </p>
38
39 <?php
40 /**
41 * Show user-defined additional content - this is set in each email's settings.
42 */
43 if ( $additional_content ) {
44 echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
45 }
46
47 do_action( 'woocommerce_email_footer', $email );
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://docs.woocommerce.com/document/template-structure/
14 * @package WooCommerce\Templates\Emails
15 * @version 5.6.0
16 */
17
18 if ( ! defined( 'ABSPATH' ) ) {
19 exit;
20 }
21
22 $text_align = is_rtl() ? 'right' : 'left';
23 $address = $order->get_formatted_billing_address();
24 $shipping = $order->get_formatted_shipping_address();
25
26 ?><table id="addresses" cellspacing="0" cellpadding="0" style="width: 100%; vertical-align: top; margin-bottom: 40px; padding:0;" border="0">
27 <tr>
28 <td style="text-align:<?php echo esc_attr( $text_align ); ?>; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; border:0; padding:0;" valign="top" width="50%">
29 <h2><?php esc_html_e( 'Billing address', 'woocommerce' ); ?></h2>
30
31 <address class="address">
32 <?php echo wp_kses_post( $address ? $address : esc_html__( 'N/A', 'woocommerce' ) ); ?>
33 <?php if ( $order->get_billing_phone() ) : ?>
34 <br/><?php echo wc_make_phone_clickable( $order->get_billing_phone() ); ?>
35 <?php endif; ?>
36 <?php if ( $order->get_billing_email() ) : ?>
37 <br/><?php echo esc_html( $order->get_billing_email() ); ?>
38 <?php endif; ?>
39 </address>
40 </td>
41 <?php if ( ! wc_ship_to_billing_address_only() && $order->needs_shipping_address() && $shipping ) : ?>
42 <td style="text-align:<?php echo esc_attr( $text_align ); ?>; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; padding:0;" valign="top" width="50%">
43 <h2><?php esc_html_e( 'Shipping address', 'woocommerce' ); ?></h2>
44
45 <address class="address">
46 <?php echo wp_kses_post( $shipping ); ?>
47 <?php if ( $order->get_shipping_phone() ) : ?>
48 <br /><?php echo wc_make_phone_clickable( $order->get_shipping_phone() ); ?>
49 <?php endif; ?>
50 </address>
51 </td>
52 <?php endif; ?>
53 </tr>
54 </table>
1 <?php
2 /**
3 * Additional Customer Details
4 *
5 * This is extra customer data which can be filtered by plugins. It outputs below the order item table.
6 *
7 * This template can be overridden by copying it to yourtheme/woocommerce/emails/email-customer-details.php.
8 *
9 * HOWEVER, on occasion WooCommerce will need to update template files and you
10 * (the theme developer) will need to copy the new files to your theme to
11 * maintain compatibility. We try to do this as little as possible, but it does
12 * happen. When this occurs the version of the template file will be bumped and
13 * the readme will list any important changes.
14 *
15 * @see https://docs.woocommerce.com/document/template-structure/
16 * @package WooCommerce\Templates\Emails
17 * @version 2.5.0
18 */
19
20 defined( 'ABSPATH' ) || exit;
21 ?>
22 <?php if ( ! empty( $fields ) ) : ?>
23 <div style="font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; margin-bottom: 40px;">
24 <h2><?php esc_html_e( 'Customer details', 'woocommerce' ); ?></h2>
25 <ul>
26 <?php foreach ( $fields as $field ) : ?>
27 <li><strong><?php echo wp_kses_post( $field['label'] ); ?>:</strong> <span class="text"><?php echo wp_kses_post( $field['value'] ); ?></span></li>
28 <?php endforeach; ?>
29 </ul>
30 </div>
31 <?php endif; ?>
1 <?php
2 /**
3 * Email Downloads.
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/emails/email-downloads.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 * @package WooCommerce\Templates
15 * @version 3.4.0
16 */
17
18 defined( 'ABSPATH' ) || exit;
19
20 $text_align = is_rtl() ? 'right' : 'left';
21
22 ?><h2 class="woocommerce-order-downloads__title"><?php esc_html_e( 'Downloads', 'woocommerce' ); ?></h2>
23
24 <table class="td" cellspacing="0" cellpadding="6" style="width: 100%; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; margin-bottom: 40px;" border="1">
25 <thead>
26 <tr>
27 <?php foreach ( $columns as $column_id => $column_name ) : ?>
28 <th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php echo esc_html( $column_name ); ?></th>
29 <?php endforeach; ?>
30 </tr>
31 </thead>
32
33 <?php foreach ( $downloads as $download ) : ?>
34 <tr>
35 <?php foreach ( $columns as $column_id => $column_name ) : ?>
36 <td class="td" style="text-align:<?php echo esc_attr( $text_align ); ?>;">
37 <?php
38 if ( has_action( 'woocommerce_email_downloads_column_' . $column_id ) ) {
39 do_action( 'woocommerce_email_downloads_column_' . $column_id, $download, $plain_text );
40 } else {
41 switch ( $column_id ) {
42 case 'download-product':
43 ?>
44 <a href="<?php echo esc_url( get_permalink( $download['product_id'] ) ); ?>"><?php echo wp_kses_post( $download['product_name'] ); ?></a>
45 <?php
46 break;
47 case 'download-file':
48 ?>
49 <a href="<?php echo esc_url( $download['download_url'] ); ?>" class="woocommerce-MyAccount-downloads-file button alt"><?php echo esc_html( $download['download_name'] ); ?></a>
50 <?php
51 break;
52 case 'download-expires':
53 if ( ! empty( $download['access_expires'] ) ) {
54 ?>
55 <time datetime="<?php echo esc_attr( date( 'Y-m-d', strtotime( $download['access_expires'] ) ) ); ?>" title="<?php echo esc_attr( strtotime( $download['access_expires'] ) ); ?>"><?php echo esc_html( date_i18n( get_option( 'date_format' ), strtotime( $download['access_expires'] ) ) ); ?></time>
56 <?php
57 } else {
58 esc_html_e( 'Never', 'woocommerce' );
59 }
60 break;
61 }
62 }
63 ?>
64 </td>
65 <?php endforeach; ?>
66 </tr>
67 <?php endforeach; ?>
68 </table>
1 <?php
2 /**
3 * Email Footer
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/emails/email-footer.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 * @package WooCommerce\Templates\Emails
15 * @version 3.7.0
16 */
17
18 defined( 'ABSPATH' ) || exit;
19 ?>
20 </div>
21 </td>
22 </tr>
23 </table>
24 <!-- End Content -->
25 </td>
26 </tr>
27 </table>
28 <!-- End Body -->
29 </td>
30 </tr>
31 </table>
32 </td>
33 </tr>
34 <tr>
35 <td align="center" valign="top">
36 <!-- Footer -->
37 <table border="0" cellpadding="10" cellspacing="0" width="600" id="template_footer">
38 <tr>
39 <td valign="top">
40 <table border="0" cellpadding="10" cellspacing="0" width="100%">
41 <tr>
42 <td colspan="2" valign="middle" id="credit">
43 <?php echo wp_kses_post( wpautop( wptexturize( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) ) ) ); ?>
44 </td>
45 </tr>
46 </table>
47 </td>
48 </tr>
49 </table>
50 <!-- End Footer -->
51 </td>
52 </tr>
53 </table>
54 </div>
55 </body>
56 </html>
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 * @package WooCommerce\Templates\Emails
15 * @version 4.0.0
16 */
17
18 if ( ! defined( 'ABSPATH' ) ) {
19 exit; // Exit if accessed directly
20 }
21
22 ?>
23 <!DOCTYPE html>
24 <html <?php language_attributes(); ?>>
25 <head>
26 <meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo( 'charset' ); ?>" />
27 <title><?php echo get_bloginfo( 'name', 'display' ); ?></title>
28 </head>
29 <body <?php echo is_rtl() ? 'rightmargin' : 'leftmargin'; ?>="0" marginwidth="0" topmargin="0" marginheight="0" offset="0">
30 <div id="wrapper" dir="<?php echo is_rtl() ? 'rtl' : 'ltr'; ?>">
31 <table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%">
32 <tr>
33 <td align="center" valign="top">
34 <div id="template_header_image">
35 <?php
36 if ( $img = get_option( 'woocommerce_email_header_image' ) ) {
37 echo '<p style="margin-top:0;"><img src="' . esc_url( $img ) . '" alt="' . get_bloginfo( 'name', 'display' ) . '" /></p>';
38 }
39 ?>
40 </div>
41 <table border="0" cellpadding="0" cellspacing="0" width="600" id="template_container">
42 <tr>
43 <td align="center" valign="top">
44 <!-- Header -->
45 <table border="0" cellpadding="0" cellspacing="0" width="100%" id="template_header">
46 <tr>
47 <td id="header_wrapper">
48 <h1><?php echo $email_heading; ?></h1>
49 </td>
50 </tr>
51 </table>
52 <!-- End Header -->
53 </td>
54 </tr>
55 <tr>
56 <td align="center" valign="top">
57 <!-- Body -->
58 <table border="0" cellpadding="0" cellspacing="0" width="600" id="template_body">
59 <tr>
60 <td valign="top" id="body_content">
61 <!-- Content -->
62 <table border="0" cellpadding="20" cellspacing="0" width="100%">
63 <tr>
64 <td valign="top">
65 <div id="body_content_inner">
1 <?php
2 /**
3 * Email mobile messaging
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/emails/email-mobile-messaging.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 * @package WooCommerce\Templates\Emails
15 * @version 7.0
16 */
17
18 use Automattic\WooCommerce\Internal\Orders\MobileMessagingHandler;
19
20 echo wp_kses_post( MobileMessagingHandler::prepare_mobile_message( $order, $blog_id, $now, $domain ) );
1 <?php
2 /**
3 * Order details table shown in emails.
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/emails/email-order-details.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 * @package WooCommerce\Templates\Emails
15 * @version 3.7.0
16 */
17
18 defined( 'ABSPATH' ) || exit;
19
20 $text_align = is_rtl() ? 'right' : 'left';
21
22 do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email ); ?>
23
24 <h2>
25 <?php
26 if ( $sent_to_admin ) {
27 $before = '<a class="link" href="' . esc_url( $order->get_edit_order_url() ) . '">';
28 $after = '</a>';
29 } else {
30 $before = '';
31 $after = '';
32 }
33 /* translators: %s: Order ID. */
34 echo wp_kses_post( $before . sprintf( __( '[Order #%s]', 'woocommerce' ) . $after . ' (<time datetime="%s">%s</time>)', $order->get_order_number(), $order->get_date_created()->format( 'c' ), wc_format_datetime( $order->get_date_created() ) ) );
35 ?>
36 </h2>
37
38 <div style="margin-bottom: 40px;">
39 <table class="td" cellspacing="0" cellpadding="6" style="width: 100%; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;" border="1">
40 <thead>
41 <tr>
42 <th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php esc_html_e( 'Product', 'woocommerce' ); ?></th>
43 <th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php esc_html_e( 'Quantity', 'woocommerce' ); ?></th>
44 <th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php esc_html_e( 'Price', 'woocommerce' ); ?></th>
45 </tr>
46 </thead>
47 <tbody>
48 <?php
49 echo wc_get_email_order_items( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
50 $order,
51 array(
52 'show_sku' => $sent_to_admin,
53 'show_image' => false,
54 'image_size' => array( 32, 32 ),
55 'plain_text' => $plain_text,
56 'sent_to_admin' => $sent_to_admin,
57 )
58 );
59 ?>
60 </tbody>
61 <tfoot>
62 <?php
63 $item_totals = $order->get_order_item_totals();
64
65 if ( $item_totals ) {
66 $i = 0;
67 foreach ( $item_totals as $total ) {
68 $i++;
69 ?>
70 <tr>
71 <th class="td" scope="row" colspan="2" style="text-align:<?php echo esc_attr( $text_align ); ?>; <?php echo ( 1 === $i ) ? 'border-top-width: 4px;' : ''; ?>"><?php echo wp_kses_post( $total['label'] ); ?></th>
72 <td class="td" style="text-align:<?php echo esc_attr( $text_align ); ?>; <?php echo ( 1 === $i ) ? 'border-top-width: 4px;' : ''; ?>"><?php echo wp_kses_post( $total['value'] ); ?></td>
73 </tr>
74 <?php
75 }
76 }
77 if ( $order->get_customer_note() ) {
78 ?>
79 <tr>
80 <th class="td" scope="row" colspan="2" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php esc_html_e( 'Note:', 'woocommerce' ); ?></th>
81 <td class="td" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php echo wp_kses_post( nl2br( wptexturize( $order->get_customer_note() ) ) ); ?></td>
82 </tr>
83 <?php
84 }
85 ?>
86 </tfoot>
87 </table>
88 </div>
89
90 <?php do_action( 'woocommerce_email_after_order_table', $order, $sent_to_admin, $plain_text, $email ); ?>
1 <?php
2 /**
3 * Email Order Items
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/emails/email-order-items.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 * @package WooCommerce\Templates\Emails
15 * @version 3.7.0
16 */
17
18 defined( 'ABSPATH' ) || exit;
19
20 $text_align = is_rtl() ? 'right' : 'left';
21 $margin_side = is_rtl() ? 'left' : 'right';
22
23 foreach ( $items as $item_id => $item ) :
24 $product = $item->get_product();
25 $sku = '';
26 $purchase_note = '';
27 $image = '';
28
29 if ( ! apply_filters( 'woocommerce_order_item_visible', true, $item ) ) {
30 continue;
31 }
32
33 if ( is_object( $product ) ) {
34 $sku = $product->get_sku();
35 $purchase_note = $product->get_purchase_note();
36 $image = $product->get_image( $image_size );
37 }
38
39 ?>
40 <tr class="<?php echo esc_attr( apply_filters( 'woocommerce_order_item_class', 'order_item', $item, $order ) ); ?>">
41 <td class="td" style="text-align:<?php echo esc_attr( $text_align ); ?>; vertical-align: middle; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; word-wrap:break-word;">
42 <?php
43
44 // Show title/image etc.
45 if ( $show_image ) {
46 echo wp_kses_post( apply_filters( 'woocommerce_order_item_thumbnail', $image, $item ) );
47 }
48
49 // Product name.
50 echo wp_kses_post( apply_filters( 'woocommerce_order_item_name', $item->get_name(), $item, false ) );
51
52 // SKU.
53 if ( $show_sku && $sku ) {
54 echo wp_kses_post( ' (#' . $sku . ')' );
55 }
56
57 // allow other plugins to add additional product information here.
58 do_action( 'woocommerce_order_item_meta_start', $item_id, $item, $order, $plain_text );
59
60 wc_display_item_meta(
61 $item,
62 array(
63 'label_before' => '<strong class="wc-item-meta-label" style="float: ' . esc_attr( $text_align ) . '; margin-' . esc_attr( $margin_side ) . ': .25em; clear: both">',
64 )
65 );
66
67 // allow other plugins to add additional product information here.
68 do_action( 'woocommerce_order_item_meta_end', $item_id, $item, $order, $plain_text );
69
70 ?>
71 </td>
72 <td class="td" style="text-align:<?php echo esc_attr( $text_align ); ?>; vertical-align:middle; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;">
73 <?php
74 $qty = $item->get_quantity();
75 $refunded_qty = $order->get_qty_refunded_for_item( $item_id );
76
77 if ( $refunded_qty ) {
78 $qty_display = '<del>' . esc_html( $qty ) . '</del> <ins>' . esc_html( $qty - ( $refunded_qty * -1 ) ) . '</ins>';
79 } else {
80 $qty_display = esc_html( $qty );
81 }
82 echo wp_kses_post( apply_filters( 'woocommerce_email_order_item_quantity', $qty_display, $item ) );
83 ?>
84 </td>
85 <td class="td" style="text-align:<?php echo esc_attr( $text_align ); ?>; vertical-align:middle; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;">
86 <?php echo wp_kses_post( $order->get_formatted_line_subtotal( $item ) ); ?>
87 </td>
88 </tr>
89 <?php
90
91 if ( $show_purchase_note && $purchase_note ) {
92 ?>
93 <tr>
94 <td colspan="3" style="text-align:<?php echo esc_attr( $text_align ); ?>; vertical-align:middle; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;">
95 <?php
96 echo wp_kses_post( wpautop( do_shortcode( $purchase_note ) ) );
97 ?>
98 </td>
99 </tr>
100 <?php
101 }
102 ?>
103
104 <?php endforeach; ?>
1 <?php
2 /**
3 * Email Styles
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/emails/email-styles.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 * @package WooCommerce\Templates\Emails
15 * @version 4.0.0
16 */
17
18 if ( ! defined( 'ABSPATH' ) ) {
19 exit;
20 }
21
22 // Load colors.
23 $bg = get_option( 'woocommerce_email_background_color' );
24 $body = get_option( 'woocommerce_email_body_background_color' );
25 $base = get_option( 'woocommerce_email_base_color' );
26 $base_text = wc_light_or_dark( $base, '#202020', '#ffffff' );
27 $text = get_option( 'woocommerce_email_text_color' );
28
29 // Pick a contrasting color for links.
30 $link_color = wc_hex_is_light( $base ) ? $base : $base_text;
31
32 if ( wc_hex_is_light( $body ) ) {
33 $link_color = wc_hex_is_light( $base ) ? $base_text : $base;
34 }
35
36 $bg_darker_10 = wc_hex_darker( $bg, 10 );
37 $body_darker_10 = wc_hex_darker( $body, 10 );
38 $base_lighter_20 = wc_hex_lighter( $base, 20 );
39 $base_lighter_40 = wc_hex_lighter( $base, 40 );
40 $text_lighter_20 = wc_hex_lighter( $text, 20 );
41 $text_lighter_40 = wc_hex_lighter( $text, 40 );
42
43 // !important; is a gmail hack to prevent styles being stripped if it doesn't like something.
44 // body{padding: 0;} ensures proper scale/positioning of the email in the iOS native email app.
45 ?>
46 body {
47 padding: 0;
48 }
49
50 #wrapper {
51 background-color: <?php echo esc_attr( $bg ); ?>;
52 margin: 0;
53 padding: 70px 0;
54 -webkit-text-size-adjust: none !important;
55 width: 100%;
56 }
57
58 #template_container {
59 box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1) !important;
60 background-color: <?php echo esc_attr( $body ); ?>;
61 border: 1px solid <?php echo esc_attr( $bg_darker_10 ); ?>;
62 border-radius: 3px !important;
63 }
64
65 #template_header {
66 background-color: <?php echo esc_attr( $base ); ?>;
67 border-radius: 3px 3px 0 0 !important;
68 color: <?php echo esc_attr( $base_text ); ?>;
69 border-bottom: 0;
70 font-weight: bold;
71 line-height: 100%;
72 vertical-align: middle;
73 font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
74 }
75
76 #template_header h1,
77 #template_header h1 a {
78 color: <?php echo esc_attr( $base_text ); ?>;
79 background-color: inherit;
80 }
81
82 #template_header_image img {
83 margin-left: 0;
84 margin-right: 0;
85 }
86
87 #template_footer td {
88 padding: 0;
89 border-radius: 6px;
90 }
91
92 #template_footer #credit {
93 border: 0;
94 color: <?php echo esc_attr( $text_lighter_40 ); ?>;
95 font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
96 font-size: 12px;
97 line-height: 150%;
98 text-align: center;
99 padding: 24px 0;
100 }
101
102 #template_footer #credit p {
103 margin: 0 0 16px;
104 }
105
106 #body_content {
107 background-color: <?php echo esc_attr( $body ); ?>;
108 }
109
110 #body_content table td {
111 padding: 48px 48px 32px;
112 }
113
114 #body_content table td td {
115 padding: 12px;
116 }
117
118 #body_content table td th {
119 padding: 12px;
120 }
121
122 #body_content td ul.wc-item-meta {
123 font-size: small;
124 margin: 1em 0 0;
125 padding: 0;
126 list-style: none;
127 }
128
129 #body_content td ul.wc-item-meta li {
130 margin: 0.5em 0 0;
131 padding: 0;
132 }
133
134 #body_content td ul.wc-item-meta li p {
135 margin: 0;
136 }
137
138 #body_content p {
139 margin: 0 0 16px;
140 }
141
142 #body_content_inner {
143 color: <?php echo esc_attr( $text_lighter_20 ); ?>;
144 font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
145 font-size: 14px;
146 line-height: 150%;
147 text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>;
148 }
149
150 .td {
151 color: <?php echo esc_attr( $text_lighter_20 ); ?>;
152 border: 1px solid <?php echo esc_attr( $body_darker_10 ); ?>;
153 vertical-align: middle;
154 }
155
156 .address {
157 padding: 12px;
158 color: <?php echo esc_attr( $text_lighter_20 ); ?>;
159 border: 1px solid <?php echo esc_attr( $body_darker_10 ); ?>;
160 }
161
162 .text {
163 color: <?php echo esc_attr( $text ); ?>;
164 font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
165 }
166
167 .link {
168 color: <?php echo esc_attr( $link_color ); ?>;
169 }
170
171 #header_wrapper {
172 padding: 36px 48px;
173 display: block;
174 }
175
176 h1 {
177 color: <?php echo esc_attr( $base ); ?>;
178 font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
179 font-size: 30px;
180 font-weight: 300;
181 line-height: 150%;
182 margin: 0;
183 text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>;
184 text-shadow: 0 1px 0 <?php echo esc_attr( $base_lighter_20 ); ?>;
185 }
186
187 h2 {
188 color: <?php echo esc_attr( $base ); ?>;
189 display: block;
190 font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
191 font-size: 18px;
192 font-weight: bold;
193 line-height: 130%;
194 margin: 0 0 18px;
195 text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>;
196 }
197
198 h3 {
199 color: <?php echo esc_attr( $base ); ?>;
200 display: block;
201 font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
202 font-size: 16px;
203 font-weight: bold;
204 line-height: 130%;
205 margin: 16px 0 8px;
206 text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>;
207 }
208
209 a {
210 color: <?php echo esc_attr( $link_color ); ?>;
211 font-weight: normal;
212 text-decoration: underline;
213 }
214
215 img {
216 border: none;
217 display: inline-block;
218 font-size: 14px;
219 font-weight: bold;
220 height: auto;
221 outline: none;
222 text-decoration: none;
223 text-transform: capitalize;
224 vertical-align: middle;
225 margin-<?php echo is_rtl() ? 'left' : 'right'; ?>: 10px;
226 max-width: 100%;
227 }
228 <?php
1 <?php
2 /**
3 * Admin cancelled order email (plain text)
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/admin-cancelled-order.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 * @package WooCommerce\Templates\Emails\Plain
15 * @version 4.1.0
16 */
17
18 defined( 'ABSPATH' ) || exit;
19
20 echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
21 echo esc_html( wp_strip_all_tags( $email_heading ) );
22 echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
23
24 /* translators: %1$s: Order number. %2$s: Customer full name */
25 echo sprintf( esc_html__( 'Notification to let you know &mdash; order #%1$s belonging to %2$s has been cancelled:', 'woocommerce' ), esc_html( $order->get_order_number() ), esc_html( $order->get_formatted_billing_full_name() ) ) . "\n\n";
26
27 /*
28 * @hooked WC_Emails::order_details() Shows the order details table.
29 * @hooked WC_Structured_Data::generate_order_data() Generates structured data.
30 * @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
31 * @since 2.5.0
32 */
33 do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
34
35 echo "\n----------------------------------------\n\n";
36
37 /*
38 * @hooked WC_Emails::order_meta() Shows order meta data.
39 */
40 do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
41
42 /*
43 * @hooked WC_Emails::customer_details() Shows customer details
44 * @hooked WC_Emails::email_address() Shows email address
45 */
46 do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
47
48 echo "\n\n----------------------------------------\n\n";
49
50 /**
51 * Show user-defined additional content - this is set in each email's settings.
52 */
53 if ( $additional_content ) {
54 echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
55 echo "\n\n----------------------------------------\n\n";
56 }
57
58 echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );
1 <?php
2 /**
3 * Admin failed order email (plain text)
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/admin-failed-order.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 * @package WooCommerce\Templates\Emails\Plain
15 * @version 3.7.0
16 */
17
18 defined( 'ABSPATH' ) || exit;
19
20 echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
21 echo esc_html( wp_strip_all_tags( $email_heading ) );
22 echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
23
24 /* translators: %1$s: Order number. %2$s: Customer full name. */
25 echo sprintf( esc_html__( 'Payment for order #%1$s from %2$s has failed. The order was as follows:', 'woocommerce' ), esc_html( $order->get_order_number() ), esc_html( $order->get_formatted_billing_full_name() ) ) . "\n\n";
26
27 /*
28 * @hooked WC_Emails::order_details() Shows the order details table.
29 * @hooked WC_Structured_Data::generate_order_data() Generates structured data.
30 * @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
31 * @since 2.5.0
32 */
33 do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
34
35 echo "\n----------------------------------------\n\n";
36
37 /*
38 * @hooked WC_Emails::order_meta() Shows order meta data.
39 */
40 do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
41
42 /*
43 * @hooked WC_Emails::customer_details() Shows customer details
44 * @hooked WC_Emails::email_address() Shows email address
45 */
46 do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
47
48 echo "\n\n----------------------------------------\n\n";
49
50 /**
51 * Show user-defined additional content - this is set in each email's settings.
52 */
53 if ( $additional_content ) {
54 echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
55 echo "\n\n----------------------------------------\n\n";
56 }
57
58 echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );
1 <?php
2 /**
3 * Admin new order email (plain text)
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/admin-new-order.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 * @package WooCommerce\Templates\Emails\Plain
15 * @version 3.7.0
16 */
17
18 defined( 'ABSPATH' ) || exit;
19
20 echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
21 echo esc_html( wp_strip_all_tags( $email_heading ) );
22 echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
23
24 /* translators: %s: Customer billing full name */
25 echo sprintf( esc_html__( 'You’ve received the following order from %s:', 'woocommerce' ), esc_html( $order->get_formatted_billing_full_name() ) ) . "\n\n";
26
27 /*
28 * @hooked WC_Emails::order_details() Shows the order details table.
29 * @hooked WC_Structured_Data::generate_order_data() Generates structured data.
30 * @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
31 * @since 2.5.0
32 */
33 do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
34
35 echo "\n----------------------------------------\n\n";
36
37 /*
38 * @hooked WC_Emails::order_meta() Shows order meta data.
39 */
40 do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
41
42 /*
43 * @hooked WC_Emails::customer_details() Shows customer details
44 * @hooked WC_Emails::email_address() Shows email address
45 */
46 do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
47
48 echo "\n\n----------------------------------------\n\n";
49
50 /**
51 * Show user-defined additional content - this is set in each email's settings.
52 */
53 if ( $additional_content ) {
54 echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
55 echo "\n\n----------------------------------------\n\n";
56 }
57
58 echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );
1 <?php
2 /**
3 * Customer completed order email (plain text)
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/customer-completed-order.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 * @package WooCommerce\Templates\Emails\Plain
15 * @version 3.7.0
16 */
17
18 defined( 'ABSPATH' ) || exit;
19
20 echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
21 echo esc_html( wp_strip_all_tags( $email_heading ) );
22 echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
23
24 /* translators: %s: Customer first name */
25 echo sprintf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ) . "\n\n";
26 /* translators: %s: Site title */
27 echo esc_html__( 'We have finished processing your order.', 'woocommerce' ) . "\n\n";
28
29 /*
30 * @hooked WC_Emails::order_details() Shows the order details table.
31 * @hooked WC_Structured_Data::generate_order_data() Generates structured data.
32 * @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
33 * @since 2.5.0
34 */
35 do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
36
37 echo "\n----------------------------------------\n\n";
38
39 /*
40 * @hooked WC_Emails::order_meta() Shows order meta data.
41 */
42 do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
43
44 /*
45 * @hooked WC_Emails::customer_details() Shows customer details
46 * @hooked WC_Emails::email_address() Shows email address
47 */
48 do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
49
50 echo "\n\n----------------------------------------\n\n";
51
52 /**
53 * Show user-defined additional content - this is set in each email's settings.
54 */
55 if ( $additional_content ) {
56 echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
57 echo "\n\n----------------------------------------\n\n";
58 }
59
60 echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );
1 <?php
2 /**
3 * Customer invoice email (plain text)
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/customer-invoice.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 * @package WooCommerce\Templates\Emails\Plain
15 * @version 3.7.0
16 */
17
18 defined( 'ABSPATH' ) || exit;
19
20 echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
21 echo esc_html( wp_strip_all_tags( $email_heading ) );
22 echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
23
24 /* translators: %s: Customer first name */
25 echo sprintf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ) . "\n\n";
26
27 if ( $order->has_status( 'pending' ) ) {
28 echo wp_kses_post(
29 sprintf(
30 /* translators: %1$s: Site title, %2$s: Order pay link */
31 __( 'An order has been created for you on %1$s. Your invoice is below, with a link to make payment when you’re ready: %2$s', 'woocommerce' ),
32 esc_html( get_bloginfo( 'name', 'display' ) ),
33 esc_url( $order->get_checkout_payment_url() )
34 )
35 ) . "\n\n";
36
37 } else {
38 /* translators: %s: Order date */
39 echo sprintf( esc_html__( 'Here are the details of your order placed on %s:', 'woocommerce' ), esc_html( wc_format_datetime( $order->get_date_created() ) ) ) . "\n\n";
40 }
41
42 /**
43 * Hook for the woocommerce_email_order_details.
44 *
45 * @hooked WC_Emails::order_details() Shows the order details table.
46 * @hooked WC_Structured_Data::generate_order_data() Generates structured data.
47 * @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
48 * @since 2.5.0
49 */
50 do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
51
52 echo "\n----------------------------------------\n\n";
53
54 /**
55 * Hook for the woocommerce_email_order_meta.
56 *
57 * @hooked WC_Emails::order_meta() Shows order meta data.
58 */
59 do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
60
61 /**
62 * Hook for woocommerce_email_customer_details
63 *
64 * @hooked WC_Emails::customer_details() Shows customer details
65 * @hooked WC_Emails::email_address() Shows email address
66 */
67 do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
68
69 echo "\n\n----------------------------------------\n\n";
70
71 /**
72 * Show user-defined additional content - this is set in each email's settings.
73 */
74 if ( $additional_content ) {
75 echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
76 echo "\n\n----------------------------------------\n\n";
77 }
78
79 echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );
1 <?php
2 /**
3 * Customer new account email
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/customer-new-account.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 * @package WooCommerce\Templates\Emails\Plain
15 * @version 6.0.0
16 */
17
18 defined( 'ABSPATH' ) || exit;
19
20 echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
21 echo esc_html( wp_strip_all_tags( $email_heading ) );
22 echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
23
24 /* translators: %s: Customer username */
25 echo sprintf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $user_login ) ) . "\n\n";
26 /* translators: %1$s: Site title, %2$s: Username, %3$s: My account link */
27 echo sprintf( esc_html__( 'Thanks for creating an account on %1$s. Your username is %2$s. You can access your account area to view orders, change your password, and more at: %3$s', 'woocommerce' ), esc_html( $blogname ), esc_html( $user_login ), esc_html( wc_get_page_permalink( 'myaccount' ) ) ) . "\n\n";
28
29 // Only send the set new password link if the user hasn't set their password during sign-up.
30 if ( 'yes' === get_option( 'woocommerce_registration_generate_password' ) && $password_generated && $set_password_url ) {
31 /* translators: URL follows */
32 echo esc_html__( 'To set your password, visit the following address: ', 'woocommerce' ) . "\n\n";
33 echo esc_html( $set_password_url ) . "\n\n";
34 }
35
36 echo "\n\n----------------------------------------\n\n";
37
38 /**
39 * Show user-defined additional content - this is set in each email's settings.
40 */
41 if ( $additional_content ) {
42 echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
43 echo "\n\n----------------------------------------\n\n";
44 }
45
46 echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );
1 <?php
2 /**
3 * Customer note email
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/customer-note.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 * @package WooCommerce\Templates\Emails\Plain
15 * @version 3.7.0
16 */
17
18 defined( 'ABSPATH' ) || exit;
19
20 echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
21 echo esc_html( wp_strip_all_tags( $email_heading ) );
22 echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
23
24 /* translators: %s: Customer first name */
25 echo sprintf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ) . "\n\n";
26 echo esc_html__( 'The following note has been added to your order:', 'woocommerce' ) . "\n\n";
27
28 echo "----------\n\n";
29
30 echo wptexturize( $customer_note ) . "\n\n"; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
31
32 echo "----------\n\n";
33
34 echo esc_html__( 'As a reminder, here are your order details:', 'woocommerce' ) . "\n\n";
35
36 /*
37 * @hooked WC_Emails::order_details() Shows the order details table.
38 * @hooked WC_Structured_Data::generate_order_data() Generates structured data.
39 * @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
40 * @since 2.5.0
41 */
42 do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
43
44 echo "\n----------------------------------------\n\n";
45
46 /*
47 * @hooked WC_Emails::order_meta() Shows order meta data.
48 */
49 do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
50
51 /*
52 * @hooked WC_Emails::customer_details() Shows customer details
53 * @hooked WC_Emails::email_address() Shows email address
54 */
55 do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
56
57 echo "\n\n----------------------------------------\n\n";
58
59 /**
60 * Show user-defined additional content - this is set in each email's settings.
61 */
62 if ( $additional_content ) {
63 echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
64 echo "\n\n----------------------------------------\n\n";
65 }
66
67 echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );
1 <?php
2 /**
3 * Customer on-hold order email
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/customer-on-hold-order.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 * @package WooCommerce\Templates\Emails\Plain
15 * @version 7.3.0
16 */
17
18 defined( 'ABSPATH' ) || exit;
19
20 echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
21 echo esc_html( wp_strip_all_tags( $email_heading ) );
22 echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
23
24 /* translators: %s: Customer first name */
25 echo sprintf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ) . "\n\n";
26 echo esc_html__( 'Thanks for your order. It’s on-hold until we confirm that payment has been received.', 'woocommerce' ) . "\n\n";
27
28 /*
29 * @hooked WC_Emails::order_details() Shows the order details table.
30 * @hooked WC_Structured_Data::generate_order_data() Generates structured data.
31 * @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
32 * @since 2.5.0
33 */
34 do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
35
36 echo "\n----------------------------------------\n\n";
37
38 /*
39 * @hooked WC_Emails::order_meta() Shows order meta data.
40 */
41 do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
42
43 /*
44 * @hooked WC_Emails::customer_details() Shows customer details
45 * @hooked WC_Emails::email_address() Shows email address
46 */
47 do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
48
49 echo "\n\n----------------------------------------\n\n";
50
51 /**
52 * Show user-defined additional content - this is set in each email's settings.
53 */
54 if ( $additional_content ) {
55 echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
56 echo "\n\n----------------------------------------\n\n";
57 }
58
59 echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );
1 <?php
2 /**
3 * Customer processing order email
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/customer-processing-order.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 * @package WooCommerce\Templates\Emails\Plain
15 * @version 3.7.0
16 */
17
18 defined( 'ABSPATH' ) || exit;
19
20 echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
21 echo esc_html( wp_strip_all_tags( $email_heading ) );
22 echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
23
24 /* translators: %s: Customer first name */
25 echo sprintf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ) . "\n\n";
26 /* translators: %s: Order number */
27 echo sprintf( esc_html__( 'Just to let you know &mdash; we\'ve received your order #%s, and it is now being processed:', 'woocommerce' ), esc_html( $order->get_order_number() ) ) . "\n\n";
28
29 /*
30 * @hooked WC_Emails::order_details() Shows the order details table.
31 * @hooked WC_Structured_Data::generate_order_data() Generates structured data.
32 * @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
33 * @since 2.5.0
34 */
35 do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
36
37 echo "\n----------------------------------------\n\n";
38
39 /*
40 * @hooked WC_Emails::order_meta() Shows order meta data.
41 */
42 do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
43
44 /*
45 * @hooked WC_Emails::customer_details() Shows customer details
46 * @hooked WC_Emails::email_address() Shows email address
47 */
48 do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
49
50 echo "\n\n----------------------------------------\n\n";
51
52 /**
53 * Show user-defined additional content - this is set in each email's settings.
54 */
55 if ( $additional_content ) {
56 echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
57 echo "\n\n----------------------------------------\n\n";
58 }
59
60 echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );
1 <?php
2 /**
3 * Customer refunded order email (plain text)
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/customer-refunded-order.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 * @package WooCommerce\Templates\Emails\Plain
15 * @version 3.7.0
16 */
17
18 defined( 'ABSPATH' ) || exit;
19
20 echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
21 echo esc_html( wp_strip_all_tags( $email_heading ) );
22 echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
23
24 /* translators: %s: Customer first name */
25 echo sprintf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ) . "\n\n";
26 if ( $partial_refund ) {
27 /* translators: %s: Site title */
28 echo sprintf( esc_html__( 'Your order on %s has been partially refunded. There are more details below for your reference:', 'woocommerce' ), wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ) ) . "\n\n"; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
29 } else {
30 /* translators: %s: Site title */
31 echo sprintf( esc_html__( 'Your order on %s has been refunded. There are more details below for your reference:', 'woocommerce' ), wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ) ) . "\n\n"; // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
32 }
33
34 /*
35 * @hooked WC_Emails::order_details() Shows the order details table.
36 * @hooked WC_Structured_Data::generate_order_data() Generates structured data.
37 * @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
38 * @since 2.5.0
39 */
40 do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
41
42 echo "\n----------------------------------------\n\n";
43
44 /*
45 * @hooked WC_Emails::order_meta() Shows order meta data.
46 */
47 do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
48
49 /*
50 * @hooked WC_Emails::customer_details() Shows customer details
51 * @hooked WC_Emails::email_address() Shows email address
52 */
53 do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
54
55 echo "\n\n----------------------------------------\n\n";
56
57 /**
58 * Show user-defined additional content - this is set in each email's settings.
59 */
60 if ( $additional_content ) {
61 echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
62 echo "\n\n----------------------------------------\n\n";
63 }
64
65 echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );
1 <?php
2 /**
3 * Customer Reset Password email
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/customer-reset-password.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 * @package WooCommerce\Templates\Emails\Plain
15 * @version 3.7.0
16 */
17
18 defined( 'ABSPATH' ) || exit;
19
20 echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
21 echo esc_html( wp_strip_all_tags( $email_heading ) );
22 echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
23
24 /* translators: %s: Customer username */
25 echo sprintf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $user_login ) ) . "\n\n";
26 /* translators: %s: Store name */
27 echo sprintf( esc_html__( 'Someone has requested a new password for the following account on %s:', 'woocommerce' ), esc_html( wp_specialchars_decode( get_option( 'blogname' ), ENT_QUOTES ) ) ) . "\n\n";
28 /* translators: %s: Customer username */
29 echo sprintf( esc_html__( 'Username: %s', 'woocommerce' ), esc_html( $user_login ) ) . "\n\n";
30 echo esc_html__( 'If you didn\'t make this request, just ignore this email. If you\'d like to proceed:', 'woocommerce' ) . "\n\n";
31 echo esc_url( add_query_arg( array( 'key' => $reset_key, 'id' => $user_id ), wc_get_endpoint_url( 'lost-password', '', wc_get_page_permalink( 'myaccount' ) ) ) ) . "\n\n"; // phpcs:ignore
32
33 echo "\n\n----------------------------------------\n\n";
34
35 /**
36 * Show user-defined additional content - this is set in each email's settings.
37 */
38 if ( $additional_content ) {
39 echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
40 echo "\n\n----------------------------------------\n\n";
41 }
42
43 echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );
1 <?php
2 /**
3 * Email Addresses (plain)
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/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://docs.woocommerce.com/document/template-structure/
14 * @package WooCommerce\Templates\Emails\Plain
15 * @version 5.6.0
16 */
17
18 defined( 'ABSPATH' ) || exit;
19
20 echo "\n" . esc_html( wc_strtoupper( esc_html__( 'Billing address', 'woocommerce' ) ) ) . "\n\n";
21 echo preg_replace( '#<br\s*/?>#i', "\n", $order->get_formatted_billing_address() ) . "\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
22
23 if ( $order->get_billing_phone() ) {
24 echo $order->get_billing_phone() . "\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
25 }
26
27 if ( $order->get_billing_email() ) {
28 echo $order->get_billing_email() . "\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
29 }
30
31 if ( ! wc_ship_to_billing_address_only() && $order->needs_shipping_address() ) {
32 $shipping = $order->get_formatted_shipping_address();
33
34 if ( $shipping ) {
35 echo "\n" . esc_html( wc_strtoupper( esc_html__( 'Shipping address', 'woocommerce' ) ) ) . "\n\n";
36 echo preg_replace( '#<br\s*/?>#i', "\n", $shipping ) . "\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
37
38 if ( $order->get_shipping_phone() ) {
39 echo $order->get_shipping_phone() . "\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
40 }
41 }
42 }
1 <?php
2 /**
3 * Additional Customer Details (plain)
4 *
5 * This is extra customer data which can be filtered by plugins. It outputs below the order item table.
6 *
7 * This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/email-customer-details.php.
8 *
9 * HOWEVER, on occasion WooCommerce will need to update template files and you
10 * (the theme developer) will need to copy the new files to your theme to
11 * maintain compatibility. We try to do this as little as possible, but it does
12 * happen. When this occurs the version of the template file will be bumped and
13 * the readme will list any important changes.
14 *
15 * @see https://docs.woocommerce.com/document/template-structure/
16 * @package WooCommerce\Templates\Emails\Plain
17 * @version 3.4.0
18 */
19
20 defined( 'ABSPATH' ) || exit;
21
22 echo esc_html( wc_strtoupper( esc_html__( 'Customer details', 'woocommerce' ) ) ) . "\n\n";
23
24 foreach ( $fields as $field ) {
25 echo wp_kses_post( $field['label'] ) . ': ' . wp_kses_post( $field['value'] ) . "\n";
26 }
1 <?php
2 /**
3 * Email Downloads.
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/email-downloads.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 * @package WooCommerce\Templates
15 * @version 3.4.0
16 */
17
18 defined( 'ABSPATH' ) || exit;
19
20 echo esc_html( wc_strtoupper( esc_html__( 'Downloads', 'woocommerce' ) ) ) . "\n\n";
21
22 foreach ( $downloads as $download ) {
23 foreach ( $columns as $column_id => $column_name ) {
24 echo wp_kses_post( $column_name ) . ': ';
25
26 if ( has_action( 'woocommerce_email_downloads_column_' . $column_id ) ) {
27 do_action( 'woocommerce_email_downloads_column_' . $column_id, $download, $plain_text );
28 } else {
29 switch ( $column_id ) {
30 case 'download-product':
31 echo esc_html( $download['product_name'] );
32 break;
33 case 'download-file':
34 echo esc_html( $download['download_name'] ) . ' - ' . esc_url( $download['download_url'] );
35 break;
36 case 'download-expires':
37 if ( ! empty( $download['access_expires'] ) ) {
38 echo esc_html( date_i18n( get_option( 'date_format' ), strtotime( $download['access_expires'] ) ) );
39 } else {
40 esc_html_e( 'Never', 'woocommerce' );
41 }
42 break;
43 }
44 }
45 echo "\n";
46 }
47 echo "\n";
48 }
49 echo '=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=';
50 echo "\n\n";
1 <?php
2 /**
3 * Order details table shown in emails.
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/email-order-details.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 * @package WooCommerce\Templates\Emails
15 * @version 3.7.0
16 */
17
18 defined( 'ABSPATH' ) || exit;
19
20 do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email );
21
22 /* translators: %1$s: Order ID. %2$s: Order date */
23 echo wp_kses_post( wc_strtoupper( sprintf( esc_html__( '[Order #%1$s] (%2$s)', 'woocommerce' ), $order->get_order_number(), wc_format_datetime( $order->get_date_created() ) ) ) ) . "\n";
24 echo "\n" . wc_get_email_order_items( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
25 $order,
26 array(
27 'show_sku' => $sent_to_admin,
28 'show_image' => false,
29 'image_size' => array( 32, 32 ),
30 'plain_text' => true,
31 'sent_to_admin' => $sent_to_admin,
32 )
33 );
34
35 echo "==========\n\n";
36
37 $item_totals = $order->get_order_item_totals();
38
39 if ( $item_totals ) {
40 foreach ( $item_totals as $total ) {
41 echo wp_kses_post( $total['label'] . "\t " . $total['value'] ) . "\n";
42 }
43 }
44
45 if ( $order->get_customer_note() ) {
46 echo esc_html__( 'Note:', 'woocommerce' ) . "\t " . wp_kses_post( wptexturize( $order->get_customer_note() ) ) . "\n";
47 }
48
49 if ( $sent_to_admin ) {
50 /* translators: %s: Order link. */
51 echo "\n" . sprintf( esc_html__( 'View order: %s', 'woocommerce' ), esc_url( $order->get_edit_order_url() ) ) . "\n";
52 }
53
54 do_action( 'woocommerce_email_after_order_table', $order, $sent_to_admin, $plain_text, $email );
1 <?php
2 /**
3 * Email Order Items (plain)
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/email-order-items.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 * @package WooCommerce\Templates\Emails\Plain
15 * @version 5.2.0
16 */
17
18 if ( ! defined( 'ABSPATH' ) ) {
19 exit; // Exit if accessed directly.
20 }
21
22 foreach ( $items as $item_id => $item ) :
23 if ( apply_filters( 'woocommerce_order_item_visible', true, $item ) ) {
24 $product = $item->get_product();
25 $sku = '';
26 $purchase_note = '';
27
28 if ( is_object( $product ) ) {
29 $sku = $product->get_sku();
30 $purchase_note = $product->get_purchase_note();
31 }
32
33 // phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
34 echo wp_kses_post( apply_filters( 'woocommerce_order_item_name', $item->get_name(), $item, false ) );
35 if ( $show_sku && $sku ) {
36 echo ' (#' . $sku . ')';
37 }
38 echo ' X ' . apply_filters( 'woocommerce_email_order_item_quantity', $item->get_quantity(), $item );
39 echo ' = ' . $order->get_formatted_line_subtotal( $item ) . "\n";
40 // phpcs:enable WordPress.Security.EscapeOutput.OutputNotEscaped
41
42 // allow other plugins to add additional product information here.
43 do_action( 'woocommerce_order_item_meta_start', $item_id, $item, $order, $plain_text );
44 // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
45 echo strip_tags(
46 wc_display_item_meta(
47 $item,
48 array(
49 'before' => "\n- ",
50 'separator' => "\n- ",
51 'after' => '',
52 'echo' => false,
53 'autop' => false,
54 )
55 )
56 );
57
58 // allow other plugins to add additional product information here.
59 do_action( 'woocommerce_order_item_meta_end', $item_id, $item, $order, $plain_text );
60 }
61 // Note.
62 if ( $show_purchase_note && $purchase_note ) {
63 echo "\n" . do_shortcode( wp_kses_post( $purchase_note ) );
64 }
65 echo "\n\n";
66 endforeach;