plain
3 years ago
admin-cancelled-order.php
5 years ago
admin-failed-order.php
5 years ago
admin-new-order.php
5 years ago
customer-completed-order.php
5 years ago
customer-invoice.php
4 years ago
customer-new-account.php
4 years ago
customer-note.php
5 years ago
customer-on-hold-order.php
3 years ago
customer-processing-order.php
5 years ago
customer-refunded-order.php
5 years ago
customer-reset-password.php
5 years ago
email-addresses.php
4 years ago
email-customer-details.php
5 years ago
email-downloads.php
5 years ago
email-footer.php
3 years ago
email-header.php
3 years ago
email-mobile-messaging.php
3 years ago
email-order-details.php
5 years ago
email-order-items.php
5 years ago
email-styles.php
3 years ago
customer-invoice.php
99 lines
| 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 ); |
| 99 |