PluginProbe
WooCommerce / 11.1.0
WooCommerce v11.1.0
11.1.0 11.1.0-rc.2 11.1.0-rc.1 11.1.0-beta.2 11.1.0-beta.1 11.0.1 11.0.0 11.0.0-rc.3 11.0.0-rc.2 11.0.0-rc.1 11.0.0-beta.2 11.0.0-beta.1 10.9.4 10.9.3 10.9.2 10.9.1 10.9.0 10.9.0-rc.1 10.9.0-beta.2 10.9.0-beta.1 10.8.1 10.8.0 10.8.0-rc.1 10.8.0-beta.2 10.8.0-beta.1 All 648 releases
woocommerce / templates / emails / customer-review-request.php
customer-review-request.php
91 lines 2.9 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Customer review request email
4 *
5 * This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-review-request.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.8.0
16 */
17
18 use Automattic\WooCommerce\Utilities\FeaturesUtil;
19
20 if ( ! defined( 'ABSPATH' ) ) {
21 exit;
22 }
23
24 $email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
25
26 /**
27 * Hook for the woocommerce_email_header.
28 *
29 * @param string $email_heading The email heading.
30 * @param WC_Email $email The email object.
31 * @since 2.5.0
32 *
33 * @hooked WC_Emails::email_header() Output the email header
34 */
35 do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
36
37 <?php echo $email_improvements_enabled ? '<div class="email-introduction">' : ''; ?>
38 <p>
39 <?php
40 if ( ! empty( $order->get_billing_first_name() ) ) {
41 /* translators: %s: Customer first name */
42 printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) );
43 } else {
44 printf( esc_html__( 'Hi,', 'woocommerce' ) );
45 }
46 ?>
47 </p>
48
49 <p><?php esc_html_e( 'We’d love to know what you thought of the products you ordered. Your review helps other shoppers make better decisions and helps us improve.', 'woocommerce' ); ?></p>
50
51 <?php if ( ! empty( $review_order_url ) ) : ?>
52 <p>
53 <a href="<?php echo esc_url( $review_order_url ); ?>"><?php esc_html_e( 'Leave a review', 'woocommerce' ); ?></a>
54 </p>
55 <?php endif; ?>
56 <?php echo $email_improvements_enabled ? '</div>' : ''; ?>
57
58 <?php if ( $order instanceof WC_Order ) : ?>
59 <p style="font-size: 12px; line-height: 16px; color: #4d4d4d; margin-top: 16px;">
60 <?php
61 $date_created = $order->get_date_created();
62 printf(
63 /* translators: 1: order number, 2: order date */
64 esc_html__( 'Order #%1$s (%2$s)', 'woocommerce' ),
65 esc_html( $order->get_order_number() ),
66 esc_html( $date_created ? wc_format_datetime( $date_created ) : '' )
67 );
68 ?>
69 </p>
70 <?php endif; ?>
71
72 <?php
73 /**
74 * Show user-defined additional content - this is set in each email's settings.
75 */
76 if ( $additional_content ) {
77 echo $email_improvements_enabled ? '<table border="0" cellpadding="0" cellspacing="0" width="100%" role="presentation"><tr><td class="email-additional-content">' : '';
78 echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
79 echo $email_improvements_enabled ? '</td></tr></table>' : '';
80 }
81
82 /**
83 * Hook for the woocommerce_email_footer.
84 *
85 * @param WC_Email $email The email object.
86 * @since 2.5.0
87 *
88 * @hooked WC_Emails::email_footer() Output the email footer
89 */
90 do_action( 'woocommerce_email_footer', $email );
91