admin-cancelled-order.php
1 year ago
admin-failed-order.php
1 year ago
admin-new-order.php
1 year ago
admin-payment-gateway-enabled.php
3 months ago
customer-cancelled-order.php
1 year ago
customer-completed-order.php
1 year ago
customer-failed-order.php
1 year ago
customer-fulfillment-created.php
11 months ago
customer-fulfillment-deleted.php
11 months ago
customer-fulfillment-updated.php
1 month ago
customer-invoice.php
1 year ago
customer-new-account.php
1 year ago
customer-note.php
11 months ago
customer-on-hold-order.php
1 year ago
customer-pos-completed-order.php
1 year ago
customer-pos-refunded-order.php
1 year ago
customer-processing-order.php
1 year ago
customer-refunded-order.php
1 year ago
customer-reset-password.php
1 year 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
2 years ago
email-customer-details.php
2 years ago
email-downloads.php
2 years ago
email-fulfillment-details.php
11 months ago
email-fulfillment-items.php
1 month ago
email-order-details.php
1 month ago
email-order-items.php
1 month ago
customer-pos-refunded-order.php
117 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Customer POS refunded order email (plain text) |
| 4 | * |
| 5 | * This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/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\Plain |
| 15 | * @version 10.0.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 | $email = $email ?? null; |
| 24 | |
| 25 | echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n"; |
| 26 | echo esc_html( wp_strip_all_tags( $email_heading ) ); |
| 27 | echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n"; |
| 28 | |
| 29 | if ( ! empty( $order->get_billing_first_name() ) ) { |
| 30 | /* translators: %s: Customer first name */ |
| 31 | echo sprintf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ) . "\n\n"; |
| 32 | } else { |
| 33 | echo esc_html__( 'Hi there,', 'woocommerce' ) . "\n\n"; |
| 34 | } |
| 35 | if ( $partial_refund ) { |
| 36 | /* translators: %s: Site title */ |
| 37 | echo sprintf( esc_html__( 'Your order from %s has been partially refunded.', 'woocommerce' ), esc_html( $pos_store_name ) ) . "\n\n"; |
| 38 | } else { |
| 39 | /* translators: %s: Site title */ |
| 40 | echo sprintf( esc_html__( 'Your order from %s has been refunded.', 'woocommerce' ), esc_html( $pos_store_name ) ) . "\n\n"; |
| 41 | } |
| 42 | echo esc_html__( 'Here’s a reminder of what you’ve bought:', 'woocommerce' ) . "\n\n"; |
| 43 | |
| 44 | /** |
| 45 | * Show order details. |
| 46 | * |
| 47 | * @hooked WC_Emails::order_details() Shows the order details table. |
| 48 | * @hooked WC_Structured_Data::generate_order_data() Generates structured data. |
| 49 | * @hooked WC_Structured_Data::output_structured_data() Outputs structured data. |
| 50 | * @since 2.5.0 |
| 51 | */ |
| 52 | do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email ); |
| 53 | |
| 54 | echo "\n----------------------------------------\n\n"; |
| 55 | |
| 56 | /** |
| 57 | * Show order meta data. |
| 58 | * |
| 59 | * @hooked WC_Emails::order_meta() Shows order meta data. |
| 60 | * @since 1.0.0 |
| 61 | */ |
| 62 | do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email ); |
| 63 | |
| 64 | /** |
| 65 | * Show customer details and email address. |
| 66 | * |
| 67 | * @hooked WC_Emails::customer_details() Shows customer details |
| 68 | * @hooked WC_Emails::email_address() Shows email address |
| 69 | * @since 1.0.0 |
| 70 | */ |
| 71 | do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email ); |
| 72 | |
| 73 | echo "\n\n----------------------------------------\n\n"; |
| 74 | |
| 75 | /** |
| 76 | * Show user-defined additional content - this is set in each email's settings. |
| 77 | */ |
| 78 | if ( $additional_content ) { |
| 79 | echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) ); |
| 80 | echo "\n\n----------------------------------------\n\n"; |
| 81 | } |
| 82 | |
| 83 | /** |
| 84 | * Show store information - store details are set in the Point of Sale settings. |
| 85 | */ |
| 86 | if ( ! empty( $pos_store_email ) || ! empty( $pos_store_phone_number ) || ! empty( $pos_store_address ) ) { |
| 87 | if ( ! empty( $pos_store_name ) ) { |
| 88 | echo "\n" . esc_html( $pos_store_name ) . "\n\n"; |
| 89 | } |
| 90 | if ( ! empty( $pos_store_email ) ) { |
| 91 | echo esc_html( $pos_store_email ) . "\n"; |
| 92 | } |
| 93 | if ( ! empty( $pos_store_phone_number ) ) { |
| 94 | echo esc_html( $pos_store_phone_number ) . "\n"; |
| 95 | } |
| 96 | if ( ! empty( $pos_store_address ) ) { |
| 97 | echo esc_html( wp_strip_all_tags( wptexturize( $pos_store_address ) ) ) . "\n"; |
| 98 | } |
| 99 | echo "\n----------------------------------------\n\n"; |
| 100 | } |
| 101 | |
| 102 | /** |
| 103 | * Show refund & returns policy - this is set in the Point of Sale settings. |
| 104 | */ |
| 105 | if ( ! empty( $pos_refund_returns_policy ) ) { |
| 106 | echo "\n" . esc_html__( 'Refund & Returns Policy', 'woocommerce' ) . "\n\n"; |
| 107 | echo esc_html( wp_strip_all_tags( wptexturize( $pos_refund_returns_policy ) ) ) . "\n"; |
| 108 | echo "\n----------------------------------------\n\n"; |
| 109 | } |
| 110 | |
| 111 | /** |
| 112 | * Filter the email footer text. |
| 113 | * |
| 114 | * @since 4.0.0 |
| 115 | */ |
| 116 | echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ), $email ) ); |
| 117 |