block
1 month ago
plain
1 month ago
admin-cancelled-order.php
1 year ago
admin-failed-order.php
7 months ago
admin-new-order.php
7 months ago
admin-payment-gateway-enabled.php
2 months ago
customer-cancelled-order.php
7 months ago
customer-completed-order.php
7 months ago
customer-failed-order.php
7 months ago
customer-fulfillment-created.php
7 months ago
customer-fulfillment-deleted.php
7 months ago
customer-fulfillment-updated.php
1 month ago
customer-invoice.php
7 months ago
customer-new-account.php
7 months ago
customer-note.php
7 months ago
customer-on-hold-order.php
7 months ago
customer-pos-completed-order.php
7 months ago
customer-pos-refunded-order.php
7 months ago
customer-processing-order.php
7 months ago
customer-refunded-order.php
7 months ago
customer-reset-password.php
7 months ago
customer-stock-notification-verified.php
9 months ago
customer-stock-notification-verify.php
9 months ago
customer-stock-notification.php
9 months ago
email-addresses.php
4 months ago
email-customer-details.php
1 year ago
email-downloads.php
7 months ago
email-footer.php
7 months ago
email-fulfillment-details.php
2 months ago
email-fulfillment-items.php
1 month ago
email-header.php
2 months ago
email-mobile-messaging.php
2 years ago
email-order-details.php
1 month ago
email-order-items.php
1 month ago
email-styles.php
1 month ago
customer-pos-refunded-order.php
134 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Customer POS refunded order email |
| 4 | * |
| 5 | * This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-pos-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://woocommerce.com/document/template-structure/ |
| 14 | * @package WooCommerce\Templates\Emails |
| 15 | * @version 10.4.0 |
| 16 | */ |
| 17 | |
| 18 | use Automattic\WooCommerce\Utilities\FeaturesUtil; |
| 19 | |
| 20 | defined( 'ABSPATH' ) || exit; |
| 21 | |
| 22 | $email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' ); |
| 23 | |
| 24 | /** |
| 25 | * Hook for the woocommerce_email_header. |
| 26 | * |
| 27 | * @hooked WC_Email_Customer_POS_*::email_header() Output the email header |
| 28 | * @since 10.0.0 |
| 29 | */ |
| 30 | do_action( 'woocommerce_pos_email_header', $email_heading, $email ); ?> |
| 31 | |
| 32 | <div class="email-introduction"> |
| 33 | <p> |
| 34 | <?php |
| 35 | if ( ! empty( $order->get_billing_first_name() ) ) { |
| 36 | /* translators: %s: Customer first name */ |
| 37 | printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); |
| 38 | } else { |
| 39 | printf( esc_html__( 'Hi there,', 'woocommerce' ) ); |
| 40 | } |
| 41 | ?> |
| 42 | </p> |
| 43 | |
| 44 | <p> |
| 45 | <?php |
| 46 | if ( $partial_refund ) { |
| 47 | /* translators: %s: Site title */ |
| 48 | echo sprintf( esc_html__( 'Your order from %s has been partially refunded.', 'woocommerce' ), esc_html( $pos_store_name ) ) . "\n\n"; |
| 49 | } else { |
| 50 | /* translators: %s: Site title */ |
| 51 | echo sprintf( esc_html__( 'Your order from %s has been refunded.', 'woocommerce' ), esc_html( $pos_store_name ) ) . "\n\n"; |
| 52 | } |
| 53 | echo '</p><p>'; |
| 54 | echo esc_html__( 'Here’s a reminder of what you’ve bought:', 'woocommerce' ) . "\n\n"; |
| 55 | ?> |
| 56 | </p> |
| 57 | </div> |
| 58 | |
| 59 | <?php |
| 60 | |
| 61 | /** |
| 62 | * Show 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 | * Show order meta data. |
| 73 | * |
| 74 | * @hooked WC_Emails::order_meta() Shows order meta data. |
| 75 | * @since 1.0.0 |
| 76 | */ |
| 77 | do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email ); |
| 78 | |
| 79 | /** |
| 80 | * Show customer details and email address. |
| 81 | * |
| 82 | * @hooked WC_Emails::customer_details() Shows customer details |
| 83 | * @hooked WC_Emails::email_address() Shows email address |
| 84 | * @since 1.0.0 |
| 85 | */ |
| 86 | do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email ); |
| 87 | |
| 88 | /** |
| 89 | * Show user-defined additional content - this is set in each email's settings. |
| 90 | */ |
| 91 | if ( $additional_content ) { |
| 92 | echo $email_improvements_enabled ? '<table border="0" cellpadding="0" cellspacing="0" width="100%" role="presentation"><tr><td class="email-additional-content">' : ''; |
| 93 | echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) ); |
| 94 | echo $email_improvements_enabled ? '</td></tr></table>' : ''; |
| 95 | } |
| 96 | |
| 97 | /** |
| 98 | * Show store information - store details are set in the Point of Sale settings. |
| 99 | */ |
| 100 | if ( ! empty( $pos_store_email ) || ! empty( $pos_store_phone_number ) || ! empty( $pos_store_address ) ) { |
| 101 | echo '<div class="pos-store-information">'; |
| 102 | if ( ! empty( $pos_store_name ) ) { |
| 103 | echo '<h2>' . esc_html( $pos_store_name ) . '</h2>'; |
| 104 | } |
| 105 | if ( ! empty( $pos_store_email ) ) { |
| 106 | echo '<p>' . esc_html( $pos_store_email ) . '</p>'; |
| 107 | } |
| 108 | if ( ! empty( $pos_store_phone_number ) ) { |
| 109 | echo '<p>' . esc_html( $pos_store_phone_number ) . '</p>'; |
| 110 | } |
| 111 | if ( ! empty( $pos_store_address ) ) { |
| 112 | echo wp_kses_post( wpautop( wptexturize( $pos_store_address ) ) ); |
| 113 | } |
| 114 | echo '</div>'; |
| 115 | } |
| 116 | |
| 117 | /** |
| 118 | * Show refund & returns policy - this is set in the Point of Sale settings. |
| 119 | */ |
| 120 | if ( ! empty( $pos_refund_returns_policy ) ) { |
| 121 | echo '<div class="refund-returns-policy">'; |
| 122 | echo '<h2>' . esc_html__( 'Refund & Returns Policy', 'woocommerce' ) . '</h2>'; |
| 123 | echo wp_kses_post( wpautop( wptexturize( $pos_refund_returns_policy ) ) ); |
| 124 | echo '</div>'; |
| 125 | } |
| 126 | |
| 127 | /** |
| 128 | * Hook for the woocommerce_email_footer. |
| 129 | * |
| 130 | * @hooked WC_Email_Customer_POS_*::email_footer() Output the email footer |
| 131 | * @since 10.0.0 |
| 132 | */ |
| 133 | do_action( 'woocommerce_pos_email_footer', $email ); |
| 134 |