plain
1 year ago
admin-cancelled-order.php
1 year ago
admin-failed-order.php
1 year ago
admin-new-order.php
1 year ago
customer-completed-order.php
1 year ago
customer-failed-order.php
1 year ago
customer-invoice.php
1 year ago
customer-new-account-blocks.php
1 year ago
customer-new-account.php
1 year ago
customer-note.php
1 year ago
customer-on-hold-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
email-addresses.php
1 year ago
email-customer-details.php
1 year ago
email-downloads.php
1 year ago
email-footer.php
1 year ago
email-header.php
1 year ago
email-mobile-messaging.php
2 years ago
email-order-details.php
1 year ago
email-order-items.php
1 year ago
email-styles.php
1 year ago
admin-new-order.php
75 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Admin new order email |
| 4 | * |
| 5 | * This template can be overridden by copying it to yourtheme/woocommerce/emails/admin-new-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\HTML |
| 15 | * @version 9.8.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 | * @hooked WC_Emails::email_header() Output the email header |
| 26 | */ |
| 27 | do_action( 'woocommerce_email_header', $email_heading, $email ); ?> |
| 28 | |
| 29 | <?php |
| 30 | echo $email_improvements_enabled ? '<div class="email-introduction">' : ''; |
| 31 | /* translators: %s: Customer billing full name */ |
| 32 | $text = __( 'You’ve received the following order from %s:', 'woocommerce' ); |
| 33 | if ( $email_improvements_enabled ) { |
| 34 | /* translators: %s: Customer billing full name */ |
| 35 | $text = __( 'Woo! You’ve received a new order from %s:', 'woocommerce' ); |
| 36 | } |
| 37 | ?> |
| 38 | <p><?php printf( esc_html( $text ), esc_html( $order->get_formatted_billing_full_name() ) ); ?></p> |
| 39 | <?php echo $email_improvements_enabled ? '</div>' : ''; ?> |
| 40 | |
| 41 | <?php |
| 42 | |
| 43 | /* |
| 44 | * @hooked WC_Emails::order_details() Shows the order details table. |
| 45 | * @hooked WC_Structured_Data::generate_order_data() Generates structured data. |
| 46 | * @hooked WC_Structured_Data::output_structured_data() Outputs structured data. |
| 47 | * @since 2.5.0 |
| 48 | */ |
| 49 | do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email ); |
| 50 | |
| 51 | /* |
| 52 | * @hooked WC_Emails::order_meta() Shows order meta data. |
| 53 | */ |
| 54 | do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email ); |
| 55 | |
| 56 | /* |
| 57 | * @hooked WC_Emails::customer_details() Shows customer details |
| 58 | * @hooked WC_Emails::email_address() Shows email address |
| 59 | */ |
| 60 | do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email ); |
| 61 | |
| 62 | /** |
| 63 | * Show user-defined additional content - this is set in each email's settings. |
| 64 | */ |
| 65 | if ( $additional_content ) { |
| 66 | echo $email_improvements_enabled ? '<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="email-additional-content">' : ''; |
| 67 | echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) ); |
| 68 | echo $email_improvements_enabled ? '</td></tr></table>' : ''; |
| 69 | } |
| 70 | |
| 71 | /* |
| 72 | * @hooked WC_Emails::email_footer() Output the email footer |
| 73 | */ |
| 74 | do_action( 'woocommerce_email_footer', $email ); |
| 75 |