block
3 months ago
plain
9 months ago
admin-cancelled-order.php
1 year ago
admin-failed-order.php
6 months ago
admin-new-order.php
6 months ago
customer-cancelled-order.php
6 months ago
customer-completed-order.php
6 months ago
customer-failed-order.php
6 months ago
customer-fulfillment-created.php
6 months ago
customer-fulfillment-deleted.php
6 months ago
customer-fulfillment-updated.php
6 months ago
customer-invoice.php
6 months ago
customer-new-account.php
6 months ago
customer-note.php
6 months ago
customer-on-hold-order.php
6 months ago
customer-pos-completed-order.php
6 months ago
customer-pos-refunded-order.php
6 months ago
customer-processing-order.php
6 months ago
customer-refunded-order.php
6 months ago
customer-reset-password.php
6 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
3 months ago
email-customer-details.php
1 year ago
email-downloads.php
6 months ago
email-footer.php
6 months ago
email-fulfillment-details.php
10 months ago
email-fulfillment-items.php
10 months ago
email-header.php
6 months ago
email-mobile-messaging.php
2 years ago
email-order-details.php
3 months ago
email-order-items.php
6 months ago
email-styles.php
4 months ago
customer-failed-order.php
95 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Customer failed order email |
| 4 | * |
| 5 | * This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-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://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 | 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 | * @hooked WC_Emails::email_header() Output the email header |
| 30 | * @since 3.7.0 |
| 31 | */ |
| 32 | do_action( 'woocommerce_email_header', $email_heading, $email ); ?> |
| 33 | |
| 34 | <?php echo $email_improvements_enabled ? '<div class="email-introduction">' : ''; ?> |
| 35 | <p> |
| 36 | <?php |
| 37 | if ( ! empty( $order->get_billing_first_name() ) ) { |
| 38 | /* translators: %s: Customer first name */ |
| 39 | printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ); |
| 40 | } else { |
| 41 | printf( esc_html__( 'Hi,', 'woocommerce' ) ); |
| 42 | } |
| 43 | ?> |
| 44 | </p> |
| 45 | <p><?php esc_html_e( "Unfortunately, we couldn't complete your order due to an issue with your payment method.", 'woocommerce' ); ?></p> |
| 46 | <?php /* translators: %s: Site title */ ?> |
| 47 | <p><?php printf( esc_html__( "If you'd like to continue with your purchase, please return to %s and try a different method of payment.", 'woocommerce' ), esc_html( $blogname ) ); ?></p> |
| 48 | <p><?php esc_html_e( 'Your order details are as follows:', 'woocommerce' ); ?></p> |
| 49 | <?php echo $email_improvements_enabled ? '</div>' : ''; ?> |
| 50 | |
| 51 | <?php |
| 52 | /** |
| 53 | * Hook for the woocommerce_email_order_details. |
| 54 | * |
| 55 | * @hooked WC_Emails::order_details() Shows the order details table. |
| 56 | * @hooked WC_Structured_Data::generate_order_data() Generates structured data. |
| 57 | * @hooked WC_Structured_Data::output_structured_data() Outputs structured data. |
| 58 | * @since 2.5.0 |
| 59 | */ |
| 60 | do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email ); |
| 61 | |
| 62 | /** |
| 63 | * Hook for the woocommerce_email_order_meta. |
| 64 | * |
| 65 | * @hooked WC_Emails::order_meta() Shows order meta data. |
| 66 | * @since 1.0.0 |
| 67 | */ |
| 68 | do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email ); |
| 69 | |
| 70 | /** |
| 71 | * Hook for woocommerce_email_customer_details. |
| 72 | * |
| 73 | * @hooked WC_Emails::customer_details() Shows customer details |
| 74 | * @hooked WC_Emails::email_address() Shows email address |
| 75 | * @since 1.0.0 |
| 76 | */ |
| 77 | do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email ); |
| 78 | |
| 79 | /** |
| 80 | * Show user-defined additional content - this is set in each email's settings. |
| 81 | */ |
| 82 | if ( $additional_content ) { |
| 83 | echo $email_improvements_enabled ? '<table border="0" cellpadding="0" cellspacing="0" width="100%" role="presentation"><tr><td class="email-additional-content">' : ''; |
| 84 | echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) ); |
| 85 | echo $email_improvements_enabled ? '</td></tr></table>' : ''; |
| 86 | } |
| 87 | |
| 88 | /** |
| 89 | * Hook for the woocommerce_email_footer. |
| 90 | * |
| 91 | * @hooked WC_Emails::email_footer() Output the email footer |
| 92 | * @since 3.7.0 |
| 93 | */ |
| 94 | do_action( 'woocommerce_email_footer', $email ); |
| 95 |