Last active
January 28, 2021 11:06
-
-
Save zorem/6ffb7f72b5b2debf7026c9e8c18e88a9 to your computer and use it in GitHub Desktop.
The last thing is to define the templates that are going to be used for creating the email content. The first template will be an HTML template. Create a file wc-customer-my-custom-status-order.php inside templates/emails/.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Completed Order sent to Customer. | |
*/ | |
if ( ! defined( 'ABSPATH' ) ) { | |
exit; | |
} | |
/** | |
* @hooked WC_Emails::email_header() Output the email header | |
*/ | |
do_action( 'woocommerce_email_header', $email_heading, $email ); ?> | |
<p><?php printf( __( 'The order #%d has been delivered. Order Details:', 'woocommerce' ), $order->get_order_number() ); ?></p> | |
<?php | |
/** | |
* @hooked WC_Emails::order_details() Shows the order details table. | |
* @hooked WC_Emails::order_schema_markup() Adds Schema.org markup. | |
* @since 2.5.0 | |
*/ | |
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email ); | |
/** | |
* @hooked WC_Emails::order_meta() Shows order meta data. | |
*/ | |
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email ); | |
/** | |
* @hooked WC_Emails::customer_details() Shows customer details | |
* @hooked WC_Emails::email_address() Shows email address | |
*/ | |
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email ); | |
/** | |
* @hooked WC_Emails::email_footer() Output the email footer | |
*/ | |
do_action( 'woocommerce_email_footer', $email ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment