first commit

This commit is contained in:
User A0264400
2026-04-01 23:20:16 +03:00
commit a766acdc90
23071 changed files with 4933189 additions and 0 deletions

View File

@@ -0,0 +1,75 @@
<?php
/**
* Admin cancelled order email
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/admin-cancelled-order.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails
* @version 9.8.0
*/
use Automattic\WooCommerce\Utilities\FeaturesUtil;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
/*
* @hooked WC_Emails::email_header() Output the email header
*/
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
<?php
echo $email_improvements_enabled ? '<div class="email-introduction">' : '';
/* translators: %1$s: Order number. %2$s: Customer full name */
$text = __( 'Notification to let you know &mdash; order #%1$s belonging to %2$s has been cancelled:', 'woocommerce' );
if ( $email_improvements_enabled ) {
/* translators: %1$s: Order number. %2$s: Customer full name */
$text = __( 'Were getting in touch to let you know that order #%1$s from %2$s has been cancelled.', 'woocommerce' );
}
?>
<p><?php printf( esc_html( $text ), esc_html( $order->get_order_number() ), esc_html( $order->get_formatted_billing_full_name() ) ); ?></p>
<?php echo $email_improvements_enabled ? '</div>' : ''; ?>
<?php
/*
* @hooked WC_Emails::order_details() Shows the order details table.
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
* @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 );
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo $email_improvements_enabled ? '<table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td class="email-additional-content">' : '';
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
echo $email_improvements_enabled ? '</td></tr></table>' : '';
}
/*
* @hooked WC_Emails::email_footer() Output the email footer
*/
do_action( 'woocommerce_email_footer', $email );

View File

@@ -0,0 +1,76 @@
<?php
/**
* Admin failed order email
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/admin-failed-order.php
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails
* @version 10.4.0
*/
use Automattic\WooCommerce\Utilities\FeaturesUtil;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
/*
* @hooked WC_Emails::email_header() Output the email header
*/
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
<?php
echo $email_improvements_enabled ? '<div class="email-introduction">' : '';
/* translators: %1$s: Order number. %2$s: Customer full name. */
$text = __( 'Payment for order #%1$s from %2$s has failed. The order was as follows:', 'woocommerce' );
if ( $email_improvements_enabled ) {
/* translators: %1$s: Order number. %2$s: Customer full name. */
$text = __( 'Unfortunately, the payment for order #%1$s from %2$s has failed. The order was as follows:', 'woocommerce' );
}
?>
<p><?php printf( esc_html( $text ), esc_html( $order->get_order_number() ), esc_html( $order->get_formatted_billing_full_name() ) ); ?></p>
<?php echo $email_improvements_enabled ? '</div>' : ''; ?>
<?php
/*
* @hooked WC_Emails::order_details() Shows the order details table.
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
* @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 );
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo $email_improvements_enabled ? '<table border="0" cellpadding="0" cellspacing="0" width="100%" role="presentation"><tr><td class="email-additional-content">' : '';
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
echo $email_improvements_enabled ? '</td></tr></table>' : '';
}
/*
* @hooked WC_Emails::email_footer() Output the email footer
*/
do_action( 'woocommerce_email_footer', $email );

View File

@@ -0,0 +1,74 @@
<?php
/**
* Admin new order email
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/admin-new-order.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\HTML
* @version 10.4.0
*/
use Automattic\WooCommerce\Utilities\FeaturesUtil;
defined( 'ABSPATH' ) || exit;
$email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
/*
* @hooked WC_Emails::email_header() Output the email header
*/
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
<?php
echo $email_improvements_enabled ? '<div class="email-introduction">' : '';
/* translators: %s: Customer billing full name */
$text = __( 'Youve received the following order from %s:', 'woocommerce' );
if ( $email_improvements_enabled ) {
/* translators: %s: Customer billing full name */
$text = __( 'Youve received a new order from %s:', 'woocommerce' );
}
?>
<p><?php printf( esc_html( $text ), esc_html( $order->get_formatted_billing_full_name() ) ); ?></p>
<?php echo $email_improvements_enabled ? '</div>' : ''; ?>
<?php
/*
* @hooked WC_Emails::order_details() Shows the order details table.
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
* @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 );
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo $email_improvements_enabled ? '<table border="0" cellpadding="0" cellspacing="0" width="100%" role="presentation"><tr><td class="email-additional-content">' : '';
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
echo $email_improvements_enabled ? '</td></tr></table>' : '';
}
/*
* @hooked WC_Emails::email_footer() Output the email footer
*/
do_action( 'woocommerce_email_footer', $email );

View File

@@ -0,0 +1,47 @@
<?php
/**
* Admin cancelled order email (initial block content)
*
* This template can be overridden by editing it in the WooCommerce email editor.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Block
* @version 10.4.0
*/
use Automattic\WooCommerce\Internal\EmailEditor\BlockEmailRenderer;
defined( 'ABSPATH' ) || exit;
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentBeforeOpen -- removed to prevent empty new lines.
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentAfterEnd -- removed to prevent empty new lines.
?>
<!-- wp:heading -->
<h2 class="wp-block-heading"><?php
/* translators: %s: order number */
printf( esc_html__( 'Canceled order: #%s,', 'woocommerce' ), '<!--[woocommerce/order-number]-->' );
?></h2>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p><?php
/* translators: %1$s: Order number. %2$s: Customer full name */
$text = __( 'Were getting in touch to let you know that order #%1$s from %2$s has been cancelled.', 'woocommerce' );
printf( esc_html( $text ), '<!--[woocommerce/order-number]-->', '<!--[woocommerce/customer-full-name]-->' );
?></p>
<!-- /wp:paragraph -->
<!-- wp:woocommerce/email-content {"lock":{"move":false,"remove":true}} -->
<div class="wp-block-woocommerce-email-content"> <?php echo esc_html( BlockEmailRenderer::WOO_EMAIL_CONTENT_PLACEHOLDER ); ?> </div>
<!-- /wp:woocommerce/email-content -->
<!-- wp:paragraph -->
<p> <?php echo esc_html__( 'Thanks for reading.', 'woocommerce' ); ?> </p>
<!-- /wp:paragraph -->

View File

@@ -0,0 +1,49 @@
<?php
/**
* Admin failed order email (initial block content)
*
* This template can be overridden by editing it in the WooCommerce email editor.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Block
* @version 10.2.0
*/
use Automattic\WooCommerce\Internal\EmailEditor\BlockEmailRenderer;
defined( 'ABSPATH' ) || exit;
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentBeforeOpen -- removed to prevent empty new lines.
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentAfterEnd -- removed to prevent empty new lines.
?>
<!-- wp:heading -->
<h2 class="wp-block-heading"><?php
/* translators: %s: order number */
printf( esc_html__( 'Order failed: #%s,', 'woocommerce' ), '<!--[woocommerce/order-number]-->' );
?></h2>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p><?php
/* translators: %1$s: Order number. %2$s: Customer full name. */
$text = __( 'Unfortunately, the payment for order #%1$s from %2$s has failed. The order was as follows:', 'woocommerce' );
printf( esc_html( $text ), '<!--[woocommerce/order-number]-->', '<!--[woocommerce/customer-full-name]-->' );
?></p>
<!-- /wp:paragraph -->
<!-- wp:woocommerce/email-content {"lock":{"move":false,"remove":true}} -->
<div class="wp-block-woocommerce-email-content"> <?php echo esc_html( BlockEmailRenderer::WOO_EMAIL_CONTENT_PLACEHOLDER ); ?> </div>
<!-- /wp:woocommerce/email-content -->
<!-- wp:paragraph -->
<p><?php
echo wp_kses_post( __( 'We hope theyll be back soon! Read more about <a href="https://woocommerce.com/document/managing-orders/">troubleshooting failed payments</a>.', 'woocommerce' ) );
?></p>
<!-- /wp:paragraph -->

View File

@@ -0,0 +1,46 @@
<?php
/**
* Admin new order email (initial block content)
*
* This template can be overridden by editing it in the WooCommerce email editor.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Block
* @version 10.2.0
*/
use Automattic\WooCommerce\Internal\EmailEditor\BlockEmailRenderer;
defined( 'ABSPATH' ) || exit;
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentBeforeOpen -- removed to prevent empty new lines.
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentAfterEnd -- removed to prevent empty new lines.
?>
<!-- wp:heading -->
<h2 class="wp-block-heading"><?php
/* translators: %s: order number */
printf( esc_html__( 'New order: #%s,', 'woocommerce' ), '<!--[woocommerce/order-number]-->' );
?></h2>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p><?php
/* translators: %s: Customer full name */
printf( esc_html__( 'Youve received a new order from %s', 'woocommerce' ), '<!--[woocommerce/customer-full-name]-->' );
?></p>
<!-- /wp:paragraph -->
<!-- wp:woocommerce/email-content {"lock":{"move":false,"remove":true}} -->
<div class="wp-block-woocommerce-email-content"> <?php echo esc_html( BlockEmailRenderer::WOO_EMAIL_CONTENT_PLACEHOLDER ); ?> </div>
<!-- /wp:woocommerce/email-content -->
<!-- wp:paragraph {"align":"center"} -->
<p class="has-text-align-center"> <?php echo esc_html__( 'Congratulations on the sale!', 'woocommerce' ); ?> </p>
<!-- /wp:paragraph -->

View File

@@ -0,0 +1,50 @@
<?php
/**
* Customer cancelled order email - block template.
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/block/customer-cancelled-order.php.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Block
* @version 10.2.0
*/
use Automattic\WooCommerce\Internal\EmailEditor\BlockEmailRenderer;
defined( 'ABSPATH' ) || exit;
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentBeforeOpen -- removed to prevent empty new lines.
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentAfterEnd -- removed to prevent empty new lines.
?>
<!-- wp:heading -->
<h2 class="wp-block-heading"><?php
/* translators: %s: Order number */
printf( esc_html__( 'Order Cancelled: #%s', 'woocommerce' ), '<!--[woocommerce/order-number]-->' );
?></h2>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p><?php
/* translators: %s: Customer first name */
printf( esc_html__( 'Hi %s,', 'woocommerce' ), '<!--[woocommerce/customer-first-name]-->' );
?></p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p><?php
/* translators: %s: Order number */
printf( esc_html__( 'Your order #%s has been cancelled.', 'woocommerce' ), '<!--[woocommerce/order-number]-->' );
?></p>
<!-- /wp:paragraph -->
<!-- wp:woocommerce/email-content {"lock":{"move":false,"remove":true}} -->
<div class="wp-block-woocommerce-email-content"> <?php echo esc_html( BlockEmailRenderer::WOO_EMAIL_CONTENT_PLACEHOLDER ); ?> </div>
<!-- /wp:woocommerce/email-content -->
<!-- wp:paragraph -->
<p><?php
/* translators: %s: Store admin email */
printf( esc_html__( 'We hope to see you again soon.', 'woocommerce' ) );
?></p>
<!-- /wp:paragraph -->

View File

@@ -0,0 +1,54 @@
<?php
/**
* Customer completed order email (initial block content)
*
* This template can be overridden by editing it in the WooCommerce email editor.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Block
* @version 10.2.0
*/
use Automattic\WooCommerce\Internal\EmailEditor\BlockEmailRenderer;
defined( 'ABSPATH' ) || exit;
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentBeforeOpen -- removed to prevent empty new lines.
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentAfterEnd -- removed to prevent empty new lines.
?>
<!-- wp:heading -->
<h2 class="wp-block-heading"> <?php echo esc_html__( 'Good things are heading your way!', 'woocommerce' ); ?> </h2>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p><?php
/* translators: %s: Customer first name */
printf( esc_html__( 'Hi %s,', 'woocommerce' ), '<!--[woocommerce/customer-first-name]-->' );
?></p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p> <?php echo esc_html__( 'We have finished processing your order.', 'woocommerce' ); ?> </p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p> <?php echo esc_html__( 'Heres a reminder of what youve ordered:', 'woocommerce' ); ?> </p>
<!-- /wp:paragraph -->
<!-- wp:woocommerce/email-content {"lock":{"move":false,"remove":true}} -->
<div class="wp-block-woocommerce-email-content"> <?php echo esc_html( BlockEmailRenderer::WOO_EMAIL_CONTENT_PLACEHOLDER ); ?> </div>
<!-- /wp:woocommerce/email-content -->
<!-- wp:paragraph -->
<p><?php
/* translators: %s: Store admin email */
printf( esc_html__( 'Thanks again! If you need any help with your order, please contact us at %s.', 'woocommerce' ), '<!--[woocommerce/store-email]-->' );
?></p>
<!-- /wp:paragraph -->

View File

@@ -0,0 +1,61 @@
<?php
/**
* Customer failed order email (initial block content)
*
* This template can be overridden by editing it in the WooCommerce email editor.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Block
* @version 10.2.0
*/
use Automattic\WooCommerce\Internal\EmailEditor\BlockEmailRenderer;
defined( 'ABSPATH' ) || exit;
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentBeforeOpen -- removed to prevent empty new lines.
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentAfterEnd -- removed to prevent empty new lines.
?>
<!-- wp:heading -->
<h2 class="wp-block-heading"> <?php echo esc_html__( 'Sorry, your order was unsuccessful', 'woocommerce' ); ?> </h2>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p><?php
/* translators: %s: Customer first name */
printf( esc_html__( 'Hi %s,', 'woocommerce' ), '<!--[woocommerce/customer-first-name]-->' );
?></p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p> <?php echo esc_html__( "Unfortunately, we couldn't complete your order due to an issue with your payment method.", 'woocommerce' ); ?> </p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p><?php
/* translators: %s: Site title */
printf( esc_html__( "If you'd like to continue with your purchase, please return to %s and try a different method of payment.", 'woocommerce' ), '<!--[woocommerce/site-title]-->' )
?></p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p> <?php echo esc_html__( 'Your order details are as follows:', 'woocommerce' ); ?> </p>
<!-- /wp:paragraph -->
<!-- wp:woocommerce/email-content {"lock":{"move":false,"remove":true}} -->
<div class="wp-block-woocommerce-email-content"> <?php echo esc_html( BlockEmailRenderer::WOO_EMAIL_CONTENT_PLACEHOLDER ); ?> </div>
<!-- /wp:woocommerce/email-content -->
<!-- wp:paragraph -->
<p><?php
/* translators: %s: Store admin email */
printf( esc_html__( 'If you need any help with your order, please contact us at %s.', 'woocommerce' ), '<!--[woocommerce/store-email]-->' );
?></p>
<!-- /wp:paragraph -->

View File

@@ -0,0 +1,44 @@
<?php
/**
* Customer fulfillment created email (initial block version)
*
* This template can be overridden by editing it in the WooCommerce email editor.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Block
* @version 10.5.0
*/
use Automattic\WooCommerce\Internal\EmailEditor\BlockEmailRenderer;
defined( 'ABSPATH' ) || exit;
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentBeforeOpen -- removed to prevent empty new lines.
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentAfterEnd -- removed to prevent empty new lines.
?>
<!-- wp:heading -->
<h2 class="wp-block-heading"> <?php echo esc_html__( 'Your item is on the way!', 'woocommerce' ); ?> </h2>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p><?php
echo esc_html__( 'Woo! Some items you purchased are being fulfilled. You can use the below information to track your shipment:', 'woocommerce' );
?></p>
<!-- /wp:paragraph -->
<!-- wp:woocommerce/email-content {"lock":{"move":false,"remove":true}} -->
<div class="wp-block-woocommerce-email-content"> <?php echo esc_html( BlockEmailRenderer::WOO_EMAIL_CONTENT_PLACEHOLDER ); ?> </div>
<!-- /wp:woocommerce/email-content -->
<!-- wp:paragraph -->
<p><?php
echo esc_html__( 'Please note that couriers may need some time to provide the latest shipping information.', 'woocommerce' );
?></p>
<!-- /wp:paragraph -->

View File

@@ -0,0 +1,44 @@
<?php
/**
* Customer fulfillment deleted email (initial block version)
*
* This template can be overridden by editing it in the WooCommerce email editor.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Block
* @version 10.5.0
*/
use Automattic\WooCommerce\Internal\EmailEditor\BlockEmailRenderer;
defined( 'ABSPATH' ) || exit;
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentBeforeOpen -- removed to prevent empty new lines.
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentAfterEnd -- removed to prevent empty new lines.
?>
<!-- wp:heading -->
<h2 class="wp-block-heading"> <?php echo esc_html__( 'One of your shipments has been removed', 'woocommerce' ); ?> </h2>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p><?php
echo esc_html__( 'We wanted to let you know that one of the previously fulfilled shipments from your order has been removed from our system. This may have been due to a correction or an update in our fulfillment records. Dont worry — this wont affect any items youve already received.', 'woocommerce' );
?></p>
<!-- /wp:paragraph -->
<!-- wp:woocommerce/email-content {"lock":{"move":false,"remove":true}} -->
<div class="wp-block-woocommerce-email-content"> <?php echo esc_html( BlockEmailRenderer::WOO_EMAIL_CONTENT_PLACEHOLDER ); ?> </div>
<!-- /wp:woocommerce/email-content -->
<!-- wp:paragraph -->
<p><?php
echo esc_html__( 'If you have any questions or notice anything unexpected, feel free to reach out to our support team through your account or reply to this email.', 'woocommerce' );
?></p>
<!-- /wp:paragraph -->

View File

@@ -0,0 +1,50 @@
<?php
/**
* Customer fulfillment updated email (initial block version)
*
* This template can be overridden by editing it in the WooCommerce email editor.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Block
* @version 10.5.0
*/
use Automattic\WooCommerce\Internal\EmailEditor\BlockEmailRenderer;
defined( 'ABSPATH' ) || exit;
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentBeforeOpen -- removed to prevent empty new lines.
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentAfterEnd -- removed to prevent empty new lines.
?>
<!-- wp:heading -->
<h2 class="wp-block-heading"> <?php echo esc_html__( 'Your shipment has been updated', 'woocommerce' ); ?> </h2>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p><?php
echo esc_html__( 'Some details of your shipment have recently been updated. This may include tracking information, item contents, or delivery status.', 'woocommerce' );
?></p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p><?php
echo esc_html__( 'Heres the latest info we have:', 'woocommerce' );
?></p>
<!-- /wp:paragraph -->
<!-- wp:woocommerce/email-content {"lock":{"move":false,"remove":true}} -->
<div class="wp-block-woocommerce-email-content"> <?php echo esc_html( BlockEmailRenderer::WOO_EMAIL_CONTENT_PLACEHOLDER ); ?> </div>
<!-- /wp:woocommerce/email-content -->
<!-- wp:paragraph -->
<p><?php
echo esc_html__( 'If anything looks off or you have questions, feel free to contact our support team.', 'woocommerce' );
?></p>
<!-- /wp:paragraph -->

View File

@@ -0,0 +1,50 @@
<?php
/**
* Customer invoice email (initial block content)
*
* This template can be overridden by editing it in the WooCommerce email editor.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Block
* @version 10.2.0
*/
use Automattic\WooCommerce\Internal\EmailEditor\BlockEmailRenderer;
defined( 'ABSPATH' ) || exit;
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentBeforeOpen -- removed to prevent empty new lines.
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentAfterEnd -- removed to prevent empty new lines.
?>
<!-- wp:heading -->
<h2 class="wp-block-heading"><?php
/* translators: %s: order number */
printf( esc_html__( 'Details for order #%s,', 'woocommerce' ), '<!--[woocommerce/order-number]-->' );
?></h2>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p><?php
/* translators: %s: Customer first name */
printf( esc_html__( 'Hi %s,', 'woocommerce' ), '<!--[woocommerce/customer-first-name]-->' );
?></p>
<!-- /wp:paragraph -->
<!-- wp:woocommerce/email-content {"lock":{"move":false,"remove":true}} -->
<div class="wp-block-woocommerce-email-content"> <?php echo esc_html( BlockEmailRenderer::WOO_EMAIL_CONTENT_PLACEHOLDER ); ?> </div>
<!-- /wp:woocommerce/email-content -->
<!-- wp:paragraph -->
<p><?php
/* translators: %s: Store admin email */
printf( esc_html__( 'Thanks again! If you need any help with your order, please contact us at %s.', 'woocommerce' ), '<!--[woocommerce/store-email]-->' );
?></p>
<!-- /wp:paragraph -->

View File

@@ -0,0 +1,81 @@
<?php
/**
* Customer new account email (initial block content).
*
* This template can be overridden by editing it in the WooCommerce email editor.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Block
* @version 10.2.0
*/
use Automattic\WooCommerce\Internal\EmailEditor\BlockEmailRenderer;
defined( 'ABSPATH' ) || exit;
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentBeforeOpen -- removed to prevent empty new lines.
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentAfterEnd -- removed to prevent empty new lines.
?>
<!-- wp:heading -->
<h2 class="wp-block-heading"><?php
/* translators: %s: Site title*/
printf( esc_html__( 'Welcome to %s', 'woocommerce' ), '<!--[woocommerce/site-title]-->' );
?></h2>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p><?php
/* translators: %s: Customer first name */
printf( esc_html__( 'Hi %s,', 'woocommerce' ), '<!--[woocommerce/customer-first-name]-->' );
?></p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p><?php
/* translators: %s: Site title */
printf( esc_html__( 'Thanks for creating an account on %s. Heres a copy of your user details.', 'woocommerce' ), '<!--[woocommerce/site-title]-->' );
?></p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p><?php
/* translators: %s: Username */
echo wp_kses( sprintf( __( 'Username: <b>%s</b>', 'woocommerce' ), '<!--[woocommerce/customer-username]-->' ), array( 'b' => array() ) );
?></p>
<!-- /wp:paragraph -->
<!-- wp:woocommerce/email-content {"lock":{"move":false,"remove":true}} -->
<div class="wp-block-woocommerce-email-content"> <?php echo esc_html( BlockEmailRenderer::WOO_EMAIL_CONTENT_PLACEHOLDER ); ?> </div>
<!-- /wp:woocommerce/email-content -->
<!-- wp:paragraph -->
<p><?php echo esc_html__( 'You can access your account area to view orders, change your password, and more via the link below:', 'woocommerce' ); ?></p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p><?php
$link_template = '<a data-link-href="%1$s" contenteditable="false" style="text-decoration: underline;">%2$s</a>';
printf(
'%s',
wp_kses_post(
sprintf(
$link_template,
esc_attr( '[woocommerce/my-account-url]' ),
esc_html__( 'My account', 'woocommerce' )
)
)
);
?></p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p> <?php echo esc_html__( 'We look forward to seeing you soon.', 'woocommerce' ); ?> </p>
<!-- /wp:paragraph -->

View File

@@ -0,0 +1,62 @@
<?php
/**
* Customer note email (initial block content)
*
* This template can be overridden by editing it in the WooCommerce email editor.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Block
* @version 10.2.0
*/
use Automattic\WooCommerce\Internal\EmailEditor\BlockEmailRenderer;
defined( 'ABSPATH' ) || exit;
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentBeforeOpen -- removed to prevent empty new lines.
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentAfterEnd -- removed to prevent empty new lines.
?>
<!-- wp:heading -->
<h2 class="wp-block-heading"> <?php echo esc_html__( 'A note has been added to your order', 'woocommerce' ); ?> </h2>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p><?php
/* translators: %s: Customer first name */
printf( esc_html__( 'Hi %s,', 'woocommerce' ), '<!--[woocommerce/customer-first-name]-->' );
?></p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p> <?php echo esc_html__( 'The following note has been added to your order:', 'woocommerce' ); ?> </p>
<!-- /wp:paragraph -->
<!-- wp:quote {"lock":{"move":false,"remove":true}} -->
<blockquote class="wp-block-quote">
<!-- wp:paragraph {"lock":{"move":false,"remove":true}} -->
<p> <?php echo '| <!--[woocommerce/admin-order-note]--> |'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?> </p>
<!-- /wp:paragraph -->
</blockquote>
<!-- /wp:quote -->
<!-- wp:paragraph -->
<p> <?php echo esc_html__( 'As a reminder, here are your order details:', 'woocommerce' ); ?> </p>
<!-- /wp:paragraph -->
<!-- wp:woocommerce/email-content {"lock":{"move":false,"remove":true}} -->
<div class="wp-block-woocommerce-email-content"> <?php echo esc_html( BlockEmailRenderer::WOO_EMAIL_CONTENT_PLACEHOLDER ); ?> </div>
<!-- /wp:woocommerce/email-content -->
<!-- wp:paragraph -->
<p><?php
/* translators: %s: Store admin email */
printf( esc_html__( 'Thanks again! If you need any help with your order, please contact us at %s,', 'woocommerce' ), '<!--[woocommerce/store-email]-->' );
?></p>
<!-- /wp:paragraph -->

View File

@@ -0,0 +1,54 @@
<?php
/**
* Customer on-hold order email (initial block version)
*
* This template can be overridden by editing it in the WooCommerce email editor.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Block
* @version 10.5.0
*/
use Automattic\WooCommerce\Internal\EmailEditor\BlockEmailRenderer;
defined( 'ABSPATH' ) || exit;
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentBeforeOpen -- removed to prevent empty new lines.
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentAfterEnd -- removed to prevent empty new lines.
?>
<!-- wp:heading -->
<h2 class="wp-block-heading"> <?php echo esc_html__( 'Thank you for your order', 'woocommerce' ); ?> </h2>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p><?php
/* translators: %s: Customer first name */
printf( esc_html__( 'Hi %s,', 'woocommerce' ), '<!--[woocommerce/customer-first-name]-->' );
?></p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p> <?php echo esc_html__( 'Weve received your order and its currently on hold until we can confirm your payment has been processed.', 'woocommerce' ); ?> </p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p> <?php echo esc_html__( 'Heres a reminder of what youve ordered:', 'woocommerce' ); ?> </p>
<!-- /wp:paragraph -->
<!-- wp:woocommerce/email-content {"lock":{"move":false,"remove":true}} -->
<div class="wp-block-woocommerce-email-content"> <?php echo esc_html( BlockEmailRenderer::WOO_EMAIL_CONTENT_PLACEHOLDER ); ?> </div>
<!-- /wp:woocommerce/email-content -->
<!-- wp:paragraph -->
<p><?php
/* translators: %s: Store admin email */
printf( esc_html__( 'Thanks again! If you need any help with your order, please contact us at %s.', 'woocommerce' ), '<!--[woocommerce/store-email]-->' );
?></p>
<!-- /wp:paragraph -->

View File

@@ -0,0 +1,34 @@
<?php
/**
* Customer POS completed order email (initial block content)
*
* This template can be overridden by editing it in the WooCommerce email editor.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Block
* @version 10.2.0
*/
use Automattic\WooCommerce\Internal\EmailEditor\BlockEmailRenderer;
defined( 'ABSPATH' ) || exit;
?>
<!-- wp:paragraph -->
<p> <?php echo esc_html__( 'Hi there,', 'woocommerce' ); ?> </p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p> <?php echo esc_html__( 'Heres a reminder of what youve bought:', 'woocommerce' ); ?> </p>
<!-- /wp:paragraph -->
<!-- wp:woocommerce/email-content {"lock":{"move":false,"remove":true}} -->
<div class="wp-block-woocommerce-email-content"> <?php echo esc_html( BlockEmailRenderer::WOO_EMAIL_CONTENT_PLACEHOLDER ); ?> </div>
<!-- /wp:woocommerce/email-content -->

View File

@@ -0,0 +1,43 @@
<?php
/**
* Customer POS refunded order email (initial block version)
*
* This template can be overridden by editing it in the WooCommerce email editor.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Block
* @version 10.5.0
*/
use Automattic\WooCommerce\Internal\EmailEditor\BlockEmailRenderer;
defined( 'ABSPATH' ) || exit;
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentBeforeOpen -- removed to prevent empty new lines.
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentAfterEnd -- removed to prevent empty new lines.
?>
<!-- wp:heading -->
<h2 class="wp-block-heading"><?php
/* translators: %s: Order number */
printf( esc_html__( 'Order refunded: %s', 'woocommerce' ), '<!--[woocommerce/order-number]-->' );
?></h2>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p> <?php echo esc_html__( 'Hi there,', 'woocommerce' ); ?> </p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p> <?php echo esc_html__( 'Heres a reminder of what youve bought:', 'woocommerce' ); ?> </p>
<!-- /wp:paragraph -->
<!-- wp:woocommerce/email-content {"lock":{"move":false,"remove":true}} -->
<div class="wp-block-woocommerce-email-content"> <?php echo esc_html( BlockEmailRenderer::WOO_EMAIL_CONTENT_PLACEHOLDER ); ?> </div>
<!-- /wp:woocommerce/email-content -->

View File

@@ -0,0 +1,54 @@
<?php
/**
* Customer processing order email (initial block version)
*
* This template can be overridden by editing it in the WooCommerce email editor.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Block
* @version 10.5.0
*/
use Automattic\WooCommerce\Internal\EmailEditor\BlockEmailRenderer;
defined( 'ABSPATH' ) || exit;
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentBeforeOpen -- removed to prevent empty new lines.
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentAfterEnd -- removed to prevent empty new lines.
?>
<!-- wp:heading -->
<h2 class="wp-block-heading"> <?php echo esc_html__( 'Thank you for your order', 'woocommerce' ); ?> </h2>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p><?php
/* translators: %s: Customer first name */
printf( esc_html__( 'Hi %s,', 'woocommerce' ), '<!--[woocommerce/customer-first-name]-->' );
?></p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p> <?php echo esc_html__( 'Just to let you know &mdash; weve received your order, and it is now being processed.', 'woocommerce' ); ?> </p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p> <?php echo esc_html__( 'Heres a reminder of what youve ordered:', 'woocommerce' ); ?> </p>
<!-- /wp:paragraph -->
<!-- wp:woocommerce/email-content {"lock":{"move":false,"remove":true}} -->
<div class="wp-block-woocommerce-email-content"> <?php echo esc_html( BlockEmailRenderer::WOO_EMAIL_CONTENT_PLACEHOLDER ); ?> </div>
<!-- /wp:woocommerce/email-content -->
<!-- wp:paragraph -->
<p><?php
/* translators: %s: Store admin email */
printf( esc_html__( 'Thanks again! If you need any help with your order, please contact us at %s,', 'woocommerce' ), '<!--[woocommerce/store-email]-->' );
?></p>
<!-- /wp:paragraph -->

View File

@@ -0,0 +1,60 @@
<?php
/**
* Customer refunded order email (initial block version)
*
* This template can be overridden by editing it in the WooCommerce email editor.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Block
* @version 10.5.0
*/
use Automattic\WooCommerce\Internal\EmailEditor\BlockEmailRenderer;
defined( 'ABSPATH' ) || exit;
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentBeforeOpen -- removed to prevent empty new lines.
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentAfterEnd -- removed to prevent empty new lines.
?>
<!-- wp:heading -->
<h2 class="wp-block-heading"><?php
/* translators: %s: Order number */
printf( esc_html__( 'Order refunded: %s', 'woocommerce' ), '<!--[woocommerce/order-number]-->' );
?></h2>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p><?php
/* translators: %s: Customer first name */
printf( esc_html__( 'Hi %s,', 'woocommerce' ), '<!--[woocommerce/customer-first-name]-->' );
?></p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p><?php
/* translators: %s: Site title */
printf( esc_html__( 'Your order from %s has been refunded.', 'woocommerce' ), '<!--[woocommerce/site-title]-->' );
?></p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p> <?php echo esc_html__( 'Heres a reminder of what youve ordered:', 'woocommerce' ); ?> </p>
<!-- /wp:paragraph -->
<!-- wp:woocommerce/email-content {"lock":{"move":false,"remove":true}} -->
<div class="wp-block-woocommerce-email-content"> <?php echo esc_html( BlockEmailRenderer::WOO_EMAIL_CONTENT_PLACEHOLDER ); ?> </div>
<!-- /wp:woocommerce/email-content -->
<!-- wp:paragraph -->
<p><?php
/* translators: %s: Store admin email */
printf( esc_html__( 'If you need any help with your order, please contact us at %s', 'woocommerce' ), '<!--[woocommerce/store-email]-->' );
?></p>
<!-- /wp:paragraph -->

View File

@@ -0,0 +1,64 @@
<?php
/**
* Customer Reset Password email (initial block version)
*
* This template can be overridden by editing it in the WooCommerce email editor.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Block
* @version 10.5.0
*/
use Automattic\WooCommerce\Internal\EmailEditor\BlockEmailRenderer;
defined( 'ABSPATH' ) || exit;
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentBeforeOpen -- removed to prevent empty new lines.
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentAfterEnd -- removed to prevent empty new lines.
?>
<!-- wp:heading -->
<h2 class="wp-block-heading"> <?php echo esc_html__( 'Reset your password', 'woocommerce' ); ?> </h2>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p><?php
/* translators: %s: Customer username */
printf( esc_html__( 'Hi %s,', 'woocommerce' ), '<!--[woocommerce/customer-username]-->' );
?></p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p><?php
/* translators: %s: Store name */
printf( esc_html__( 'Someone has requested a new password for the following account on %s:', 'woocommerce' ), '<!--[woocommerce/site-title]-->' );
?></p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p><?php
/* translators: %s: Username */
echo wp_kses( sprintf( __( 'Username: <b>%s</b>', 'woocommerce' ), '<!--[woocommerce/customer-username]-->' ), array( 'b' => array() ) );
?></p>
<!-- /wp:paragraph -->
<!-- wp:paragraph -->
<p><?php
echo esc_html__( 'If you didnt make this request, just ignore this email. If youd like to proceed, reset your password via the link below:', 'woocommerce' );
?></p>
<!-- /wp:paragraph -->
<!-- wp:woocommerce/email-content {"lock":{"move":false,"remove":true}} -->
<div class="wp-block-woocommerce-email-content"> <?php echo esc_html( BlockEmailRenderer::WOO_EMAIL_CONTENT_PLACEHOLDER ); ?> </div>
<!-- /wp:woocommerce/email-content -->
<!-- wp:paragraph -->
<p> <?php echo esc_html__( 'Thanks for reading.', 'woocommerce' ); ?> </p>
<!-- /wp:paragraph -->

View File

@@ -0,0 +1,45 @@
<?php
/**
* This is the default block content for the WooCommerce email editor.
*
* We show this when the plugin/theme developer has not provided a custom template.
*
* New block initial content should be placed in yourtheme/woocommerce/emails/block/email-id.php.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Block
* @version 10.2.0
*/
use Automattic\WooCommerce\Internal\EmailEditor\BlockEmailRenderer;
defined( 'ABSPATH' ) || exit;
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentBeforeOpen -- removed to prevent empty new lines.
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentAfterEnd -- removed to prevent empty new lines.
?>
<!-- wp:heading -->
<h2 class="wp-block-heading"><?php
esc_html_e( 'Default block content', 'woocommerce' );
?></h2>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p><?php
/* translators: %s: Customer first name */
printf( esc_html__( 'Hi %s,', 'woocommerce' ), '<!--[woocommerce/customer-first-name]-->' );
?></p>
<!-- /wp:paragraph -->
<!-- wp:woocommerce/email-content {"lock":{"move":false,"remove":true}} -->
<div class="wp-block-woocommerce-email-content"> <?php echo esc_html( BlockEmailRenderer::WOO_EMAIL_CONTENT_PLACEHOLDER ); ?> </div>
<!-- /wp:woocommerce/email-content -->
<!-- wp:paragraph -->
<p><?php
/* translators: %s: Store admin email */
printf( esc_html__( 'Thanks again! If you need any help with your order, please contact us at %s.', 'woocommerce' ), '<!--[woocommerce/store-email]-->' );
?></p>
<!-- /wp:paragraph -->

View File

@@ -0,0 +1,63 @@
<?php
/**
* General block content for fulfillment emails
*
* Note: This template is only used in the fulfillment emails.
*
* Used to render information for the email editor WooCommerce content block (BlockEmailRenderer::WOO_EMAIL_CONTENT_PLACEHOLDER).
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Block
* @version 10.5.0
*/
defined( 'ABSPATH' ) || exit;
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentBeforeOpen -- removed to prevent empty new lines.
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentAfterEnd -- removed to prevent empty new lines.
if ( ! isset( $order, $fulfillment ) ) {
return;
}
/**
* Hook for the woocommerce_email_fulfillment_details.
*
* @since 10.1.0
* @param WC_Order $order The order object.
* @param Fulfillment $fulfillment The fulfillment object.
* @param bool $sent_to_admin Whether the email is sent to admin.
* @param bool $plain_text Whether the email is plain text.
* @param WC_Email $email The email object.
*
* @hooked WC_Emails::fulfillment_details() Shows the fulfillment details.
*/
do_action( 'woocommerce_email_fulfillment_details', $order, $fulfillment, $sent_to_admin, $plain_text, $email );
/**
* Hook for the woocommerce_email_fulfillment_meta.
*
* @param WC_Order $order The order object.
* @param Fulfillment $fulfillment The fulfillment object.
* @param bool $sent_to_admin Whether the email is sent to admin.
* @param bool $plain_text Whether the email is plain text.
* @param WC_Email $email The email object.
* @since 10.1.0
*
* @hooked WC_Emails::order_meta() Shows fulfillment meta data.
*/
do_action( 'woocommerce_email_fulfillment_meta', $order, $fulfillment, $sent_to_admin, $plain_text, $email );
/**
* Hook for woocommerce_email_customer_details.
*
* @param WC_Order $order The order object.
* @param bool $sent_to_admin Whether the email is sent to admin.
* @param bool $plain_text Whether the email is plain text.
* @param WC_Email $email The email object.
* @since 2.5.0
*
* @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 );

View File

@@ -0,0 +1,201 @@
<?php
/**
* General block email
*
* Used to render information for the email editor WooCommerce content block (BlockEmailRenderer::WOO_EMAIL_CONTENT_PLACEHOLDER).
*
* The dynamic content part of the block can be placed here.
* Examples include:
*
* 1. Content with a lot of conditional logic
* 2. Content that can not be generated by personalization tags
* 3. Content for specific emails that does not include the typical WooCommerce order details
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Block
* @version 10.5.0
*/
defined( 'ABSPATH' ) || exit;
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentBeforeOpen -- removed to prevent empty new lines.
// phpcs:disable Squiz.PHP.EmbeddedPhp.ContentAfterEnd -- removed to prevent empty new lines.
use Automattic\WooCommerce\Enums\OrderStatus;
use Automattic\WooCommerce\Internal\Settings\PointOfSaleDefaultSettings;
if ( 'customer_invoice' === $email->id ) :
// Customer invoice email
// We are keeping this here until we have a better way to handle conditional content in the email editor.
?>
<?php if ( $order->needs_payment() ) { ?>
<p><?php
if ( $order->has_status( OrderStatus::FAILED ) ) {
printf(
wp_kses(
/* translators: %1$s Site title, %2$s Order pay link */
__( 'Sorry, your order on %1$s was unsuccessful. Your order details are below, with a link to try your payment again: %2$s', 'woocommerce' ),
array(
'a' => array(
'href' => array(),
),
)
),
esc_html( get_bloginfo( 'name', 'display' ) ),
'<a href="' . esc_url( $order->get_checkout_payment_url() ) . '">' . esc_html__( 'Pay for this order', 'woocommerce' ) . '</a>'
);
} else {
printf(
wp_kses(
/* translators: %1$s Site title, %2$s Order pay link */
__( 'An order has been created for you on %1$s. Your order details are below, with a link to make payment when youre ready: %2$s', 'woocommerce' ),
array(
'a' => array(
'href' => array(),
),
)
),
esc_html( get_bloginfo( 'name', 'display' ) ),
'<a href="' . esc_url( $order->get_checkout_payment_url() ) . '">' . esc_html__( 'Pay for this order', 'woocommerce' ) . '</a>'
);
}
?></p>
<?php } else { ?>
<p><?php
/* translators: %s Order date */
printf( esc_html__( 'Here are the details of your order placed on %s:', 'woocommerce' ), esc_html( wc_format_datetime( $order->get_date_created() ) ) );
?></p>
<?php
}
endif;
if ( 'customer_new_account' === $email->id ) :
?>
<?php if ( $set_password_url ) : ?>
<p><a href="<?php echo esc_attr( $set_password_url ); ?>"><?php printf( esc_html__( 'Set your new password.', 'woocommerce' ) ); ?></a></p>
<?php
endif;
endif;
if ( 'customer_reset_password' === $email->id && isset( $reset_key, $user_id ) ) :
// Customer reset password email.
?>
<p>
<a class="link" href="<?php echo esc_url( add_query_arg( array( 'key' => $reset_key, 'id' => $user_id, 'login' => rawurlencode( $user_login ) ), wc_get_endpoint_url( 'lost-password', '', wc_get_page_permalink( 'myaccount' ) ) ) ); ?>"><?php // phpcs:ignore WordPress.Arrays.ArrayDeclarationSpacing.AssociativeArrayFound ?>
<?php esc_html_e( 'Reset your password', 'woocommerce' ); ?>
</a>
</p>
<?php
endif;
/**
* Action hook for email classes to hook into the general block email template.
*
* @since 10.5.0
* @param bool $sent_to_admin Whether the email is being sent to admin.
* @param bool $plain_text Whether the email is being sent as plain text.
* @param WC_Email $email The email object.
*/
do_action( 'woocommerce_email_general_block_content', $sent_to_admin, $plain_text, $email );
/**
* Filter the list of email IDs that should not display order details.
*
* @since 10.5.0
* @param array $emails_without_order_details Array of email IDs that should not display order details.
*/
$emails_without_order_details = apply_filters( 'woocommerce_emails_general_block_content_emails_without_order_details', array() );
$accounts_related_emails = array(
'customer_reset_password',
'customer_new_account',
);
$emails_without_order_details = array_merge( $emails_without_order_details ?? array(), $accounts_related_emails );
if ( isset( $order ) && ! in_array( $email->id, $emails_without_order_details, true ) ) {
/**
* Woocommerce_email_order_details
*
* @hooked WC_Emails::order_details() Shows the order details table.
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
* @since 2.5.0
*/
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
/**
* Woocommerce_email_order_meta
*
* @hooked WC_Emails::order_meta() Shows order meta data.
* @since 2.0.17
*/
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
/**
* Woocommerce_email_customer_details
*
* @hooked WC_Emails::customer_details() Shows customer details
* @hooked WC_Emails::email_address() Shows email address
* @since 2.5.0
*/
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
}
if ( 'customer_pos_completed_order' === $email->id || 'customer_pos_refunded_order' === $email->id ) :
if ( ! empty( get_option( 'woocommerce_pos_store_email', PointOfSaleDefaultSettings::get_default_store_email() ) )
|| ! empty( get_option( 'woocommerce_pos_store_phone' ) )
|| ! empty( get_option( 'woocommerce_pos_store_address', PointOfSaleDefaultSettings::get_default_store_address() ) ) ) :
?>
<!-- wp:group -->
<div class="wp-block-group">
<?php if ( ! empty( get_option( 'woocommerce_pos_store_name', PointOfSaleDefaultSettings::get_default_store_name() ) ) ) : ?>
<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading"><?php echo esc_html( get_option( 'woocommerce_pos_store_name', PointOfSaleDefaultSettings::get_default_store_name() ) ); ?></h3>
<!-- /wp:heading -->
<?php else : ?>
<!-- wp:heading {"level":3} -->
<h3 class="wp-block-heading"><?php echo esc_html__( 'Store Information', 'woocommerce' ); ?></h3>
<!-- /wp:heading -->
<?php endif; ?>
<?php if ( ! empty( get_option( 'woocommerce_pos_store_email', PointOfSaleDefaultSettings::get_default_store_email() ) ) ) : ?>
<!-- wp:paragraph -->
<p><?php echo esc_html( get_option( 'woocommerce_pos_store_email', PointOfSaleDefaultSettings::get_default_store_email() ) ); ?></p>
<!-- /wp:paragraph -->
<?php endif; ?>
<?php if ( ! empty( get_option( 'woocommerce_pos_store_phone' ) ) ) : ?>
<!-- wp:paragraph -->
<p><?php echo esc_html( get_option( 'woocommerce_pos_store_phone' ) ); ?></p>
<!-- /wp:paragraph -->
<?php endif; ?>
<?php if ( ! empty( get_option( 'woocommerce_pos_store_address', PointOfSaleDefaultSettings::get_default_store_address() ) ) ) : ?>
<!-- wp:paragraph -->
<p><?php echo esc_html( get_option( 'woocommerce_pos_store_address', PointOfSaleDefaultSettings::get_default_store_address() ) ); ?></p>
<!-- /wp:paragraph -->
<?php endif; ?>
</div>
<!-- /wp:group -->
<?php
endif;
if ( ! empty( get_option( 'woocommerce_pos_refund_returns_policy' ) ) ) :
?>
<!-- wp:group -->
<div class="wp-block-group">
<!-- wp:heading {"level":3} -->
<h3><?php echo esc_html__( 'Refund & Returns Policy', 'woocommerce' ); ?></h3>
<!-- /wp:heading -->
<!-- wp:paragraph -->
<p><?php echo esc_html( get_option( 'woocommerce_pos_refund_returns_policy' ) ); ?></p>
<!-- /wp:paragraph -->
</div>
<!-- /wp:group -->
<?php
endif;
endif;

View File

@@ -0,0 +1,89 @@
<?php
/**
* Customer cancelled order email
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-cancelled-order.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails
* @version 10.4.0
*/
use Automattic\WooCommerce\Utilities\FeaturesUtil;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
/**
* Hook: woocommerce_email_header.
*
* @hooked WC_Emails::email_header() Output the email header
* @since 2.5.0
*/
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
<?php
echo $email_improvements_enabled ? '<div class="email-introduction">' : '';
/* translators: %1$s: Order number */
$text = __( 'Were sorry to let you know that your order #%1$s has been cancelled.', 'woocommerce' );
if ( $email_improvements_enabled ) {
/* translators: %1$s: Order number */
$text = __( 'Were getting in touch to let you know that your order #%1$s has been cancelled.', 'woocommerce' );
}
?>
<p><?php printf( esc_html( $text ), esc_html( $order->get_order_number() ) ); ?></p>
<?php echo $email_improvements_enabled ? '</div>' : ''; ?>
<?php
/**
* Hook: woocommerce_email_order_details.
*
* @hooked WC_Emails::order_details() Shows the order details table.
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
* @since 2.5.0
*/
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
/**
* Hook: woocommerce_email_order_meta.
*
* @hooked WC_Emails::order_meta() Shows order meta data.
* @since 2.5.0
*/
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
/**
* Hook: woocommerce_email_customer_details.
*
* @hooked WC_Emails::customer_details() Shows customer details
* @hooked WC_Emails::email_address() Shows email address
* @since 2.5.0
*/
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo $email_improvements_enabled ? '<table border="0" cellpadding="0" cellspacing="0" width="100%" role="presentation"><tr><td class="email-additional-content">' : '';
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
echo $email_improvements_enabled ? '</td></tr></table>' : '';
}
/**
* Hook: woocommerce_email_footer.
*
* @hooked WC_Emails::email_footer() Output the email footer
* @since 2.5.0
*/
do_action( 'woocommerce_email_footer', $email );

View File

@@ -0,0 +1,81 @@
<?php
/**
* Customer completed order email
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-completed-order.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails
* @version 10.4.0
*/
use Automattic\WooCommerce\Utilities\FeaturesUtil;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
/*
* @hooked WC_Emails::email_header() Output the email header
*/
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
<?php echo $email_improvements_enabled ? '<div class="email-introduction">' : ''; ?>
<p>
<?php
if ( ! empty( $order->get_billing_first_name() ) ) {
/* translators: %s: Customer first name */
printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) );
} else {
printf( esc_html__( 'Hi,', 'woocommerce' ) );
}
?>
</p>
<p><?php esc_html_e( 'We have finished processing your order.', 'woocommerce' ); ?></p>
<?php if ( $email_improvements_enabled ) : ?>
<p><?php esc_html_e( 'Heres a reminder of what youve ordered:', 'woocommerce' ); ?></p>
<?php endif; ?>
<?php echo $email_improvements_enabled ? '</div>' : ''; ?>
<?php
/*
* @hooked WC_Emails::order_details() Shows the order details table.
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
* @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 );
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo $email_improvements_enabled ? '<table border="0" cellpadding="0" cellspacing="0" width="100%" role="presentation"><tr><td class="email-additional-content">' : '';
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
echo $email_improvements_enabled ? '</td></tr></table>' : '';
}
/*
* @hooked WC_Emails::email_footer() Output the email footer
*/
do_action( 'woocommerce_email_footer', $email );

View File

@@ -0,0 +1,94 @@
<?php
/**
* Customer failed order email
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-failed-order.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails
* @version 10.4.0
*/
use Automattic\WooCommerce\Utilities\FeaturesUtil;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
/**
* Hook for the woocommerce_email_header.
*
* @hooked WC_Emails::email_header() Output the email header
* @since 3.7.0
*/
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
<?php echo $email_improvements_enabled ? '<div class="email-introduction">' : ''; ?>
<p>
<?php
if ( ! empty( $order->get_billing_first_name() ) ) {
/* translators: %s: Customer first name */
printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) );
} else {
printf( esc_html__( 'Hi,', 'woocommerce' ) );
}
?>
</p>
<p><?php esc_html_e( "Unfortunately, we couldn't complete your order due to an issue with your payment method.", 'woocommerce' ); ?></p>
<?php /* translators: %s: Site title */ ?>
<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>
<p><?php esc_html_e( 'Your order details are as follows:', 'woocommerce' ); ?></p>
<?php echo $email_improvements_enabled ? '</div>' : ''; ?>
<?php
/**
* Hook for the woocommerce_email_order_details.
*
* @hooked WC_Emails::order_details() Shows the order details table.
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
* @since 2.5.0
*/
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
/**
* Hook for the woocommerce_email_order_meta.
*
* @hooked WC_Emails::order_meta() Shows order meta data.
* @since 1.0.0
*/
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
/**
* Hook for woocommerce_email_customer_details.
*
* @hooked WC_Emails::customer_details() Shows customer details
* @hooked WC_Emails::email_address() Shows email address
* @since 1.0.0
*/
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo $email_improvements_enabled ? '<table border="0" cellpadding="0" cellspacing="0" width="100%" role="presentation"><tr><td class="email-additional-content">' : '';
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
echo $email_improvements_enabled ? '</td></tr></table>' : '';
}
/**
* Hook for the woocommerce_email_footer.
*
* @hooked WC_Emails::email_footer() Output the email footer
* @since 3.7.0
*/
do_action( 'woocommerce_email_footer', $email );

View File

@@ -0,0 +1,96 @@
<?php
/**
* Customer fulfillment created email
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-fulfillment-created.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\HTML
* @version 10.4.0
*/
defined( 'ABSPATH' ) || exit;
/**
* Hook for the woocommerce_email_header.
*
* @param string $email_heading The email heading.
* @param WC_Email $email The email object.
* @since 2.5.0
*
* @hooked WC_Emails::email_header() Output the email header
*/
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
<div class="email-introduction">
<p><?php echo esc_html__( 'Woo! Some items you purchased are being fulfilled. You can use the below information to track your shipment:', 'woocommerce' ); ?></p>
</div>
<?php
/**
* Hook for the woocommerce_email_fulfillment_details.
*
* @since 10.1.0
* @param WC_Order $order The order object.
* @param Fulfillment $fulfillment The fulfillment object.
* @param bool $sent_to_admin Whether the email is sent to admin.
* @param bool $plain_text Whether the email is plain text.
* @param WC_Email $email The email object.
*
* @hooked WC_Emails::fulfillment_details() Shows the fulfillment details.
*/
do_action( 'woocommerce_email_fulfillment_details', $order, $fulfillment, $sent_to_admin, $plain_text, $email );
/**
* Hook for the woocommerce_email_fulfillment_meta.
*
* @param WC_Order $order The order object.
* @param Fulfillment $fulfillment The fulfillment object.
* @param bool $sent_to_admin Whether the email is sent to admin.
* @param bool $plain_text Whether the email is plain text.
* @param WC_Email $email The email object.
* @since 10.1.0
*
* @hooked WC_Emails::order_meta() Shows fulfillment meta data.
*/
do_action( 'woocommerce_email_fulfillment_meta', $order, $fulfillment, $sent_to_admin, $plain_text, $email );
/**
* Hook for woocommerce_email_customer_details.
*
* @param WC_Order $order The order object.
* @param bool $sent_to_admin Whether the email is sent to admin.
* @param bool $plain_text Whether the email is plain text.
* @param WC_Email $email The email object.
* @since 2.5.0
*
* @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 );
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo '<table border="0" cellpadding="0" cellspacing="0" width="100%" role="presentation"><tr><td class="email-additional-content">';
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
echo '</td></tr></table>';
}
/**
* Hook for the woocommerce_email_footer.
*
* @param WC_Email $email The email object.
* @since 2.5.0
*
* @hooked WC_Emails::email_footer() Output the email footer
*/
do_action( 'woocommerce_email_footer', $email );

View File

@@ -0,0 +1,96 @@
<?php
/**
* Customer fulfillment deleted email
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-fulfillment-deleted.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\HTML
* @version 10.4.0
*/
defined( 'ABSPATH' ) || exit;
/**
* Hook for the woocommerce_email_header.
*
* @param string $email_heading The email heading.
* @param WC_Email $email The email object.
* @since 2.5.0
*
* @hooked WC_Emails::email_header() Output the email header
*/
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
<div class="email-introduction">
<p><?php echo esc_html__( 'We wanted to let you know that one of the previously fulfilled shipments from your order has been removed from our system. This may have been due to a correction or an update in our fulfillment records. Dont worry — this wont affect any items youve already received.', 'woocommerce' ); ?></p>
</div>
<?php
/**
* Hook for the woocommerce_email_fulfillment_details.
*
* @since 10.1.0
* @param WC_Order $order The order object.
* @param Fulfillment $fulfillment The fulfillment object.
* @param bool $sent_to_admin Whether the email is sent to admin.
* @param bool $plain_text Whether the email is plain text.
* @param WC_Email $email The email object.
*
* @hooked WC_Emails::fulfillment_details() Shows the fulfillment details.
*/
do_action( 'woocommerce_email_fulfillment_details', $order, $fulfillment, $sent_to_admin, $plain_text, $email );
/**
* Hook for the woocommerce_email_fulfillment_meta.
*
* @param WC_Order $order The order object.
* @param Fulfillment $fulfillment The fulfillment object.
* @param bool $sent_to_admin Whether the email is sent to admin.
* @param bool $plain_text Whether the email is plain text.
* @param WC_Email $email The email object.
* @since 10.1.0
*
* @hooked WC_Emails::order_meta() Shows fulfillment meta data.
*/
do_action( 'woocommerce_email_fulfillment_meta', $order, $fulfillment, $sent_to_admin, $plain_text, $email );
/**
* Hook for woocommerce_email_customer_details.
*
* @param WC_Order $order The order object.
* @param bool $sent_to_admin Whether the email is sent to admin.
* @param bool $plain_text Whether the email is plain text.
* @param WC_Email $email The email object.
* @since 2.5.0
*
* @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 );
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo '<table border="0" cellpadding="0" cellspacing="0" width="100%" role="presentation"><tr><td class="email-additional-content">';
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
echo '</td></tr></table>';
}
/**
* Hook for the woocommerce_email_footer.
*
* @param WC_Email $email The email object.
* @since 2.5.0
*
* @hooked WC_Emails::email_footer() Output the email footer
*/
do_action( 'woocommerce_email_footer', $email );

View File

@@ -0,0 +1,97 @@
<?php
/**
* Customer fulfillment updated email
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-fulfillment-updated.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\HTML
* @version 10.4.0
*/
defined( 'ABSPATH' ) || exit;
/**
* Hook for the woocommerce_email_header.
*
* @param string $email_heading The email heading.
* @param WC_Email $email The email object.
* @since 2.5.0
*
* @hooked WC_Emails::email_header() Output the email header
*/
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
<div class="email-introduction">
<p><?php echo esc_html__( 'Some details of your shipment have recently been updated. This may include tracking information, item contents, or delivery status.', 'woocommerce' ); ?></p>
<p><?php echo esc_html__( 'Heres the latest info we have:', 'woocommerce' ); ?></p>
</div>
<?php
/**
* Hook for the woocommerce_email_fulfillment_details.
*
* @since 10.1.0
* @param WC_Order $order The order object.
* @param Fulfillment $fulfillment The fulfillment object.
* @param bool $sent_to_admin Whether the email is sent to admin.
* @param bool $plain_text Whether the email is plain text.
* @param WC_Email $email The email object.
*
* @hooked WC_Emails::fulfillment_details() Shows the fulfillment details.
*/
do_action( 'woocommerce_email_fulfillment_details', $order, $fulfillment, $sent_to_admin, $plain_text, $email );
/**
* Hook for the woocommerce_email_fulfillment_meta.
*
* @param WC_Order $order The order object.
* @param Fulfillment $fulfillment The fulfillment object.
* @param bool $sent_to_admin Whether the email is sent to admin.
* @param bool $plain_text Whether the email is plain text.
* @param WC_Email $email The email object.
* @since 10.1.0
*
* @hooked WC_Emails::order_meta() Shows fulfillment meta data.
*/
do_action( 'woocommerce_email_fulfillment_meta', $order, $fulfillment, $sent_to_admin, $plain_text, $email );
/**
* Hook for woocommerce_email_customer_details.
*
* @param WC_Order $order The order object.
* @param bool $sent_to_admin Whether the email is sent to admin.
* @param bool $plain_text Whether the email is plain text.
* @param WC_Email $email The email object.
* @since 2.5.0
*
* @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 );
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo '<table border="0" cellpadding="0" cellspacing="0" width="100%" role="presentation"><tr><td class="email-additional-content">';
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
echo '</td></tr></table>';
}
/**
* Hook for the woocommerce_email_footer.
*
* @param WC_Email $email The email object.
* @since 2.5.0
*
* @hooked WC_Emails::email_footer() Output the email footer
*/
do_action( 'woocommerce_email_footer', $email );

View File

@@ -0,0 +1,133 @@
<?php
/**
* Customer invoice email
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-invoice.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails
* @version 10.4.0
*/
use Automattic\WooCommerce\Enums\OrderStatus;
use Automattic\WooCommerce\Utilities\FeaturesUtil;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
/**
* Executes the e-mail header.
*
* @hooked WC_Emails::email_header() Output the email header
*/
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
<?php echo $email_improvements_enabled ? '<div class="email-introduction">' : ''; ?>
<p>
<?php
if ( ! empty( $order->get_billing_first_name() ) ) {
/* translators: %s: Customer first name */
printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) );
} else {
printf( esc_html__( 'Hi,', 'woocommerce' ) );
}
?>
</p>
<?php if ( $order->needs_payment() ) { ?>
<p>
<?php
if ( $order->has_status( OrderStatus::FAILED ) ) {
printf(
wp_kses(
/* translators: %1$s Site title, %2$s Order pay link */
__( 'Sorry, your order on %1$s was unsuccessful. Your order details are below, with a link to try your payment again: %2$s', 'woocommerce' ),
array(
'a' => array(
'href' => array(),
),
)
),
esc_html( get_bloginfo( 'name', 'display' ) ),
'<a href="' . esc_url( $order->get_checkout_payment_url() ) . '">' . esc_html__( 'Pay for this order', 'woocommerce' ) . '</a>'
);
} else {
printf(
wp_kses(
/* translators: %1$s Site title, %2$s Order pay link */
__( 'An order has been created for you on %1$s. Your order details are below, with a link to make payment when youre ready: %2$s', 'woocommerce' ),
array(
'a' => array(
'href' => array(),
),
)
),
esc_html( get_bloginfo( 'name', 'display' ) ),
'<a href="' . esc_url( $order->get_checkout_payment_url() ) . '">' . esc_html__( 'Pay for this order', 'woocommerce' ) . '</a>'
);
}
?>
</p>
<?php } else { ?>
<p>
<?php
/* translators: %s Order date */
printf( esc_html__( 'Here are the details of your order placed on %s:', 'woocommerce' ), esc_html( wc_format_datetime( $order->get_date_created() ) ) );
?>
</p>
<?php
}
?>
<?php echo $email_improvements_enabled ? '</div>' : ''; ?>
<?php
/**
* Hook for the woocommerce_email_order_details.
*
* @hooked WC_Emails::order_details() Shows the order details table.
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
* @since 2.5.0
*/
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
/**
* Hook for the woocommerce_email_order_meta.
*
* @hooked WC_Emails::order_meta() Shows order meta data.
*/
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
/**
* Hook for woocommerce_email_customer_details.
*
* @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 );
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo $email_improvements_enabled ? '<table border="0" cellpadding="0" cellspacing="0" width="100%" role="presentation"><tr><td class="email-additional-content">' : '';
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
echo $email_improvements_enabled ? '</td></tr></table>' : '';
}
/**
* Executes the email footer.
*
* @hooked WC_Emails::email_footer() Output the email footer
*/
do_action( 'woocommerce_email_footer', $email );

View File

@@ -0,0 +1,76 @@
<?php
/**
* Customer new account email
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-new-account.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails
* @version 10.4.0
*/
use Automattic\WooCommerce\Utilities\FeaturesUtil;
defined( 'ABSPATH' ) || exit;
$email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
/**
* Fires to output the email header.
*
* @hooked WC_Emails::email_header()
*
* @since 3.7.0
*/
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
<?php echo $email_improvements_enabled ? '<div class="email-introduction">' : ''; ?>
<?php /* translators: %s: Customer username */ ?>
<p><?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $user_login ) ); ?></p>
<?php if ( $email_improvements_enabled ) : ?>
<?php /* translators: %s: Site title */ ?>
<p><?php printf( esc_html__( 'Thanks for creating an account on %s. Heres a copy of your user details.', 'woocommerce' ), esc_html( $blogname ) ); ?></p>
<div class="hr hr-top"></div>
<?php /* translators: %s: Username */ ?>
<p><?php echo wp_kses( sprintf( __( 'Username: <b>%s</b>', 'woocommerce' ), esc_html( $user_login ) ), array( 'b' => array() ) ); ?></p>
<?php if ( $password_generated && $set_password_url ) : ?>
<?php // If the password has not been set by the user during the sign up process, send them a link to set a new password. ?>
<p><a href="<?php echo esc_attr( $set_password_url ); ?>"><?php printf( esc_html__( 'Set your new password.', 'woocommerce' ) ); ?></a></p>
<?php endif; ?>
<div class="hr hr-bottom"></div>
<p><?php echo esc_html__( 'You can access your account area to view orders, change your password, and more via the link below:', 'woocommerce' ); ?></p>
<p><a href="<?php echo esc_attr( wc_get_page_permalink( 'myaccount' ) ); ?>"><?php printf( esc_html__( 'My account', 'woocommerce' ) ); ?></a></p>
<?php else : ?>
<?php /* translators: %1$s: Site title, %2$s: Username, %3$s: My account link */ ?>
<p><?php printf( esc_html__( 'Thanks for creating an account on %1$s. Your username is %2$s. You can access your account area to view orders, change your password, and more at: %3$s', 'woocommerce' ), esc_html( $blogname ), '<strong>' . esc_html( $user_login ) . '</strong>', make_clickable( esc_url( wc_get_page_permalink( 'myaccount' ) ) ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
<?php if ( $password_generated && $set_password_url ) : ?>
<?php // If the password has not been set by the user during the sign up process, send them a link to set a new password. ?>
<p><a href="<?php echo esc_attr( $set_password_url ); ?>"><?php printf( esc_html__( 'Click here to set your new password.', 'woocommerce' ) ); ?></a></p>
<?php endif; ?>
<?php endif; ?>
<?php echo $email_improvements_enabled ? '</div>' : ''; ?>
<?php
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo $email_improvements_enabled ? '<table border="0" cellpadding="0" cellspacing="0" width="100%" role="presentation"><tr><td class="email-additional-content email-additional-content-aligned">' : '';
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
echo $email_improvements_enabled ? '</td></tr></table>' : '';
}
/**
* Fires to output the email footer.
*
* @hooked WC_Emails::email_footer()
*
* @since 3.7.0
*/
do_action( 'woocommerce_email_footer', $email );

View File

@@ -0,0 +1,87 @@
<?php
/**
* Customer note email
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-note.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails
* @version 10.4.0
*/
use Automattic\WooCommerce\Utilities\FeaturesUtil;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
/*
* @hooked WC_Emails::email_header() Output the email header
*/
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
<?php echo $email_improvements_enabled ? '<div class="email-introduction">' : ''; ?>
<p>
<?php
if ( ! empty( $order->get_billing_first_name() ) ) {
/* translators: %s: Customer first name */
printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) );
} else {
printf( esc_html__( 'Hi,', 'woocommerce' ) );
}
?>
</p>
<p><?php esc_html_e( 'The following note has been added to your order:', 'woocommerce' ); ?></p>
<blockquote>
<?php
$safe_note = wc_wptexturize_order_note( $customer_note );
echo wpautop( make_clickable( $safe_note ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
?>
</blockquote>
<p><?php esc_html_e( 'As a reminder, here are your order details:', 'woocommerce' ); ?></p>
<?php echo $email_improvements_enabled ? '</div>' : ''; ?>
<?php
/*
* @hooked WC_Emails::order_details() Shows the order details table.
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
* @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 );
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo $email_improvements_enabled ? '<table border="0" cellpadding="0" cellspacing="0" width="100%" role="presentation"><tr><td class="email-additional-content">' : '';
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
echo $email_improvements_enabled ? '</td></tr></table>' : '';
}
/*
* @hooked WC_Emails::email_footer() Output the email footer
*/
do_action( 'woocommerce_email_footer', $email );

View File

@@ -0,0 +1,81 @@
<?php
/**
* Customer on-hold order email
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-on-hold-order.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails
* @version 10.4.0
*/
use Automattic\WooCommerce\Utilities\FeaturesUtil;
defined( 'ABSPATH' ) || exit;
$email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
/*
* @hooked WC_Emails::email_header() Output the email header
*/
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
<?php echo $email_improvements_enabled ? '<div class="email-introduction">' : ''; ?>
<p>
<?php
if ( ! empty( $order->get_billing_first_name() ) ) {
/* translators: %s: Customer first name */
printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) );
} else {
printf( esc_html__( 'Hi,', 'woocommerce' ) );
}
?>
</p>
<?php if ( $email_improvements_enabled ) : ?>
<p><?php esc_html_e( 'Weve received your order and its currently on hold until we can confirm your payment has been processed.', 'woocommerce' ); ?></p>
<p><?php esc_html_e( 'Heres a reminder of what youve ordered:', 'woocommerce' ); ?></p>
<?php else : ?>
<p><?php esc_html_e( 'Thanks for your order. Its on-hold until we confirm that payment has been received.', 'woocommerce' ); ?></p>
<?php endif; ?>
<?php echo $email_improvements_enabled ? '</div>' : ''; ?>
<?php
/*
* @hooked WC_Emails::order_details() Shows the order details table.
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
* @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 );
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo $email_improvements_enabled ? '<table border="0" cellpadding="0" cellspacing="0" width="100%" role="presentation"><tr><td class="email-additional-content">' : '';
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
echo $email_improvements_enabled ? '</td></tr></table>' : '';
}
/*
* @hooked WC_Emails::email_footer() Output the email footer
*/
do_action( 'woocommerce_email_footer', $email );

View File

@@ -0,0 +1,122 @@
<?php
/**
* Customer POS completed order email
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-pos-completed-order.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails
* @version 10.4.0
*/
use Automattic\WooCommerce\Utilities\FeaturesUtil;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
/**
* Hook for the woocommerce_email_header.
*
* @hooked WC_Email_Customer_POS_*::email_header() Output the email header
* @since 10.0.0
*/
do_action( 'woocommerce_pos_email_header', $email_heading, $email ); ?>
<div class="email-introduction">
<p>
<?php
if ( ! empty( $order->get_billing_first_name() ) ) {
/* translators: %s: Customer first name */
printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) );
} else {
printf( esc_html__( 'Hi there,', 'woocommerce' ) );
}
?>
</p>
<p><?php esc_html_e( 'Heres a reminder of what youve bought:', 'woocommerce' ); ?></p>
</div>
<?php
/**
* Show order details.
*
* @hooked WC_Emails::order_details() Shows the order details table.
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
* @since 2.5.0
*/
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
/**
* Show order meta data.
*
* @hooked WC_Emails::order_meta() Shows order meta data.
* @since 1.0.0
*/
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
/**
* Show customer details and email address.
*
* @hooked WC_Emails::customer_details() Shows customer details
* @hooked WC_Emails::email_address() Shows email address
* @since 1.0.0
*/
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo $email_improvements_enabled ? '<table border="0" cellpadding="0" cellspacing="0" width="100%" role="presentation"><tr><td class="email-additional-content">' : '';
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
echo $email_improvements_enabled ? '</td></tr></table>' : '';
}
/**
* Show store information - store details are set in the Point of Sale settings.
*/
if ( ! empty( $pos_store_email ) || ! empty( $pos_store_phone_number ) || ! empty( $pos_store_address ) ) {
echo '<div class="pos-store-information">';
if ( ! empty( $pos_store_name ) ) {
echo '<h2>' . esc_html( $pos_store_name ) . '</h2>';
}
if ( ! empty( $pos_store_email ) ) {
echo '<p>' . esc_html( $pos_store_email ) . '</p>';
}
if ( ! empty( $pos_store_phone_number ) ) {
echo '<p>' . esc_html( $pos_store_phone_number ) . '</p>';
}
if ( ! empty( $pos_store_address ) ) {
echo wp_kses_post( wpautop( wptexturize( $pos_store_address ) ) );
}
echo '</div>';
}
/**
* Show refund & returns policy - this is set in the Point of Sale settings.
*/
if ( ! empty( $pos_refund_returns_policy ) ) {
echo '<div class="refund-returns-policy">';
echo '<h2>' . esc_html__( 'Refund & Returns Policy', 'woocommerce' ) . '</h2>';
echo wp_kses_post( wpautop( wptexturize( $pos_refund_returns_policy ) ) );
echo '</div>';
}
/**
* Output the email footer
*
* @hooked WC_Email_Customer_POS_*::email_footer() Output the email footer
* @since 10.0.0
*/
do_action( 'woocommerce_pos_email_footer', $email );

View File

@@ -0,0 +1,133 @@
<?php
/**
* Customer POS refunded order email
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-pos-refunded-order.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails
* @version 10.4.0
*/
use Automattic\WooCommerce\Utilities\FeaturesUtil;
defined( 'ABSPATH' ) || exit;
$email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
/**
* Hook for the woocommerce_email_header.
*
* @hooked WC_Email_Customer_POS_*::email_header() Output the email header
* @since 10.0.0
*/
do_action( 'woocommerce_pos_email_header', $email_heading, $email ); ?>
<div class="email-introduction">
<p>
<?php
if ( ! empty( $order->get_billing_first_name() ) ) {
/* translators: %s: Customer first name */
printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) );
} else {
printf( esc_html__( 'Hi there,', 'woocommerce' ) );
}
?>
</p>
<p>
<?php
if ( $partial_refund ) {
/* translators: %s: Site title */
echo sprintf( esc_html__( 'Your order from %s has been partially refunded.', 'woocommerce' ), esc_html( $pos_store_name ) ) . "\n\n";
} else {
/* translators: %s: Site title */
echo sprintf( esc_html__( 'Your order from %s has been refunded.', 'woocommerce' ), esc_html( $pos_store_name ) ) . "\n\n";
}
echo '</p><p>';
echo esc_html__( 'Heres a reminder of what youve bought:', 'woocommerce' ) . "\n\n";
?>
</p>
</div>
<?php
/**
* Show order details.
*
* @hooked WC_Emails::order_details() Shows the order details table.
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
* @since 2.5.0
*/
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
/**
* Show order meta data.
*
* @hooked WC_Emails::order_meta() Shows order meta data.
* @since 1.0.0
*/
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
/**
* Show customer details and email address.
*
* @hooked WC_Emails::customer_details() Shows customer details
* @hooked WC_Emails::email_address() Shows email address
* @since 1.0.0
*/
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo $email_improvements_enabled ? '<table border="0" cellpadding="0" cellspacing="0" width="100%" role="presentation"><tr><td class="email-additional-content">' : '';
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
echo $email_improvements_enabled ? '</td></tr></table>' : '';
}
/**
* Show store information - store details are set in the Point of Sale settings.
*/
if ( ! empty( $pos_store_email ) || ! empty( $pos_store_phone_number ) || ! empty( $pos_store_address ) ) {
echo '<div class="pos-store-information">';
if ( ! empty( $pos_store_name ) ) {
echo '<h2>' . esc_html( $pos_store_name ) . '</h2>';
}
if ( ! empty( $pos_store_email ) ) {
echo '<p>' . esc_html( $pos_store_email ) . '</p>';
}
if ( ! empty( $pos_store_phone_number ) ) {
echo '<p>' . esc_html( $pos_store_phone_number ) . '</p>';
}
if ( ! empty( $pos_store_address ) ) {
echo wp_kses_post( wpautop( wptexturize( $pos_store_address ) ) );
}
echo '</div>';
}
/**
* Show refund & returns policy - this is set in the Point of Sale settings.
*/
if ( ! empty( $pos_refund_returns_policy ) ) {
echo '<div class="refund-returns-policy">';
echo '<h2>' . esc_html__( 'Refund & Returns Policy', 'woocommerce' ) . '</h2>';
echo wp_kses_post( wpautop( wptexturize( $pos_refund_returns_policy ) ) );
echo '</div>';
}
/**
* Hook for the woocommerce_email_footer.
*
* @hooked WC_Email_Customer_POS_*::email_footer() Output the email footer
* @since 10.0.0
*/
do_action( 'woocommerce_pos_email_footer', $email );

View File

@@ -0,0 +1,84 @@
<?php
/**
* Customer processing order email
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-processing-order.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails
* @version 10.4.0
*/
use Automattic\WooCommerce\Utilities\FeaturesUtil;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
/*
* @hooked WC_Emails::email_header() Output the email header
*/
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
<?php echo $email_improvements_enabled ? '<div class="email-introduction">' : ''; ?>
<p>
<?php
if ( ! empty( $order->get_billing_first_name() ) ) {
/* translators: %s: Customer first name */
printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) );
} else {
printf( esc_html__( 'Hi,', 'woocommerce' ) );
}
?>
</p>
<?php if ( $email_improvements_enabled ) : ?>
<p><?php esc_html_e( 'Just to let you know &mdash; weve received your order, and it is now being processed.', 'woocommerce' ); ?></p>
<p><?php esc_html_e( 'Heres a reminder of what youve ordered:', 'woocommerce' ); ?></p>
<?php else : ?>
<?php /* translators: %s: Order number */ ?>
<p><?php printf( esc_html__( 'Just to let you know &mdash; we\'ve received your order #%s, and it is now being processed:', 'woocommerce' ), esc_html( $order->get_order_number() ) ); ?></p>
<?php endif; ?>
<?php echo $email_improvements_enabled ? '</div>' : ''; ?>
<?php
/*
* @hooked WC_Emails::order_details() Shows the order details table.
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
* @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 );
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo $email_improvements_enabled ? '<table border="0" cellpadding="0" cellspacing="0" width="100%" role="presentation"><tr><td class="email-additional-content">' : '';
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
echo $email_improvements_enabled ? '</td></tr></table>' : '';
}
/*
* @hooked WC_Emails::email_footer() Output the email footer
*/
do_action( 'woocommerce_email_footer', $email );

View File

@@ -0,0 +1,98 @@
<?php
/**
* Customer refunded order email
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-refunded-order.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails
* @version 10.4.0
*/
use Automattic\WooCommerce\Utilities\FeaturesUtil;
defined( 'ABSPATH' ) || exit;
$email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
/*
* @hooked WC_Emails::email_header() Output the email header
*/
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
<?php echo $email_improvements_enabled ? '<div class="email-introduction">' : ''; ?>
<p>
<?php
if ( ! empty( $order->get_billing_first_name() ) ) {
/* translators: %s: Customer first name */
printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) );
} else {
printf( esc_html__( 'Hi,', 'woocommerce' ) );
}
?>
</p>
<p>
<?php
if ( $email_improvements_enabled ) {
if ( $partial_refund ) {
/* translators: %s: Site title */
echo sprintf( esc_html__( 'Your order from %s has been partially refunded.', 'woocommerce' ), esc_html( $blogname ) ) . "\n\n";
} else {
/* translators: %s: Site title */
echo sprintf( esc_html__( 'Your order from %s has been refunded.', 'woocommerce' ), esc_html( $blogname ) ) . "\n\n";
}
echo '</p><p>';
echo esc_html__( 'Heres a reminder of what youve ordered:', 'woocommerce' ) . "\n\n";
} elseif ( $partial_refund ) {
/* translators: %s: Site title */
printf( esc_html__( 'Your order on %s has been partially refunded. There are more details below for your reference:', 'woocommerce' ), esc_html( $blogname ) );
} else {
/* translators: %s: Site title */
printf( esc_html__( 'Your order on %s has been refunded. There are more details below for your reference:', 'woocommerce' ), esc_html( $blogname ) );
}
?>
</p>
<?php echo $email_improvements_enabled ? '</div>' : ''; ?>
<?php
/*
* @hooked WC_Emails::order_details() Shows the order details table.
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
* @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 );
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo $email_improvements_enabled ? '<table border="0" cellpadding="0" cellspacing="0" width="100%" role="presentation"><tr><td class="email-additional-content">' : '';
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
echo $email_improvements_enabled ? '</td></tr></table>' : '';
}
/*
* @hooked WC_Emails::email_footer() Output the email footer
*/
do_action( 'woocommerce_email_footer', $email );

View File

@@ -0,0 +1,69 @@
<?php
/**
* Customer Reset Password email
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-reset-password.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails
* @version 10.4.0
*/
use Automattic\WooCommerce\Utilities\FeaturesUtil;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
$email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
?>
<?php do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
<?php echo $email_improvements_enabled ? '<div class="email-introduction">' : ''; ?>
<?php /* translators: %s: Customer username */ ?>
<p><?php printf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $user_login ) ); ?></p>
<?php /* translators: %s: Store name */ ?>
<p><?php printf( esc_html__( 'Someone has requested a new password for the following account on %s:', 'woocommerce' ), esc_html( $blogname ) ); ?></p>
<?php if ( $email_improvements_enabled ) : ?>
<div class="hr hr-top"></div>
<?php /* translators: %s: Username */ ?>
<p><?php echo wp_kses( sprintf( __( 'Username: <b>%s</b>', 'woocommerce' ), esc_html( $user_login ) ), array( 'b' => array() ) ); ?></p>
<div class="hr hr-bottom"></div>
<p><?php esc_html_e( 'If you didnt make this request, just ignore this email. If youd like to proceed, reset your password via the link below:', 'woocommerce' ); ?></p>
<?php else : ?>
<?php /* translators: %s: Customer username */ ?>
<p><?php printf( esc_html__( 'Username: %s', 'woocommerce' ), esc_html( $user_login ) ); ?></p>
<p><?php esc_html_e( 'If you didn\'t make this request, just ignore this email. If you\'d like to proceed:', 'woocommerce' ); ?></p>
<?php endif; ?>
<p>
<a class="link" href="<?php echo esc_url( add_query_arg( array( 'key' => $reset_key, 'id' => $user_id, 'login' => rawurlencode( $user_login ) ), wc_get_endpoint_url( 'lost-password', '', wc_get_page_permalink( 'myaccount' ) ) ) ); ?>"><?php // phpcs:ignore WordPress.Arrays.ArrayDeclarationSpacing.AssociativeArrayFound ?>
<?php
if ( $email_improvements_enabled ) {
esc_html_e( 'Reset your password', 'woocommerce' );
} else {
esc_html_e( 'Click here to reset your password', 'woocommerce' );
}
?>
</a>
</p>
<?php echo $email_improvements_enabled ? '</div>' : ''; ?>
<?php
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo $email_improvements_enabled ? '<table border="0" cellpadding="0" cellspacing="0" width="100%" role="presentation"><tr><td class="email-additional-content email-additional-content-aligned">' : '';
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
echo $email_improvements_enabled ? '</td></tr></table>' : '';
}
do_action( 'woocommerce_email_footer', $email );

View File

@@ -0,0 +1,95 @@
<?php
/**
* Customer back-in-stock notification confirmation email.
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-stock-notification-verified.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails
* @version 10.2.0
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Hook: woocommerce_email_header.
*
* @since 10.2.0
*
* @hooked WC_Emails::email_header() Output the email header
*/
do_action( 'woocommerce_email_header', $email_heading, $email );
?>
<table border="0" cellpadding="0" cellspacing="0" id="notification__container"><tr><td>
<div id="notification__into_content">
<?php echo wp_kses_post( wpautop( wptexturize( $intro_content ) ) ); ?>
</div>
<div id="notification__product">
<?php
/**
* Hook: woocommerce_email_stock_notification_product.
*
* @since 10.2.0
*
* @hooked \Automattic\WooCommerce\Internal\StockNotifications\Templates::email_product_image - 10
* @hooked \Automattic\WooCommerce\Internal\StockNotifications\Templates::email_product_title - 20
* @hooked \Automattic\WooCommerce\Internal\StockNotifications\Templates::email_product_attributes - 30
* @hooked \Automattic\WooCommerce\Internal\StockNotifications\Templates::email_product_price - 40
*/
do_action( 'woocommerce_email_stock_notification_product', $product, $notification, $plain_text, $email );
?>
</div>
<table id="notification__footer"><tr><td>
<?php
echo esc_html( sprintf( __( 'You have received this message because your e-mail address was used to sign up for stock notifications on our store.', 'woocommerce' ), $product->get_name() ) );
if ( ! $is_guest ) {
// translators: %1$s placeholder is the unsubscribe link, %2$s placeholder is the Unsubscribe text link.
$unsubscribe_link_tag = sprintf( '<a href="%1$s" id="notification__unsubscribe_link">%2$s</a>', esc_url( $unsubscribe_link ), _x( 'click here', 'unsubscribe cta for stock notifications for existing customers', 'woocommerce' ) );
// translators: %s placeholder is the text part from above.
echo wp_kses_post( sprintf( __( 'To manage your notifications, %s to log in to your account.', 'woocommerce' ), $unsubscribe_link_tag ) );
} else {
// translators: %1$s placeholder is the unsubscribe link, %2$s placeholder is the Unsubscribe text link.
$unsubscribe_link_tag = sprintf( '<a href="%1$s" id="notification__unsubscribe_link">%2$s</a>', esc_url( $unsubscribe_link ), _x( 'click here', 'unsubscribe cta for stock notifications for guests', 'woocommerce' ) );
// translators: %s placeholder is the text part from above.
echo wp_kses_post( sprintf( __( 'To stop receiving these messages, %s to unsubscribe.', 'woocommerce' ), $unsubscribe_link_tag ) );
}
?>
<br><br>
<?php
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
}
?>
</td></tr></table>
</td></tr></table>
<?php
/**
* Hook: woocommerce_email_footer.
*
* @since 10.2.0
*
* @hooked WC_Emails::email_footer() Output the email footer
*/
do_action( 'woocommerce_email_footer', $email );

View File

@@ -0,0 +1,93 @@
<?php
/**
* Customer back-in-stock notification confirmation email.
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-stock-notification-verify.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails
* @version 10.2.0
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Hook: woocommerce_email_header.
*
* @since 10.2.0
*
* @hooked WC_Emails::email_header() Output the email header
*/
do_action( 'woocommerce_email_header', $email_heading, $email );
?>
<table border="0" cellpadding="0" cellspacing="0" id="notification__container"><tr><td>
<div id="notification__into_content">
<?php echo wp_kses_post( wpautop( wptexturize( $intro_content ) ) ); ?>
</div>
<div id="notification__product">
<?php
/**
* Hook: woocommerce_email_stock_notification_product.
*
* @since 10.2.0
*
* @hooked \Automattic\WooCommerce\Internal\StockNotifications\Templates::email_product_image - 10
* @hooked \Automattic\WooCommerce\Internal\StockNotifications\Templates::email_product_title - 20
* @hooked \Automattic\WooCommerce\Internal\StockNotifications\Templates::email_product_attributes - 30
* @hooked \Automattic\WooCommerce\Internal\StockNotifications\Templates::email_product_price - 40
*/
do_action( 'woocommerce_email_stock_notification_product', $product, $notification, $plain_text, $email );
?>
<a href="<?php echo esc_url( $verification_link ); ?>" id="notification__action_button"><?php echo esc_html( $verification_button_text ); ?></a>
<div id="notification__verification_expiration">
<?php
// translators: %$s placeholder is the verification expiration datetime string.
echo wp_kses_post( sprintf( esc_html__( 'This link will remain active for %s.', 'woocommerce' ), $verification_expiration_threshold ) );
?>
</div>
</div>
<table id="notification__footer"><tr><td>
<?php
echo esc_html( __( 'You have received this message because your e-mail address was used to sign up for stock notifications on our store. Wasn\'t you? Please get in touch with us if you keep receiving these messages.', 'woocommerce' ) );
?>
<br><br>
<?php
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
}
?>
</td></tr></table>
</td></tr></table>
<?php
/**
* Hook: woocommerce_email_footer.
*
* @since 10.2.0
*
* @hooked WC_Emails::email_footer() Output the email footer
*/
do_action( 'woocommerce_email_footer', $email );

View File

@@ -0,0 +1,100 @@
<?php
/**
* Customer back-in-stock notification email.
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/customer-stock-notification.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails
* @version 10.2.0
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
/**
* Hook: woocommerce_email_header.
*
* @since 10.2.0
*
* @hooked WC_Emails::email_header() Output the email header
*/
do_action( 'woocommerce_email_header', $email_heading, $email );
?>
<table border="0" cellpadding="0" cellspacing="0" id="notification__container"><tr><td>
<div id="notification__into_content">
<?php echo wp_kses_post( wpautop( wptexturize( $intro_content ) ) ); ?>
</div>
<div id="notification__product">
<?php
/**
* Hook: woocommerce_email_stock_notification_product.
*
* @since 10.2.0
*
* @hooked \Automattic\WooCommerce\Internal\StockNotifications\Templates::email_product_image - 10
* @hooked \Automattic\WooCommerce\Internal\StockNotifications\Templates::email_product_title - 20
* @hooked \Automattic\WooCommerce\Internal\StockNotifications\Templates::email_product_attributes - 30
* @hooked \Automattic\WooCommerce\Internal\StockNotifications\Templates::email_product_price - 40
*/
do_action( 'woocommerce_email_stock_notification_product', $product, $notification, $plain_text, $email );
?>
<a href="<?php echo esc_url( $button_link ); ?>" id="notification__action_button">
<?php echo esc_html( $button_text ); ?>
</a>
</div>
<table id="notification__footer"><tr><td>
<?php
echo esc_html( __( 'You have received this message because your e-mail address was used to sign up for stock notifications on our store.', 'woocommerce' ) );
if ( ! $is_guest ) {
// translators: %1$s placeholder is the unsubscribe link, %2$s placeholder is the Unsubscribe text link.
$unsubscribe_link_tag = sprintf( '<a href="%1$s" id="notification__unsubscribe_link">%2$s</a>', esc_url( $unsubscribe_link ), _x( 'click here', 'unsubscribe cta for stock notifications for existing customers', 'woocommerce' ) );
// translators: %s placeholder is the text part from above.
echo wp_kses_post( sprintf( __( 'To manage your notifications, %s to log in to your account.', 'woocommerce' ), $unsubscribe_link_tag ) );
} else {
// translators: %1$s placeholder is the unsubscribe link, %2$s placeholder is the Unsubscribe text link.
$unsubscribe_link_tag = sprintf( '<a href="%1$s" id="notification__unsubscribe_link">%2$s</a>', esc_url( $unsubscribe_link ), _x( 'click here', 'unsubscribe cta for stock notifications for guests', 'woocommerce' ) );
// translators: %s placeholder is the text part from above.
echo wp_kses_post( sprintf( __( 'To stop receiving these messages, %s to unsubscribe.', 'woocommerce' ), $unsubscribe_link_tag ) );
}
?>
<br><br>
<?php
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo wp_kses_post( wpautop( wptexturize( $additional_content ) ) );
}
?>
</td></tr></table>
</td></tr></table>
<?php
/**
* Hook: woocommerce_email_footer.
*
* @since 10.2.0
*
* @hooked WC_Emails::email_footer() Output the email footer
*/
do_action( 'woocommerce_email_footer', $email );

View File

@@ -0,0 +1,92 @@
<?php
/**
* Email Addresses
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/email-addresses.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails
* @version 10.4.0
*/
use Automattic\WooCommerce\Utilities\FeaturesUtil;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$address = $order->get_formatted_billing_address();
$shipping = $order->get_formatted_shipping_address();
$email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
?><table id="addresses" cellspacing="0" cellpadding="0" style="width: 100%; vertical-align: top; margin-bottom: <?php echo $email_improvements_enabled ? '0' : '40px'; ?>; padding:0;" border="0" role="presentation">
<tr>
<td class="font-family text-align-left" style="border:0; padding:0;" valign="top" width="50%">
<?php if ( $email_improvements_enabled ) { ?>
<b class="address-title"><?php esc_html_e( 'Billing address', 'woocommerce' ); ?></b>
<?php } else { ?>
<h2><?php esc_html_e( 'Billing address', 'woocommerce' ); ?></h2>
<?php } ?>
<address class="address">
<?php echo wp_kses_post( $address ? $address : esc_html__( 'N/A', 'woocommerce' ) ); ?>
<?php if ( $order->get_billing_phone() ) : ?>
<br/><?php echo wc_make_phone_clickable( $order->get_billing_phone() ); ?>
<?php endif; ?>
<?php if ( $order->get_billing_email() ) : ?>
<br/><?php echo esc_html( $order->get_billing_email() ); ?>
<?php endif; ?>
<?php
/**
* Fires after the core address fields in emails.
*
* @since 8.6.0
*
* @param string $type Address type. Either 'billing' or 'shipping'.
* @param WC_Order $order Order instance.
* @param bool $sent_to_admin If this email is being sent to the admin or not.
* @param bool $plain_text If this email is plain text or not.
*/
do_action( 'woocommerce_email_customer_address_section', 'billing', $order, $sent_to_admin, false );
?>
</address>
</td>
<?php if ( ! wc_ship_to_billing_address_only() && $order->needs_shipping_address() && $shipping ) : ?>
<td class="font-family text-align-left" style="padding:0;" valign="top" width="50%">
<?php if ( $email_improvements_enabled ) { ?>
<b class="address-title"><?php esc_html_e( 'Shipping address', 'woocommerce' ); ?></b>
<?php } else { ?>
<h2><?php esc_html_e( 'Shipping address', 'woocommerce' ); ?></h2>
<?php } ?>
<address class="address">
<?php echo wp_kses_post( $shipping ); ?>
<?php if ( $order->get_shipping_phone() ) : ?>
<br /><?php echo wc_make_phone_clickable( $order->get_shipping_phone() ); ?>
<?php endif; ?>
<?php
/**
* Fires after the core address fields in emails.
*
* @since 8.6.0
*
* @param string $type Address type. Either 'billing' or 'shipping'.
* @param WC_Order $order Order instance.
* @param bool $sent_to_admin If this email is being sent to the admin or not.
* @param bool $plain_text If this email is plain text or not.
*/
do_action( 'woocommerce_email_customer_address_section', 'shipping', $order, $sent_to_admin, false );
?>
</address>
</td>
<?php endif; ?>
</tr>
</table>
<?php echo $email_improvements_enabled ? '<br>' : ''; ?>

View File

@@ -0,0 +1,31 @@
<?php
/**
* Additional Customer Details
*
* This is extra customer data which can be filtered by plugins. It outputs below the order item table.
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/email-customer-details.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails
* @version 9.7.0
*/
defined( 'ABSPATH' ) || exit;
?>
<?php if ( ! empty( $fields ) ) : ?>
<div class="font-family" style="margin-bottom: 40px;">
<h2><?php esc_html_e( 'Customer details', 'woocommerce' ); ?></h2>
<ul>
<?php foreach ( $fields as $field ) : ?>
<li><strong><?php echo wp_kses_post( $field['label'] ); ?>:</strong> <span class="text"><?php echo wp_kses_post( $field['value'] ); ?></span></li>
<?php endforeach; ?>
</ul>
</div>
<?php endif; ?>

View File

@@ -0,0 +1,89 @@
<?php
/**
* Email Downloads.
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/email-downloads.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates
* @version 10.4.0
*/
use Automattic\WooCommerce\Utilities\FeaturesUtil;
defined( 'ABSPATH' ) || exit;
$email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
?><h2 class="woocommerce-order-downloads__title<?php echo $email_improvements_enabled ? ' email-order-detail-heading' : ''; ?>"><?php esc_html_e( 'Downloads', 'woocommerce' ); ?></h2>
<table
class="td font-family<?php echo $email_improvements_enabled ? ' email-order-details' : ''; ?>"
cellspacing="0"
cellpadding="<?php echo $email_improvements_enabled ? '0' : '6'; ?>"
style="width: 100%; margin-bottom: 40px;"
border="<?php echo $email_improvements_enabled ? '0' : '1'; ?>"
>
<thead>
<tr>
<?php foreach ( $columns as $column_id => $column_name ) : ?>
<th class="td <?php echo $email_improvements_enabled && array_key_last( $columns ) === $column_id ? 'text-align-right' : 'text-align-left'; ?>" scope="col">
<?php echo esc_html( $column_name ); ?>
</th>
<?php endforeach; ?>
</tr>
</thead>
<?php foreach ( $downloads as $download ) : ?>
<tr>
<?php foreach ( $columns as $column_id => $column_name ) : ?>
<?php
$column_alignment_class = $email_improvements_enabled && array_key_last( $columns ) === $column_id ? 'text-align-right' : 'text-align-left';
if ( 'download-product' === $column_id ) :
?>
<th class="td <?php echo esc_attr( $column_alignment_class ); ?>" scope="row">
<?php else : ?>
<td class="td <?php echo esc_attr( $column_alignment_class ); ?>">
<?php endif; ?>
<?php
if ( has_action( 'woocommerce_email_downloads_column_' . $column_id ) ) {
do_action( 'woocommerce_email_downloads_column_' . $column_id, $download, $plain_text );
} else {
switch ( $column_id ) {
case 'download-product':
?>
<a href="<?php echo esc_url( get_permalink( $download['product_id'] ) ); ?>"><?php echo wp_kses_post( $download['product_name'] ); ?></a>
<?php
break;
case 'download-file':
?>
<a href="<?php echo esc_url( $download['download_url'] ); ?>" class="woocommerce-MyAccount-downloads-file button alt"><?php echo esc_html( $download['download_name'] ); ?></a>
<?php
break;
case 'download-expires':
if ( ! empty( $download['access_expires'] ) ) {
?>
<time datetime="<?php echo esc_attr( date( 'Y-m-d', strtotime( $download['access_expires'] ) ) ); ?>" title="<?php echo esc_attr( strtotime( $download['access_expires'] ) ); ?>"><?php echo esc_html( date_i18n( get_option( 'date_format' ), strtotime( $download['access_expires'] ) ) ); ?></time>
<?php
} else {
esc_html_e( 'Never', 'woocommerce' );
}
break;
}
}
?>
<?php if ( 'download-product' === $column_id ) : ?>
</th>
<?php else : ?>
</td>
<?php endif; ?>
<?php endforeach; ?>
</tr>
<?php endforeach; ?>
</table>

View File

@@ -0,0 +1,88 @@
<?php
/**
* Email Footer
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/email-footer.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails
* @version 10.4.0
*/
defined( 'ABSPATH' ) || exit;
$email = $email ?? null;
?>
</div>
</td>
</tr>
</table>
<!-- End Content -->
</td>
</tr>
</table>
<!-- End Body -->
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td align="center" valign="top">
<!-- Footer -->
<table border="0" cellpadding="10" cellspacing="0" width="100%" id="template_footer" role="presentation">
<tr>
<td valign="top">
<table border="0" cellpadding="10" cellspacing="0" width="100%" role="presentation">
<tr>
<td colspan="2" valign="middle" id="credit">
<?php
$email_footer_text = get_option( 'woocommerce_email_footer_text' );
/**
* This filter is documented in templates/emails/email-styles.php
*
* @since 9.6.0
*/
if ( apply_filters( 'woocommerce_is_email_preview', false ) ) {
$text_transient = get_transient( 'woocommerce_email_footer_text' );
$email_footer_text = false !== $text_transient ? $text_transient : $email_footer_text;
}
echo wp_kses_post(
wpautop(
wptexturize(
/**
* Provides control over the email footer text used for most order emails.
*
* @since 4.0.0
*
* @param string $email_footer_text
*/
apply_filters( 'woocommerce_email_footer_text', $email_footer_text, $email )
)
)
);
?>
</td>
</tr>
</table>
</td>
</tr>
</table>
<!-- End Footer -->
</td>
</tr>
</table>
</div>
</td>
<td><!-- Deliberately empty to support consistent sizing and layout across multiple email clients. --></td>
</tr>
</table>
</body>
</html>

View File

@@ -0,0 +1,111 @@
<?php
/**
* Order fulfillment details table shown in emails.
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/email-fulfillment-details.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails
* @version 10.1.0
*/
defined( 'ABSPATH' ) || exit;
$text_align = is_rtl() ? 'right' : 'left';
$heading_class = 'email-order-detail-heading';
$order_table_class = 'email-order-details';
$order_total_text_align = 'right';
if ( null === $fulfillment->get_date_deleted() ) {
$tracking_number = $fulfillment->get_meta( '_tracking_number', true );
$tracking_url = $fulfillment->get_meta( '_tracking_url' );
$shipment_provider = $fulfillment->get_meta( '_shipment_provider' );
if ( ! $tracking_number && ! $tracking_url && ! $shipment_provider ) {
echo '<p>' . esc_html__( 'No tracking information available for this fulfillment at the moment.', 'woocommerce' ) . '</p>';
} else {
echo '<p><strong>' . esc_html__( 'Tracking Number', 'woocommerce' ) . ':</strong> ' . esc_attr( $tracking_number ) . '</p>';
echo '<p><strong>' . esc_html__( 'Shipment Provider', 'woocommerce' ) . ':</strong> ' . esc_html( $shipment_provider ) . '</p>';
echo '<p><a href="' . esc_url( $tracking_url ) . '" target="_blank">' . esc_attr__( 'Track your shipment', 'woocommerce' ) . '</a></p>';
}
echo '<br />';
echo '<p>';
echo wp_kses_post(
sprintf(
/* translators: %s: Link to My Account > Orders page. */
__( 'You can access to more details of your order by visiting <a href="%s" target="_blank">My Account > Orders</a> and select the order you wish to see the latest status of the delivery.', 'woocommerce' ),
site_url( 'my-account/orders/' )
)
);
echo '</p>';
}
/**
* Action hook to add custom content before fulfillment details in email.
*
* @param WC_Order $order Order object.
* @param Fulfillment $fulfillment Fulfillment object.
* @param bool $sent_to_admin Whether it's sent to admin or customer.
* @param bool $plain_text Whether it's a plain text email.
* @param WC_Email $email Email object.
* @since 2.5.0
*/
do_action( 'woocommerce_email_before_fulfillment_table', $order, $fulfillment, $sent_to_admin, $plain_text, $email );
?>
<h2 class="<?php echo esc_attr( $heading_class ); ?>">
<?php
echo wp_kses_post( __( 'Fulfillment summary', 'woocommerce' ) );
if ( $sent_to_admin ) {
$before = '<a class="link" href="' . esc_url( $order->get_edit_order_url() ) . '">';
$after = '</a>';
} else {
$before = '';
$after = '';
}
echo '<br><span>';
/* translators: %s: Order ID. */
$order_number_string = __( 'Order #%s', 'woocommerce' );
echo wp_kses_post( $before . sprintf( $order_number_string . $after . ' (<time datetime="%s">%s</time>)', $order->get_order_number(), $order->get_date_created()->format( 'c' ), wc_format_datetime( $order->get_date_created() ) ) );
echo '</span>';
?>
</h2>
<div style="margin-bottom: 24px;">
<table class="td font-family <?php echo esc_attr( $order_table_class ); ?>" cellspacing="0" cellpadding="6" style="width: 100%;" border="1">
<tbody>
<?php
echo wc_get_email_fulfillment_items( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
$order,
$fulfillment,
array(
'show_sku' => $sent_to_admin,
'show_image' => true,
'image_size' => array( 48, 48 ),
'plain_text' => $plain_text,
'sent_to_admin' => $sent_to_admin,
)
);
?>
</tbody>
</table>
</div>
<?php
/**
* Action hook to add custom content after fulfillment details in email.
*
* @param WC_Order $order Order object.
* @param bool $sent_to_admin Whether it's sent to admin or customer.
* @param bool $plain_text Whether it's a plain text email.
* @param WC_Email $email Email object.
* @since 2.5.0
*/
do_action( 'woocommerce_email_after_fulfillment_table', $order, $fulfillment, $sent_to_admin, $plain_text, $email );
?>

View File

@@ -0,0 +1,178 @@
<?php
/**
* Email Fulfillment Items
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/email-fulfillment-items.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails
* @version 10.1.0
*/
use Automattic\WooCommerce\Utilities\FeaturesUtil;
defined( 'ABSPATH' ) || exit;
$margin_side = is_rtl() ? 'left' : 'right';
$price_text_align = 'right';
foreach ( $items as $item_id => $item ) :
$product = $item->item->get_product();
$sku = '';
$purchase_note = '';
$image = '';
/**
* Email Order Item Visibility hook.
*
* This filter allows you to control the visibility of order items in emails.
*
* @param bool $visible Whether the item is visible in the email.
* @param WC_Order_Item_Product $item The order item object.
* @since 2.1.0
*/
if ( ! apply_filters( 'woocommerce_order_item_visible', true, $item->item ) ) {
continue;
}
if ( is_object( $product ) ) {
$sku = $product->get_sku();
$purchase_note = $product->get_purchase_note();
$image = $product->get_image( $image_size );
}
/**
* Email Order Item Thumbnail hook.
*
* @since 2.1.0
*/
$order_item_class = apply_filters( 'woocommerce_order_item_class', 'order_item', $item->item, $order );
?>
<tr class="<?php echo esc_attr( $order_item_class ); ?>">
<td class="td font-family text-align-left" style="vertical-align: middle; word-wrap:break-word;">
<table class="order-item-data">
<tr>
<?php
// Show title/image etc.
if ( $show_image ) {
/**
* Email Order Item Thumbnail hook.
*
* @param string $image The image HTML.
* @param WC_Order_Item_Product $item The item being displayed.
* @since 2.1.0
*/
echo '<td>' . wp_kses_post( apply_filters( 'woocommerce_order_item_thumbnail', $image, $item->item ) ) . '</td>';
}
?>
<td>
<?php
/**
* Order Item Name hook.
*
* @param string $item_name The item name HTML.
* @param WC_Order_Item_Product $item The item being displayed.
* @since 2.1.0
*/
echo wp_kses_post( apply_filters( 'woocommerce_order_item_name', $item->item->get_name(), $item->item, false ) );
// SKU.
if ( $show_sku && $sku ) {
echo wp_kses_post( ' (#' . $sku . ')' );
}
/**
* Allow other plugins to add additional product information.
*
* @param int $item_id The item ID.
* @param WC_Order_Item_Product $item The item object.
* @param WC_Order $order The order object.
* @param bool $plain_text Whether the email is plain text or not.
* @since 2.3.0
*/
do_action( 'woocommerce_order_item_meta_start', $item_id, $item->item, $order, $plain_text );
$item_meta = wc_display_item_meta(
$item->item,
array(
'before' => '',
'after' => '',
'separator' => '<br>',
'echo' => false,
'label_before' => '<span>',
'label_after' => ':</span> ',
)
);
echo '<div class="email-order-item-meta">';
// Using wp_kses instead of wp_kses_post to remove all block elements.
echo wp_kses(
$item_meta,
array(
'br' => array(),
'span' => array(),
'a' => array(
'href' => true,
'target' => true,
'rel' => true,
'title' => true,
),
)
);
echo '</div>';
/**
* Allow other plugins to add additional product information.
*
* @param int $item_id The item ID.
* @param WC_Order_Item_Product $item The item object.
* @param WC_Order $order The order object.
* @param bool $plain_text Whether the email is plain text or not.
* @since 2.3.0
*/
do_action( 'woocommerce_order_item_meta_end', $item_id, $item->item, $order, $plain_text );
?>
</td>
</tr>
</table>
</td>
<td class="td font-family text-align-<?php echo esc_attr( $price_text_align ); ?>" style="vertical-align:middle;">
<?php
echo '&times;';
$qty = $item->qty;
$qty_display = esc_html( $qty );
/**
* Email Order Item Quantity hook.
*
* @since 2.4.0
*/
echo wp_kses_post( apply_filters( 'woocommerce_email_order_item_quantity', $qty_display, $item->item ) );
?>
</td>
<td class="td font-family text-align-<?php echo esc_attr( $price_text_align ); ?>" style="vertical-align:middle;">
<?php echo wp_kses_post( $order->get_formatted_line_subtotal( $item->item ) ); ?>
</td>
</tr>
<?php
if ( $show_purchase_note && $purchase_note ) {
?>
<tr>
<td colspan="3" class="font-family text-align-left" style="vertical-align:middle;">
<?php
echo wp_kses_post( wpautop( do_shortcode( $purchase_note ) ) );
?>
</td>
</tr>
<?php
}
?>
<?php endforeach; ?>

View File

@@ -0,0 +1,104 @@
<?php
/**
* Email Header
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/email-header.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails
* @version 10.4.0
*/
use Automattic\WooCommerce\Utilities\FeaturesUtil;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
$email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
$store_name = $store_name ?? get_bloginfo( 'name', 'display' );
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php bloginfo( 'charset' ); ?>" />
<meta content="width=device-width, initial-scale=1.0" name="viewport">
<title><?php echo esc_html( $store_name ); ?></title>
</head>
<body <?php echo is_rtl() ? 'rightmargin' : 'leftmargin'; ?>="0" marginwidth="0" topmargin="0" marginheight="0" offset="0">
<table width="100%" id="outer_wrapper" role="presentation">
<tr>
<td><!-- Deliberately empty to support consistent sizing and layout across multiple email clients. --></td>
<td width="600">
<div id="wrapper" dir="<?php echo is_rtl() ? 'rtl' : 'ltr'; ?>">
<table border="0" cellpadding="0" cellspacing="0" height="100%" width="100%" id="inner_wrapper" role="presentation">
<tr>
<td align="center" valign="top">
<?php
$img = get_option( 'woocommerce_email_header_image' );
/**
* This filter is documented in templates/emails/email-styles.php
*
* @since 9.6.0
*/
if ( apply_filters( 'woocommerce_is_email_preview', false ) ) {
$img_transient = get_transient( 'woocommerce_email_header_image' );
$img = false !== $img_transient ? $img_transient : $img;
}
if ( $email_improvements_enabled ) :
?>
<table border="0" cellpadding="0" cellspacing="0" width="100%" role="presentation">
<tr>
<td id="template_header_image">
<?php
if ( $img ) {
echo '<p style="margin-top:0;"><img src="' . esc_url( $img ) . '" alt="' . esc_attr( $store_name ) . '" /></p>';
} else {
echo '<p class="email-logo-text">' . esc_html( $store_name ) . '</p>';
}
?>
</td>
</tr>
</table>
<?php else : ?>
<div id="template_header_image">
<?php
if ( $img ) {
echo '<p style="margin-top:0;"><img src="' . esc_url( $img ) . '" alt="' . esc_attr( $store_name ) . '" /></p>';
}
?>
</div>
<?php endif; ?>
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="template_container" role="presentation">
<tr>
<td align="center" valign="top">
<!-- Header -->
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="template_header" role="presentation">
<tr>
<td id="header_wrapper">
<h1><?php echo esc_html( $email_heading ); ?></h1>
</td>
</tr>
</table>
<!-- End Header -->
</td>
</tr>
<tr>
<td align="center" valign="top">
<!-- Body -->
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="template_body" role="presentation">
<tr>
<td valign="top" id="body_content">
<!-- Content -->
<table border="0" cellpadding="20" cellspacing="0" width="100%" role="presentation">
<tr>
<td valign="top" id="body_content_inner_cell">
<div id="body_content_inner">

View File

@@ -0,0 +1,20 @@
<?php
/**
* Email mobile messaging
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/email-mobile-messaging.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails
* @version 7.0
*/
use Automattic\WooCommerce\Internal\Orders\MobileMessagingHandler;
echo wp_kses_post( MobileMessagingHandler::prepare_mobile_message( $order, $blog_id, $now, $domain ) );

View File

@@ -0,0 +1,160 @@
<?php
/**
* Order details table shown in emails.
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/email-order-details.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails
* @version 10.4.0
*/
use Automattic\WooCommerce\Utilities\FeaturesUtil;
defined( 'ABSPATH' ) || exit;
$text_align = is_rtl() ? 'right' : 'left';
$email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
$heading_class = $email_improvements_enabled ? 'email-order-detail-heading' : '';
$order_table_class = $email_improvements_enabled ? 'email-order-details' : '';
$order_total_text_align = $email_improvements_enabled ? 'right' : 'left';
$order_quantity_text_align = $email_improvements_enabled ? 'right' : 'left';
if ( $email_improvements_enabled ) {
add_filter( 'woocommerce_order_shipping_to_display_shipped_via', '__return_false' );
}
/**
* Action hook to add custom content before order details in email.
*
* @param WC_Order $order Order object.
* @param bool $sent_to_admin Whether it's sent to admin or customer.
* @param bool $plain_text Whether it's a plain text email.
* @param WC_Email $email Email object.
* @since 2.5.0
*/
do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email ); ?>
<h2 class="<?php echo esc_attr( $heading_class ); ?>">
<?php
if ( $email_improvements_enabled ) {
echo wp_kses_post( __( 'Order summary', 'woocommerce' ) );
}
if ( $sent_to_admin ) {
$before = '<a class="link" href="' . esc_url( $order->get_edit_order_url() ) . '">';
$after = '</a>';
} else {
$before = '';
$after = '';
}
if ( $email_improvements_enabled ) {
echo '<br><span>';
}
/* translators: %s: Order ID. */
$order_number_string = __( '[Order #%s]', 'woocommerce' );
if ( $email_improvements_enabled ) {
/* translators: %s: Order ID. */
$order_number_string = __( 'Order #%s', 'woocommerce' );
}
echo wp_kses_post( $before . sprintf( $order_number_string . $after . ' (<time datetime="%s">%s</time>)', $order->get_order_number(), $order->get_date_created()->format( 'c' ), wc_format_datetime( $order->get_date_created() ) ) );
if ( $email_improvements_enabled ) {
echo '</span>';
}
?>
</h2>
<div style="margin-bottom: <?php echo $email_improvements_enabled ? '24px' : '40px'; ?>;">
<table class="td font-family <?php echo esc_attr( $order_table_class ); ?>" cellspacing="0" cellpadding="6" style="width: 100%;" border="1">
<thead>
<tr>
<th class="td" scope="col" style="text-align:<?php echo esc_attr( $text_align ); ?>;"><?php esc_html_e( 'Product', 'woocommerce' ); ?></th>
<th class="td" scope="col" style="text-align:<?php echo esc_attr( $order_quantity_text_align ); ?>;"><?php esc_html_e( 'Quantity', 'woocommerce' ); ?></th>
<th class="td" scope="col" style="text-align:<?php echo esc_attr( $order_total_text_align ); ?>;"><?php esc_html_e( 'Price', 'woocommerce' ); ?></th>
</tr>
</thead>
<tbody>
<?php
$image_size = $email_improvements_enabled ? 48 : 32;
echo wc_get_email_order_items( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
$order,
array(
'show_sku' => $sent_to_admin,
'show_image' => $email_improvements_enabled,
'image_size' => array( $image_size, $image_size ),
'plain_text' => $plain_text,
'sent_to_admin' => $sent_to_admin,
)
);
?>
</tbody>
</table>
<table class="td font-family <?php echo esc_attr( $order_table_class ); ?>" cellspacing="0" cellpadding="6" style="width: 100%;" border="1">
<?php
$item_totals = $order->get_order_item_totals();
$item_totals_count = count( $item_totals );
if ( $item_totals ) {
$i = 0;
foreach ( $item_totals as $total ) {
++$i;
$last_class = ( $i === $item_totals_count ) ? ' order-totals-last' : '';
?>
<tr class="order-totals order-totals-<?php echo esc_attr( $total['type'] ?? 'unknown' ); ?><?php echo esc_attr( $last_class ); ?>">
<th class="td text-align-left" scope="row" colspan="2" style="<?php echo ( 1 === $i ) ? 'border-top-width: 4px;' : ''; ?>">
<?php
echo wp_kses_post( $total['label'] ) . ' ';
if ( $email_improvements_enabled ) {
echo isset( $total['meta'] ) ? wp_kses_post( $total['meta'] ) : '';
}
?>
</th>
<td class="td text-align-<?php echo esc_attr( $order_total_text_align ); ?>" style="<?php echo ( 1 === $i ) ? 'border-top-width: 4px;' : ''; ?>"><?php echo wp_kses_post( $total['value'] ); ?></td>
</tr>
<?php
}
}
if ( $order->get_customer_note() && ! $email_improvements_enabled ) {
?>
<tr>
<th class="td text-align-left" scope="row" colspan="2"><?php esc_html_e( 'Note:', 'woocommerce' ); ?></th>
<td class="td text-align-left"><?php echo wp_kses( nl2br( wc_wptexturize_order_note( $order->get_customer_note() ) ), array() ); ?></td>
</tr>
<?php
}
?>
</table>
<?php if ( $order->get_customer_note() && $email_improvements_enabled ) { ?>
<table class="td font-family <?php echo esc_attr( $order_table_class ); ?>" cellspacing="0" cellpadding="6" style="width: 100%;" border="1" role="presentation">
<tr class="order-customer-note">
<td class="td text-align-left">
<b><?php esc_html_e( 'Customer note', 'woocommerce' ); ?></b><br>
<?php echo wp_kses( nl2br( wc_wptexturize_order_note( $order->get_customer_note() ) ), array( 'br' => array() ) ); ?>
</td>
</tr>
</table>
<?php } ?>
</div>
<?php
if ( $email_improvements_enabled ) {
remove_filter( 'woocommerce_order_shipping_to_display_shipped_via', '__return_false' );
}
/**
* Action hook to add custom content after order details in email.
*
* @param WC_Order $order Order object.
* @param bool $sent_to_admin Whether it's sent to admin or customer.
* @param bool $plain_text Whether it's a plain text email.
* @param WC_Email $email Email object.
* @since 2.5.0
*/
do_action( 'woocommerce_email_after_order_table', $order, $sent_to_admin, $plain_text, $email );
?>

View File

@@ -0,0 +1,226 @@
<?php
/**
* Email Order Items
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/email-order-items.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails
* @version 10.4.0
*/
use Automattic\WooCommerce\Utilities\FeaturesUtil;
defined( 'ABSPATH' ) || exit;
$margin_side = is_rtl() ? 'left' : 'right';
$email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
$price_text_align = $email_improvements_enabled ? 'right' : 'left';
foreach ( $items as $item_id => $item ) :
$product = $item->get_product();
$sku = '';
$purchase_note = '';
$image = '';
if ( ! apply_filters( 'woocommerce_order_item_visible', true, $item ) ) {
continue;
}
if ( is_object( $product ) ) {
$sku = $product->get_sku();
$purchase_note = $product->get_purchase_note();
$image = $product->get_image( $image_size );
}
?>
<tr class="<?php echo esc_attr( apply_filters( 'woocommerce_order_item_class', 'order_item', $item, $order ) ); ?>">
<td class="td font-family text-align-left" style="vertical-align: middle; word-wrap:break-word;">
<?php if ( $email_improvements_enabled ) { ?>
<table class="order-item-data" role="presentation">
<tr>
<?php
// Show title/image etc.
if ( $show_image ) {
/**
* Email Order Item Thumbnail hook.
*
* @param string $image The image HTML.
* @param WC_Order_Item_Product $item The item being displayed.
* @since 2.1.0
*/
echo '<td>' . wp_kses_post( apply_filters( 'woocommerce_order_item_thumbnail', $image, $item ) ) . '</td>';
}
?>
<td>
<?php
/**
* Order Item Name hook.
*
* @param string $item_name The item name HTML.
* @param WC_Order_Item_Product $item The item being displayed.
* @since 2.1.0
*/
$order_item_name = apply_filters( 'woocommerce_order_item_name', $item->get_name(), $item, false );
echo wp_kses_post( "<h3 style='font-size: inherit;font-weight: inherit;'>{$order_item_name}</h3>" );
// SKU.
if ( $show_sku && $sku ) {
echo wp_kses_post( ' (#' . $sku . ')' );
}
/**
* Allow other plugins to add additional product information.
*
* @param int $item_id The item ID.
* @param WC_Order_Item_Product $item The item object.
* @param WC_Order $order The order object.
* @param bool $plain_text Whether the email is plain text or not.
* @since 2.3.0
*/
do_action( 'woocommerce_order_item_meta_start', $item_id, $item, $order, $plain_text );
$item_meta = wc_display_item_meta(
$item,
array(
'before' => '',
'after' => '',
'separator' => '<br>',
'echo' => false,
'label_before' => '<span>',
'label_after' => ':</span> ',
)
);
echo '<div class="email-order-item-meta">';
// Using wp_kses instead of wp_kses_post to remove all block elements.
echo wp_kses(
$item_meta,
array(
'br' => array(),
'span' => array(),
'a' => array(
'href' => true,
'target' => true,
'rel' => true,
'title' => true,
),
)
);
echo '</div>';
/**
* Allow other plugins to add additional product information.
*
* @param int $item_id The item ID.
* @param WC_Order_Item_Product $item The item object.
* @param WC_Order $order The order object.
* @param bool $plain_text Whether the email is plain text or not.
* @since 2.3.0
*/
do_action( 'woocommerce_order_item_meta_end', $item_id, $item, $order, $plain_text );
?>
</td>
</tr>
</table>
<?php
} else {
// Show title/image etc.
if ( $show_image ) {
/**
* Email Order Item Thumbnail hook.
*
* @param string $image The image HTML.
* @param WC_Order_Item_Product $item The item being displayed.
* @since 2.1.0
*/
echo wp_kses_post( apply_filters( 'woocommerce_order_item_thumbnail', $image, $item ) );
}
/**
* Order Item Name hook.
*
* @param string $item_name The item name HTML.
* @param WC_Order_Item_Product $item The item being displayed.
* @since 2.1.0
*/
echo wp_kses_post( apply_filters( 'woocommerce_order_item_name', $item->get_name(), $item, false ) );
// SKU.
if ( $show_sku && $sku ) {
echo wp_kses_post( ' (#' . $sku . ')' );
}
/**
* Allow other plugins to add additional product information.
*
* @param int $item_id The item ID.
* @param WC_Order_Item_Product $item The item object.
* @param WC_Order $order The order object.
* @param bool $plain_text Whether the email is plain text or not.
* @since 2.3.0
*/
do_action( 'woocommerce_order_item_meta_start', $item_id, $item, $order, $plain_text );
wc_display_item_meta(
$item,
array(
'label_before' => '<strong class="wc-item-meta-label" style="float: ' . ( is_rtl() ? 'right' : 'left' ) . '; margin-' . esc_attr( $margin_side ) . ': .25em; clear: both">',
)
);
/**
* Allow other plugins to add additional product information.
*
* @param int $item_id The item ID.
* @param WC_Order_Item_Product $item The item object.
* @param WC_Order $order The order object.
* @param bool $plain_text Whether the email is plain text or not.
* @since 2.3.0
*/
do_action( 'woocommerce_order_item_meta_end', $item_id, $item, $order, $plain_text );
}
?>
</td>
<td class="td font-family text-align-<?php echo esc_attr( $price_text_align ); ?>" style="vertical-align:middle;">
<?php
echo $email_improvements_enabled ? '&times;' : '';
$qty = $item->get_quantity();
$refunded_qty = $order->get_qty_refunded_for_item( $item_id );
if ( $refunded_qty ) {
$qty_display = '<del>' . esc_html( $qty ) . '</del> <ins>' . esc_html( $qty - ( $refunded_qty * -1 ) ) . '</ins>';
} else {
$qty_display = esc_html( $qty );
}
echo wp_kses_post( apply_filters( 'woocommerce_email_order_item_quantity', $qty_display, $item ) );
?>
</td>
<td class="td font-family text-align-<?php echo esc_attr( $price_text_align ); ?>" style="vertical-align:middle;">
<?php echo wp_kses_post( $order->get_formatted_line_subtotal( $item ) ); ?>
</td>
</tr>
<?php
if ( $show_purchase_note && $purchase_note ) {
?>
<tr>
<td colspan="3" class="font-family text-align-left" style="vertical-align:middle;">
<?php
echo wp_kses_post( wpautop( do_shortcode( $purchase_note ) ) );
?>
</td>
</tr>
<?php
}
?>
<?php endforeach; ?>

View File

@@ -0,0 +1,542 @@
<?php
/**
* Email Styles
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/email-styles.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails
* @version 10.5.0
*/
use Automattic\WooCommerce\Internal\Email\EmailFont;
use Automattic\WooCommerce\Utilities\FeaturesUtil;
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
$email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
// Load colors.
$bg = get_option( 'woocommerce_email_background_color' );
$body = get_option( 'woocommerce_email_body_background_color' );
$base = get_option( 'woocommerce_email_base_color' );
$text = get_option( 'woocommerce_email_text_color' );
$footer_text = get_option( 'woocommerce_email_footer_text_color' );
$header_alignment = get_option( 'woocommerce_email_header_alignment', $email_improvements_enabled ? 'left' : false );
$logo_image_width = get_option( 'woocommerce_email_header_image_width', '120' );
$default_font = 'Helvetica';
$font_family = $email_improvements_enabled ? get_option( 'woocommerce_email_font_family', $default_font ) : $default_font;
/**
* Check if we are in preview mode (WooCommerce > Settings > Emails).
*
* @since 9.6.0
* @param bool $is_email_preview Whether the email is being previewed.
*/
$is_email_preview = apply_filters( 'woocommerce_is_email_preview', false );
if ( $is_email_preview ) {
$bg_transient = get_transient( 'woocommerce_email_background_color' );
$body_transient = get_transient( 'woocommerce_email_body_background_color' );
$base_transient = get_transient( 'woocommerce_email_base_color' );
$text_transient = get_transient( 'woocommerce_email_text_color' );
$footer_text_transient = get_transient( 'woocommerce_email_footer_text_color' );
$header_alignment_transient = get_transient( 'woocommerce_email_header_alignment' );
$logo_image_width_transient = get_transient( 'woocommerce_email_header_image_width' );
$font_family_transient = get_transient( 'woocommerce_email_font_family' );
$bg = $bg_transient ? $bg_transient : $bg;
$body = $body_transient ? $body_transient : $body;
$base = $base_transient ? $base_transient : $base;
$text = $text_transient ? $text_transient : $text;
$footer_text = $footer_text_transient ? $footer_text_transient : $footer_text;
$header_alignment = $header_alignment_transient ? $header_alignment_transient : $header_alignment;
$logo_image_width = $logo_image_width_transient ? $logo_image_width_transient : $logo_image_width;
$font_family = $font_family_transient ? $font_family_transient : $font_family;
}
// Only use safe fonts. They won't be escaped to preserve single quotes.
$safe_font_family = EmailFont::$font[ $font_family ] ?? EmailFont::$font[ $default_font ];
$base_text = wc_light_or_dark( $base, '#202020', '#ffffff' );
// Pick a contrasting color for links.
$link_color = wc_hex_is_light( $base ) ? $base : $base_text;
if ( wc_hex_is_light( $body ) ) {
$link_color = wc_hex_is_light( $base ) ? $base_text : $base;
}
// If email improvements are enabled, always use the base color for links.
if ( $email_improvements_enabled ) {
$link_color = $base;
}
$border_color = wc_light_or_dark( $body, 'rgba(0, 0, 0, .2)', 'rgba(255, 255, 255, .2)' );
$bg_darker_10 = wc_hex_darker( $bg, 10 );
$body_darker_10 = wc_hex_darker( $body, 10 );
$base_lighter_20 = wc_hex_lighter( $base, 20 );
$base_lighter_40 = wc_hex_lighter( $base, 40 );
$text_lighter_20 = wc_hex_lighter( $text, 20 );
$text_lighter_40 = wc_hex_lighter( $text, 40 );
// !important; is a gmail hack to prevent styles being stripped if it doesn't like something.
// body{padding: 0;} ensures proper scale/positioning of the email in the iOS native email app.
?>
body {
background-color: <?php echo esc_attr( $bg ); ?>;
padding: 0;
text-align: center;
}
#outer_wrapper {
background-color: <?php echo esc_attr( $bg ); ?>;
}
<?php if ( $email_improvements_enabled ) : ?>
#inner_wrapper {
background-color: <?php echo esc_attr( $body ); ?>;
border-radius: 8px;
}
<?php endif; ?>
#wrapper {
margin: 0 auto;
padding: <?php echo $email_improvements_enabled ? '24px 0' : '70px 0'; ?>;
-webkit-text-size-adjust: none !important;
width: 100%;
max-width: 600px;
}
#template_container {
box-shadow: <?php echo $email_improvements_enabled ? 'none' : '0 1px 4px rgba(0, 0, 0, 0.1) !important'; ?>;
background-color: <?php echo esc_attr( $body ); ?>;
border: <?php echo $email_improvements_enabled ? '0' : '1px solid ' . esc_attr( $bg_darker_10 ); ?>;
border-radius: 3px !important;
}
#template_header {
background-color: <?php echo esc_attr( $email_improvements_enabled ? $body : $base ); ?>;
border-radius: 3px 3px 0 0 !important;
color: <?php echo esc_attr( $email_improvements_enabled ? $text : $base_text ); ?>;
border-bottom: 0;
font-weight: bold;
line-height: 100%;
vertical-align: middle;
font-family: <?php echo $safe_font_family; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>;
}
#template_header h1,
#template_header h1 a {
color: <?php echo esc_attr( $email_improvements_enabled ? $text : $base_text ); ?>;
background-color: inherit;
}
<?php if ( $email_improvements_enabled ) : ?>
.hr {
border-bottom: 1px solid #1e1e1e;
opacity: 0.2;
margin: 16px 0;
}
.hr-top {
margin-top: 32px;
}
.hr-bottom {
margin-bottom: 32px;
}
#template_header_image {
padding: 32px 32px 0;
}
#template_header_image p {
margin-bottom: 0;
text-align: <?php echo esc_attr( $header_alignment ); ?>;
}
#template_header_image img {
width: <?php echo esc_attr( $logo_image_width ); ?>px;
}
.email-logo-text {
color: <?php echo esc_attr( $link_color ); ?>;
font-family: <?php echo $safe_font_family; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>;
font-size: 18px;
}
.email-introduction {
padding-bottom: 24px;
}
.email-order-item-meta {
color: <?php echo esc_attr( $footer_text ); ?>;
font-size: 14px;
line-height: 140%;
}
#body_content table td td.email-additional-content {
color: <?php echo esc_attr( $text ); ?>;
font-family: <?php echo $safe_font_family; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>;
padding: 32px 0 0;
}
.email-additional-content p {
text-align: center;
}
.email-additional-content-aligned p {
text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>;
}
<?php else : ?>
#template_header_image img {
margin-left: 0;
margin-right: 0;
}
<?php endif; ?>
#template_footer td {
padding: 0;
border-radius: <?php echo $email_improvements_enabled ? '0' : '6px'; ?>;
}
#template_footer #credit {
border: 0;
<?php if ( $email_improvements_enabled ) : ?>
border-top: 1px solid <?php echo esc_attr( $border_color ); ?>;
<?php endif; ?>
color: <?php echo esc_attr( $footer_text ); ?>;
font-family: <?php echo $safe_font_family; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>;
font-size: 12px;
line-height: <?php echo $email_improvements_enabled ? '140%' : '150%'; ?>;
text-align: center;
padding: <?php echo $email_improvements_enabled ? '32px' : '24px 0'; ?>;
}
#template_footer #credit p {
margin: <?php echo $email_improvements_enabled ? '0' : '0 0 16px'; ?>;
}
#body_content {
background-color: <?php echo esc_attr( $body ); ?>;
}
#body_content table td {
padding: <?php echo $email_improvements_enabled ? '20px 32px 32px' : '48px 48px 32px'; ?>;
}
#body_content table td td {
padding: 12px;
}
#body_content table td th {
padding: 12px;
}
#body_content table .email-order-details td,
#body_content table .email-order-details th {
padding: 8px 12px;
}
#body_content table .email-order-details td:first-child,
#body_content table .email-order-details th:first-child {
padding-<?php echo is_rtl() ? 'right' : 'left'; ?>: 0;
}
#body_content table .email-order-details td:last-child,
#body_content table .email-order-details th:last-child {
padding-<?php echo is_rtl() ? 'left' : 'right'; ?>: 0;
}
#body_content .email-order-details tbody tr:last-child td {
border-bottom: 1px solid <?php echo esc_attr( $border_color ); ?>;
padding-bottom: 24px;
}
#body_content .email-order-details tfoot tr:first-child td,
#body_content .email-order-details tfoot tr:first-child th {
padding-top: 24px;
}
#body_content .order-item-data td {
border: 0 !important;
padding: 0 !important;
vertical-align: middle;
}
#body_content .email-order-details .order-totals td,
#body_content .email-order-details .order-totals th {
font-weight: normal;
padding-bottom: 5px;
padding-top: 5px;
}
#body_content .email-order-details .order-totals .includes_tax {
display: block;
}
#body_content .email-order-details .order-totals-total th {
font-weight: bold;
}
#body_content .email-order-details .order-totals-total td {
font-weight: bold;
font-size: 20px;
}
#body_content .email-order-details .order-totals-last td,
#body_content .email-order-details .order-totals-last th {
border-bottom: 1px solid <?php echo esc_attr( $border_color ); ?>;
padding-bottom: 24px;
}
#body_content .email-order-details .order-customer-note td {
border-bottom: 1px solid <?php echo esc_attr( $border_color ); ?>;
padding-bottom: 24px;
padding-top: 24px;
}
#body_content td ul.wc-item-meta {
font-size: small;
margin: 1em 0 0;
padding: 0;
list-style: none;
}
#body_content td ul.wc-item-meta li {
margin: 0.5em 0 0;
padding: 0;
}
#body_content td ul.wc-item-meta li p {
margin: 0;
}
#body_content .email-order-details .wc-item-meta-label {
clear: both;
float: <?php echo is_rtl() ? 'right' : 'left'; ?>;
font-weight: normal;
margin-<?php echo is_rtl() ? 'left' : 'right'; ?>: .25em;
}
#body_content p {
margin: 0 0 16px;
}
#body_content_inner {
color: <?php echo esc_attr( $text_lighter_20 ); ?>;
font-family: <?php echo $safe_font_family; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>;
font-size: <?php echo $email_improvements_enabled ? '16px' : '14px'; ?>;
line-height: 150%;
text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>;
}
.td {
color: <?php echo esc_attr( $text_lighter_20 ); ?>;
border: <?php echo $email_improvements_enabled ? '0' : '1px solid ' . esc_attr( $body_darker_10 ); ?>;
vertical-align: middle;
}
.address {
<?php if ( $email_improvements_enabled ) { ?>
color: <?php echo esc_attr( $text ); ?>;
font-style: normal;
padding: 8px 0;
<?php } else { ?>
padding: 12px;
color: <?php echo esc_attr( $text_lighter_20 ); ?>;
border: 1px solid <?php echo esc_attr( $body_darker_10 ); ?>;
<?php } ?>
word-break: break-all;
}
<?php if ( $email_improvements_enabled ) : ?>
#addresses td + td {
padding-<?php echo is_rtl() ? 'right' : 'left'; ?>: 10px !important;
}
<?php endif; ?>
.additional-fields {
padding: 12px 12px 0;
color: <?php echo esc_attr( $text_lighter_20 ); ?>;
border: 1px solid <?php echo esc_attr( $body_darker_10 ); ?>;
list-style: none outside;
}
.additional-fields li {
margin: 0 0 12px 0;
}
.text,
.address-title,
.order-item-data {
color: <?php echo esc_attr( $text ); ?>;
font-family: <?php echo $safe_font_family; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>;
}
.link {
color: <?php echo esc_attr( $link_color ); ?>;
}
#header_wrapper {
padding: <?php echo $email_improvements_enabled ? '20px 32px 0' : '36px 48px'; ?>;
display: block;
}
<?php if ( $header_alignment ) : ?>
#header_wrapper h1 {
text-align: <?php echo esc_attr( $header_alignment ); ?>;
}
<?php endif; ?>
#template_footer #credit,
#template_footer #credit a {
color: <?php echo esc_attr( $footer_text ); ?>;
}
h1 {
color: <?php echo esc_attr( $email_improvements_enabled ? $text : $base ); ?>;
font-family: <?php echo $safe_font_family; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>;
font-size: <?php echo $email_improvements_enabled ? '32px' : '30px'; ?>;
font-weight: <?php echo $email_improvements_enabled ? 700 : 300; ?>;
<?php if ( $email_improvements_enabled ) : ?>
letter-spacing: -1px;
<?php endif; ?>
line-height: <?php echo $email_improvements_enabled ? '120%' : '150%'; ?>;
margin: 0;
text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>;
<?php if ( ! $email_improvements_enabled ) : ?>
text-shadow: 0 1px 0 <?php echo esc_attr( $base_lighter_20 ); ?>;
<?php endif; ?>
}
h2 {
color: <?php echo esc_attr( $email_improvements_enabled ? $text : $base ); ?>;
display: block;
font-family: <?php echo $safe_font_family; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>;
font-size: <?php echo $email_improvements_enabled ? '20px' : '18px'; ?>;
font-weight: bold;
line-height: <?php echo $email_improvements_enabled ? '160%' : '130%'; ?>;
margin: 0 0 18px;
text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>;
}
h3 {
color: <?php echo esc_attr( $email_improvements_enabled ? $text : $base ); ?>;
display: block;
font-family: <?php echo $safe_font_family; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>;
font-size: 16px;
font-weight: bold;
line-height: <?php echo $email_improvements_enabled ? '160%' : '130%'; ?>;
margin: 16px 0 8px;
text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>;
}
a {
color: <?php echo esc_attr( $link_color ); ?>;
font-weight: normal;
text-decoration: underline;
}
img {
border: none;
display: inline-block;
font-size: 14px;
font-weight: bold;
height: auto;
outline: none;
text-decoration: none;
text-transform: capitalize;
vertical-align: middle;
margin-<?php echo is_rtl() ? 'left' : 'right'; ?>: <?php echo $email_improvements_enabled ? '24px' : '10px'; ?>;
max-width: 100%;
}
h2.email-order-detail-heading span {
color: <?php echo esc_attr( $footer_text ); ?>;
display: block;
font-size: 14px;
font-weight: normal;
}
.font-family {
font-family: <?php echo $safe_font_family; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>;
}
.text-align-left {
text-align: <?php echo is_rtl() ? 'right' : 'left'; ?>;
}
.text-align-right {
text-align: <?php echo is_rtl() ? 'left' : 'right'; ?>;
}
/**
* Media queries are not supported by all email clients, however they do work on modern mobile
* Gmail clients and can help us achieve better consistency there.
*/
@media screen and (max-width: 600px) {
<?php if ( $email_improvements_enabled ) : ?>
#template_header_image {
padding: 16px 10px 0 !important;
}
#header_wrapper {
padding: 16px 10px 0 !important;
}
#header_wrapper h1 {
font-size: 24px !important;
}
#body_content_inner_cell {
padding: 10px !important;
}
#body_content_inner {
font-size: 12px !important;
}
.email-order-item-meta {
font-size: 12px !important;
}
#body_content .email-order-details .order-totals-total td {
font-size: 14px !important;
}
.email-order-detail-heading {
font-size: 16px !important;
line-height: 130% !important;
}
.email-additional-content {
padding-top: 16px !important;
}
<?php else : ?>
#header_wrapper {
padding: 27px 36px !important;
font-size: 24px;
}
#body_content table > tbody > tr > td {
padding: 10px !important;
}
#body_content_inner {
font-size: 10px !important;
}
<?php endif; ?>
}
<?php

View File

@@ -0,0 +1,67 @@
<?php
/**
* Admin cancelled order email (plain text)
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/admin-cancelled-order.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Plain
* @version 9.8.0
*/
use Automattic\WooCommerce\Utilities\FeaturesUtil;
defined( 'ABSPATH' ) || exit;
$email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
echo esc_html( wp_strip_all_tags( $email_heading ) );
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
/* translators: %1$s: Order number. %2$s: Customer full name */
$text = __( 'Notification to let you know &mdash; order #%1$s belonging to %2$s has been cancelled:', 'woocommerce' );
if ( $email_improvements_enabled ) {
/* translators: %1$s: Order number. %2$s: Customer full name */
$text = __( 'Were getting in touch to let you know that order #%1$s from %2$s has been cancelled.', 'woocommerce' );
}
echo sprintf( esc_html( $text ), esc_html( $order->get_order_number() ), esc_html( $order->get_formatted_billing_full_name() ) ) . "\n\n";
/*
* @hooked WC_Emails::order_details() Shows the order details table.
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
* @since 2.5.0
*/
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
echo "\n----------------------------------------\n\n";
/*
* @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 );
echo "\n\n----------------------------------------\n\n";
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
echo "\n\n----------------------------------------\n\n";
}
echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );

View File

@@ -0,0 +1,67 @@
<?php
/**
* Admin failed order email (plain text)
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/admin-failed-order.php
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Plain
* @version 9.8.0
*/
use Automattic\WooCommerce\Utilities\FeaturesUtil;
defined( 'ABSPATH' ) || exit;
$email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
echo esc_html( wp_strip_all_tags( $email_heading ) );
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
/* translators: %1$s: Order number. %2$s: Customer full name. */
$text = __( 'Payment for order #%1$s from %2$s has failed. The order was as follows:', 'woocommerce' );
if ( $email_improvements_enabled ) {
/* translators: %1$s: Order number. %2$s: Customer full name. */
$text = __( 'Unfortunately, the payment for order #%1$s from %2$s has failed. The order was as follows:', 'woocommerce' );
}
echo sprintf( esc_html( $text ), esc_html( $order->get_order_number() ), esc_html( $order->get_formatted_billing_full_name() ) ) . "\n\n";
/*
* @hooked WC_Emails::order_details() Shows the order details table.
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
* @since 2.5.0
*/
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
echo "\n----------------------------------------\n\n";
/*
* @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 );
echo "\n\n----------------------------------------\n\n";
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
echo "\n\n----------------------------------------\n\n";
}
echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );

View File

@@ -0,0 +1,67 @@
<?php
/**
* Admin new order email (plain text)
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/admin-new-order.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Plain
* @version 10.0.0
*/
use Automattic\WooCommerce\Utilities\FeaturesUtil;
defined( 'ABSPATH' ) || exit;
$email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
echo esc_html( wp_strip_all_tags( $email_heading ) );
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
/* translators: %s: Customer billing full name */
$text = __( 'Youve received the following order from %s:', 'woocommerce' );
if ( $email_improvements_enabled ) {
/* translators: %s: Customer billing full name */
$text = __( 'Youve received a new order from %s:', 'woocommerce' );
}
echo sprintf( esc_html( $text ), esc_html( $order->get_formatted_billing_full_name() ) ) . "\n\n";
/*
* @hooked WC_Emails::order_details() Shows the order details table.
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
* @since 2.5.0
*/
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
echo "\n----------------------------------------\n\n";
/*
* @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 );
echo "\n\n----------------------------------------\n\n";
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
echo "\n\n----------------------------------------\n\n";
}
echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );

View File

@@ -0,0 +1,81 @@
<?php
/**
* Customer cancelled order email (plain text)
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/customer-cancelled-order.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Plain
* @version 10.0.0
*/
use Automattic\WooCommerce\Utilities\FeaturesUtil;
defined( 'ABSPATH' ) || exit;
$email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
echo esc_html( wp_strip_all_tags( $email_heading ) );
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
/* translators: %1$s: Order number */
$text = __( 'Were sorry to let you know that your order #%1$s has been cancelled.', 'woocommerce' );
if ( $email_improvements_enabled ) {
/* translators: %1$s: Order number */
$text = __( 'Were getting in touch to let you know that your order #%1$s has been cancelled.', 'woocommerce' );
}
echo sprintf( esc_html( $text ), esc_html( $order->get_order_number() ) ) . "\n\n";
/**
* Hook: woocommerce_email_order_details.
*
* @hooked WC_Emails::order_details() Shows the order details table.
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
* @since 2.5.0
*/
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
echo "\n----------------------------------------\n\n";
/**
* Hook: woocommerce_email_order_meta.
*
* @hooked WC_Emails::order_meta() Shows order meta data.
* @since 2.5.0
*/
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
/**
* Hook: woocommerce_email_customer_details.
*
* @hooked WC_Emails::customer_details() Shows customer details
* @hooked WC_Emails::email_address() Shows email address
* @since 2.5.0
*/
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
echo "\n\n----------------------------------------\n\n";
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
echo "\n\n----------------------------------------\n\n";
}
/**
* Hook: woocommerce_email_footer.
*
* @hooked WC_Emails::email_footer() Output the email footer
* @since 2.5.0
*/
do_action( 'woocommerce_email_footer', $email );

View File

@@ -0,0 +1,66 @@
<?php
/**
* Customer completed order email (plain text)
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/customer-completed-order.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Plain
* @version 9.9.0
*/
use Automattic\WooCommerce\Utilities\FeaturesUtil;
defined( 'ABSPATH' ) || exit;
$email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
echo esc_html( wp_strip_all_tags( $email_heading ) );
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
/* translators: %s: Customer first name */
echo sprintf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ) . "\n\n";
echo esc_html__( 'We have finished processing your order.', 'woocommerce' ) . "\n\n";
if ( $email_improvements_enabled ) {
echo esc_html__( 'Heres a reminder of what youve ordered:', 'woocommerce' ) . "\n\n";
}
/*
* @hooked WC_Emails::order_details() Shows the order details table.
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
* @since 2.5.0
*/
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
echo "\n----------------------------------------\n\n";
/*
* @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 );
echo "\n\n----------------------------------------\n\n";
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
echo "\n\n----------------------------------------\n\n";
}
echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );

View File

@@ -0,0 +1,75 @@
<?php
/**
* Customer failed order email (plain text)
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/customer-failed-order.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Plain
* @version 9.8.0
*/
defined( 'ABSPATH' ) || exit;
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
echo esc_html( wp_strip_all_tags( $email_heading ) );
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
/* translators: %s: Customer first name */
echo sprintf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ) . "\n\n";
echo esc_html__( "Unfortunately, we couldn't complete your order due to an issue with your payment method.", 'woocommerce' ) . "\n\n";
/* translators: %s: Site title */
echo sprintf( 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 ) ) . "\n\n";
echo esc_html__( 'Your order details are as follows:', 'woocommerce' ) . "\n\n";
/**
* Hook for the woocommerce_email_order_details.
*
* @hooked WC_Emails::order_details() Shows the order details table.
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
* @since 2.5.0
*/
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
echo "\n----------------------------------------\n\n";
/**
* Hook for the woocommerce_email_order_meta.
*
* @hooked WC_Emails::order_meta() Shows order meta data.
* @since 1.0.0
*/
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
/**
* Hook for woocommerce_email_customer_details.
*
* @hooked WC_Emails::customer_details() Shows customer details
* @hooked WC_Emails::email_address() Shows email address
* @since 1.0.0
*/
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
echo "\n\n----------------------------------------\n\n";
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
echo "\n\n----------------------------------------\n\n";
}
/**
* Filters the email footer text.
*
* @since 3.7.0
*/
echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );

View File

@@ -0,0 +1,73 @@
<?php
/**
* Customer fulfillment created email (plain text)
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/customer-fulfillment-created.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Plain
* @version 10.1.0
*/
defined( 'ABSPATH' ) || exit;
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
echo esc_html( wp_strip_all_tags( $email_heading ) );
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
echo esc_html__( 'Woo! Some items you purchased are being fulfilled. You can use the below information to track your shipment:', 'woocommerce' ) . "\n\n";
/**
* Display fulfillment details.
*
* @hooked WC_Emails::fulfillment_details() Shows the order details table.
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
*
* @since 10.1.0
*/
do_action( 'woocommerce_email_fulfillment_details', $order, $fulfillment, $sent_to_admin, $plain_text, $email );
echo "\n----------------------------------------\n\n";
/**
* Display fulfillment meta data.
*
* @hooked WC_Emails::fulfillment_meta() Shows order meta data.
*
* @since 10.1.0
*/
do_action( 'woocommerce_email_fulfillment_meta', $order, $fulfillment, $sent_to_admin, $plain_text, $email );
/**
* Display customer details and email address.
*
* @hooked WC_Emails::customer_details() Shows customer details
* @hooked WC_Emails::email_address() Shows email address
*
* @since 2.5.0
*/
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
echo "\n\n----------------------------------------\n\n";
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
echo "\n\n----------------------------------------\n\n";
}
/**
* Display the email footer text.
*
* @since 2.5.0
*/
echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );

View File

@@ -0,0 +1,73 @@
<?php
/**
* Customer fulfillment deleted email (plain text)
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/customer-fulfillment-deleted.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Plain
* @version 10.1.0
*/
defined( 'ABSPATH' ) || exit;
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
echo esc_html( wp_strip_all_tags( $email_heading ) );
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
echo esc_html__( 'We wanted to let you know that one of the previously fulfilled shipments from your order has been removed from our system. This may have been due to a correction or an update in our fulfillment records. Dont worry — this wont affect any items youve already received.', 'woocommerce' ) . "\n\n";
/**
* Display fulfillment details.
*
* @hooked WC_Emails::fulfillment_details() Shows the order details table.
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
*
* @since 10.1.0
*/
do_action( 'woocommerce_email_fulfillment_details', $order, $fulfillment, $sent_to_admin, $plain_text, $email );
echo "\n----------------------------------------\n\n";
/**
* Display fulfillment meta data.
*
* @hooked WC_Emails::fulfillment_meta() Shows order meta data.
*
* @since 10.1.0
*/
do_action( 'woocommerce_email_fulfillment_meta', $order, $fulfillment, $sent_to_admin, $plain_text, $email );
/**
* Display customer details and email address.
*
* @hooked WC_Emails::customer_details() Shows customer details
* @hooked WC_Emails::email_address() Shows email address
*
* @since 2.5.0
*/
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
echo "\n\n----------------------------------------\n\n";
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
echo "\n\n----------------------------------------\n\n";
}
/**
* Display the email footer text.
*
* @since 2.5.0
*/
echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );

View File

@@ -0,0 +1,75 @@
<?php
/**
* Customer fulfillment updated email (plain text)
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/customer-fulfillment-updated.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Plain
* @version 10.1.0
*/
defined( 'ABSPATH' ) || exit;
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
echo esc_html( wp_strip_all_tags( $email_heading ) );
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
/* translators: %s: Customer first name */
echo esc_html__( 'Some details of your shipment have recently been updated. This may include tracking information, item contents, or delivery status.', 'woocommerce' ) . "\n\n";
echo esc_html__( 'Heres the latest info we have:', 'woocommerce' ) . "\n\n";
/**
* Display fulfillment details.
*
* @hooked WC_Emails::fulfillment_details() Shows the order details table.
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
*
* @since 10.1.0
*/
do_action( 'woocommerce_email_fulfillment_details', $order, $fulfillment, $sent_to_admin, $plain_text, $email );
echo "\n----------------------------------------\n\n";
/**
* Display fulfillment meta data.
*
* @hooked WC_Emails::fulfillment_meta() Shows order meta data.
*
* @since 10.1.0
*/
do_action( 'woocommerce_email_fulfillment_meta', $order, $fulfillment, $sent_to_admin, $plain_text, $email );
/**
* Display customer details and email address.
*
* @hooked WC_Emails::customer_details() Shows customer details
* @hooked WC_Emails::email_address() Shows email address
*
* @since 2.5.0
*/
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
echo "\n\n----------------------------------------\n\n";
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
echo "\n\n----------------------------------------\n\n";
}
/**
* Display the email footer text.
*
* @since 2.5.0
*/
echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );

View File

@@ -0,0 +1,95 @@
<?php
/**
* Customer invoice email (plain text)
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/customer-invoice.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Plain
* @version 9.7.0
*/
// phpcs:disable Universal.WhiteSpace.PrecisionAlignment.Found, Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed -- Plain text output needs specific spacing without tabs
use Automattic\WooCommerce\Enums\OrderStatus;
defined( 'ABSPATH' ) || exit;
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
echo esc_html( wp_strip_all_tags( $email_heading ) );
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
/* translators: %s: Customer first name */
echo sprintf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ) . "\n\n";
if ( $order->needs_payment() ) {
if ( $order->has_status( OrderStatus::FAILED ) ) {
echo wp_kses_post(
sprintf(
/* translators: %1$s: Site title, %2$s: Order pay link */
__( 'Sorry, your order on %1$s was unsuccessful. Your order details are below, with a link to try your payment again: %2$s', 'woocommerce' ),
esc_html( get_bloginfo( 'name', 'display' ) ),
esc_url( $order->get_checkout_payment_url() )
)
) . "\n\n";
} else {
echo wp_kses_post(
sprintf(
/* translators: %1$s: Site title, %2$s: Order pay link */
__( 'An order has been created for you on %1$s. Your order details are below, with a link to make payment when youre ready: %2$s', 'woocommerce' ),
esc_html( get_bloginfo( 'name', 'display' ) ),
esc_url( $order->get_checkout_payment_url() )
)
) . "\n\n";
}
} else {
/* translators: %s: Order date */
echo sprintf( esc_html__( 'Here are the details of your order placed on %s:', 'woocommerce' ), esc_html( wc_format_datetime( $order->get_date_created() ) ) ) . "\n\n";
}
/**
* Hook for the woocommerce_email_order_details.
*
* @hooked WC_Emails::order_details() Shows the order details table.
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
* @since 2.5.0
*/
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
echo "\n----------------------------------------\n\n";
/**
* Hook for the woocommerce_email_order_meta.
*
* @hooked WC_Emails::order_meta() Shows order meta data.
*/
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
/**
* Hook for woocommerce_email_customer_details
*
* @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 );
echo "\n\n----------------------------------------\n\n";
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
echo "\n\n----------------------------------------\n\n";
}
echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );
// phpcs:enable Universal.WhiteSpace.PrecisionAlignment.Found, Generic.WhiteSpace.DisallowSpaceIndent.SpacesUsed

View File

@@ -0,0 +1,61 @@
<?php
/**
* Customer new account email
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/customer-new-account.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Plain
* @version 10.0.0
*/
use Automattic\WooCommerce\Utilities\FeaturesUtil;
defined( 'ABSPATH' ) || exit;
$email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
echo esc_html( wp_strip_all_tags( $email_heading ) );
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
/* translators: %s: Customer username */
echo sprintf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $user_login ) ) . "\n\n";
if ( $email_improvements_enabled ) {
/* translators: %s: Site title */
echo sprintf( esc_html__( 'Thanks for creating an account on %s. Heres a copy of your user details.', 'woocommerce' ), esc_html( $blogname ) ) . "\n\n";
echo "----------------------------------------\n\n";
/* translators: %s: Username */
echo sprintf( esc_html__( 'Username: %s.', 'woocommerce' ), esc_html( $user_login ) ) . "\n\n";
echo "----------------------------------------\n\n";
echo esc_html__( 'You can access your account area to view orders, change your password, and more via the link below:', 'woocommerce' ) . "\n\n";
echo esc_html( wc_get_page_permalink( 'myaccount' ) ) . "\n\n";
} else {
/* translators: %1$s: Site title, %2$s: Username, %3$s: My account link */
echo sprintf( esc_html__( 'Thanks for creating an account on %1$s. Your username is %2$s. You can access your account area to view orders, change your password, and more at: %3$s', 'woocommerce' ), esc_html( $blogname ), esc_html( $user_login ), esc_html( wc_get_page_permalink( 'myaccount' ) ) ) . "\n\n";
}
// Only send the set new password link if the user hasn't set their password during sign-up.
if ( $password_generated && $set_password_url ) {
/* translators: URL follows */
echo esc_html__( 'To set your password, visit the following address: ', 'woocommerce' ) . "\n\n";
echo esc_html( $set_password_url ) . "\n\n";
}
echo "\n\n----------------------------------------\n\n";
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
echo "\n\n----------------------------------------\n\n";
}
echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );

View File

@@ -0,0 +1,67 @@
<?php
/**
* Customer note email
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/customer-note.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Plain
* @version 10.1.0
*/
defined( 'ABSPATH' ) || exit;
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
echo esc_html( wp_strip_all_tags( $email_heading ) );
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
/* translators: %s: Customer first name */
echo sprintf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ) . "\n\n";
echo esc_html__( 'The following note has been added to your order:', 'woocommerce' ) . "\n\n";
echo "----------\n\n";
echo wc_wptexturize_order_note( $customer_note ) . "\n\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo "----------\n\n";
echo esc_html__( 'As a reminder, here are your order details:', 'woocommerce' ) . "\n\n";
/*
* @hooked WC_Emails::order_details() Shows the order details table.
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
* @since 2.5.0
*/
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
echo "\n----------------------------------------\n\n";
/*
* @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 );
echo "\n\n----------------------------------------\n\n";
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
echo "\n\n----------------------------------------\n\n";
}
echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );

View File

@@ -0,0 +1,68 @@
<?php
/**
* Customer on-hold order email
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/customer-on-hold-order.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Plain
* @version 9.8.0
*/
use Automattic\WooCommerce\Utilities\FeaturesUtil;
defined( 'ABSPATH' ) || exit;
$email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
echo esc_html( wp_strip_all_tags( $email_heading ) );
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
/* translators: %s: Customer first name */
echo sprintf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ) . "\n\n";
if ( $email_improvements_enabled ) {
echo esc_html__( 'Weve received your order and its currently on hold until we can confirm your payment has been processed.', 'woocommerce' ) . "\n\n";
echo esc_html__( 'Heres a reminder of what youve ordered:', 'woocommerce' ) . "\n\n";
} else {
echo esc_html__( 'Thanks for your order. Its on-hold until we confirm that payment has been received.', 'woocommerce' ) . "\n\n";
}
/*
* @hooked WC_Emails::order_details() Shows the order details table.
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
* @since 2.5.0
*/
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
echo "\n----------------------------------------\n\n";
/*
* @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 );
echo "\n\n----------------------------------------\n\n";
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
echo "\n\n----------------------------------------\n\n";
}
echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );

View File

@@ -0,0 +1,109 @@
<?php
/**
* Customer POS completed order email (plain text)
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/customer-pos-completed-order.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Plain
* @version 10.0.0
*/
use Automattic\WooCommerce\Utilities\FeaturesUtil;
defined( 'ABSPATH' ) || exit;
$email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
$email = $email ?? null;
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
echo esc_html( wp_strip_all_tags( $email_heading ) );
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
if ( ! empty( $order->get_billing_first_name() ) ) {
/* translators: %s: Customer first name */
echo sprintf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ) . "\n\n";
} else {
echo esc_html__( 'Hi there,', 'woocommerce' ) . "\n\n";
}
echo esc_html__( 'Heres a reminder of what youve ordered:', 'woocommerce' ) . "\n\n";
/**
* Show the order details table, generate and output structured data.
*
* @hooked WC_Emails::order_details() Shows the order details table.
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
* @since 2.5.0
*/
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
echo "\n----------------------------------------\n\n";
/**
* Show order meta data.
*
* @hooked WC_Emails::order_meta() Shows order meta data.
* @since 1.0.0
*/
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
/**
* Show customer details and email address.
*
* @hooked WC_Emails::customer_details() Shows customer details
* @hooked WC_Emails::email_address() Shows email address
* @since 1.0.0
*/
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
echo "\n\n----------------------------------------\n\n";
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
echo "\n\n----------------------------------------\n\n";
}
/**
* Show store information - store details are set in the Point of Sale settings.
*/
if ( ! empty( $pos_store_email ) || ! empty( $pos_store_phone_number ) || ! empty( $pos_store_address ) ) {
if ( ! empty( $pos_store_name ) ) {
echo "\n" . esc_html( $pos_store_name ) . "\n\n";
}
if ( ! empty( $pos_store_email ) ) {
echo esc_html( $pos_store_email ) . "\n";
}
if ( ! empty( $pos_store_phone_number ) ) {
echo esc_html( $pos_store_phone_number ) . "\n";
}
if ( ! empty( $pos_store_address ) ) {
echo esc_html( wp_strip_all_tags( wptexturize( $pos_store_address ) ) ) . "\n";
}
echo "\n----------------------------------------\n\n";
}
/**
* Show refund & returns policy - this is set in the Point of Sale settings.
*/
if ( ! empty( $pos_refund_returns_policy ) ) {
echo "\n" . esc_html__( 'Refund & Returns Policy', 'woocommerce' ) . "\n\n";
echo esc_html( wp_strip_all_tags( wptexturize( $pos_refund_returns_policy ) ) ) . "\n";
echo "\n----------------------------------------\n\n";
}
/**
* Filter the email footer text.
*
* @since 4.0.0
*/
echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ), $email ) );

View File

@@ -0,0 +1,116 @@
<?php
/**
* Customer POS refunded order email (plain text)
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/customer-pos-refunded-order.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Plain
* @version 10.0.0
*/
use Automattic\WooCommerce\Utilities\FeaturesUtil;
defined( 'ABSPATH' ) || exit;
$email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
$email = $email ?? null;
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
echo esc_html( wp_strip_all_tags( $email_heading ) );
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
if ( ! empty( $order->get_billing_first_name() ) ) {
/* translators: %s: Customer first name */
echo sprintf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ) . "\n\n";
} else {
echo esc_html__( 'Hi there,', 'woocommerce' ) . "\n\n";
}
if ( $partial_refund ) {
/* translators: %s: Site title */
echo sprintf( esc_html__( 'Your order from %s has been partially refunded.', 'woocommerce' ), esc_html( $pos_store_name ) ) . "\n\n";
} else {
/* translators: %s: Site title */
echo sprintf( esc_html__( 'Your order from %s has been refunded.', 'woocommerce' ), esc_html( $pos_store_name ) ) . "\n\n";
}
echo esc_html__( 'Heres a reminder of what youve bought:', 'woocommerce' ) . "\n\n";
/**
* Show order details.
*
* @hooked WC_Emails::order_details() Shows the order details table.
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
* @since 2.5.0
*/
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
echo "\n----------------------------------------\n\n";
/**
* Show order meta data.
*
* @hooked WC_Emails::order_meta() Shows order meta data.
* @since 1.0.0
*/
do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text, $email );
/**
* Show customer details and email address.
*
* @hooked WC_Emails::customer_details() Shows customer details
* @hooked WC_Emails::email_address() Shows email address
* @since 1.0.0
*/
do_action( 'woocommerce_email_customer_details', $order, $sent_to_admin, $plain_text, $email );
echo "\n\n----------------------------------------\n\n";
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
echo "\n\n----------------------------------------\n\n";
}
/**
* Show store information - store details are set in the Point of Sale settings.
*/
if ( ! empty( $pos_store_email ) || ! empty( $pos_store_phone_number ) || ! empty( $pos_store_address ) ) {
if ( ! empty( $pos_store_name ) ) {
echo "\n" . esc_html( $pos_store_name ) . "\n\n";
}
if ( ! empty( $pos_store_email ) ) {
echo esc_html( $pos_store_email ) . "\n";
}
if ( ! empty( $pos_store_phone_number ) ) {
echo esc_html( $pos_store_phone_number ) . "\n";
}
if ( ! empty( $pos_store_address ) ) {
echo esc_html( wp_strip_all_tags( wptexturize( $pos_store_address ) ) ) . "\n";
}
echo "\n----------------------------------------\n\n";
}
/**
* Show refund & returns policy - this is set in the Point of Sale settings.
*/
if ( ! empty( $pos_refund_returns_policy ) ) {
echo "\n" . esc_html__( 'Refund & Returns Policy', 'woocommerce' ) . "\n\n";
echo esc_html( wp_strip_all_tags( wptexturize( $pos_refund_returns_policy ) ) ) . "\n";
echo "\n----------------------------------------\n\n";
}
/**
* Filter the email footer text.
*
* @since 4.0.0
*/
echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ), $email ) );

View File

@@ -0,0 +1,69 @@
<?php
/**
* Customer processing order email
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/customer-processing-order.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Plain
* @version 9.9.0
*/
use Automattic\WooCommerce\Utilities\FeaturesUtil;
defined( 'ABSPATH' ) || exit;
$email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
echo esc_html( wp_strip_all_tags( $email_heading ) );
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
/* translators: %s: Customer first name */
echo sprintf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ) . "\n\n";
if ( $email_improvements_enabled ) {
echo esc_html__( 'Just to let you know &mdash; weve received your order, and it is now being processed.', 'woocommerce' ) . "\n\n";
echo esc_html__( 'Heres a reminder of what youve ordered:', 'woocommerce' ) . "\n\n";
} else {
/* translators: %s: Order number */
echo sprintf( esc_html__( 'Just to let you know &mdash; we\'ve received your order #%s, and it is now being processed:', 'woocommerce' ), esc_html( $order->get_order_number() ) ) . "\n\n";
}
/*
* @hooked WC_Emails::order_details() Shows the order details table.
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
* @since 2.5.0
*/
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
echo "\n----------------------------------------\n\n";
/*
* @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 );
echo "\n\n----------------------------------------\n\n";
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
echo "\n\n----------------------------------------\n\n";
}
echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );

View File

@@ -0,0 +1,78 @@
<?php
/**
* Customer refunded order email (plain text)
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/customer-refunded-order.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Plain
* @version 9.8.0
*/
use Automattic\WooCommerce\Utilities\FeaturesUtil;
defined( 'ABSPATH' ) || exit;
$email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
echo esc_html( wp_strip_all_tags( $email_heading ) );
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
/* translators: %s: Customer first name */
echo sprintf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $order->get_billing_first_name() ) ) . "\n\n";
if ( $email_improvements_enabled ) {
if ( $partial_refund ) {
/* translators: %s: Site title */
echo sprintf( esc_html__( 'Your order from %s has been partially refunded.', 'woocommerce' ), esc_html( $blogname ) ) . "\n\n";
} else {
/* translators: %s: Site title */
echo sprintf( esc_html__( 'Your order from %s has been refunded.', 'woocommerce' ), esc_html( $blogname ) ) . "\n\n";
}
echo esc_html__( 'Heres a reminder of what youve ordered:', 'woocommerce' ) . "\n\n";
} elseif ( $partial_refund ) {
/* translators: %s: Site title */
echo sprintf( esc_html__( 'Your order on %s has been partially refunded. There are more details below for your reference:', 'woocommerce' ), esc_html( $blogname ) ) . "\n\n";
} else {
/* translators: %s: Site title */
echo sprintf( esc_html__( 'Your order on %s has been refunded. There are more details below for your reference:', 'woocommerce' ), esc_html( $blogname ) ) . "\n\n";
}
/*
* @hooked WC_Emails::order_details() Shows the order details table.
* @hooked WC_Structured_Data::generate_order_data() Generates structured data.
* @hooked WC_Structured_Data::output_structured_data() Outputs structured data.
* @since 2.5.0
*/
do_action( 'woocommerce_email_order_details', $order, $sent_to_admin, $plain_text, $email );
echo "\n----------------------------------------\n\n";
/*
* @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 );
echo "\n\n----------------------------------------\n\n";
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
echo "\n\n----------------------------------------\n\n";
}
echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );

View File

@@ -0,0 +1,55 @@
<?php
/**
* Customer Reset Password email
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/customer-reset-password.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Plain
* @version 9.8.0
*/
use Automattic\WooCommerce\Utilities\FeaturesUtil;
defined( 'ABSPATH' ) || exit;
$email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
echo esc_html( wp_strip_all_tags( $email_heading ) );
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
/* translators: %s: Customer username */
echo sprintf( esc_html__( 'Hi %s,', 'woocommerce' ), esc_html( $user_login ) ) . "\n\n";
/* translators: %s: Store name */
echo sprintf( esc_html__( 'Someone has requested a new password for the following account on %s:', 'woocommerce' ), esc_html( $blogname ) ) . "\n\n";
if ( $email_improvements_enabled ) {
echo "----------------------------------------\n\n";
}
/* translators: %s: Customer username */
echo sprintf( esc_html__( 'Username: %s', 'woocommerce' ), esc_html( $user_login ) ) . "\n\n";
if ( $email_improvements_enabled ) {
echo "----------------------------------------\n\n";
echo esc_html__( 'If you didnt make this request, just ignore this email. If youd like to proceed, reset your password via the link below:', 'woocommerce' ) . "\n\n";
} else {
echo esc_html__( 'If you didn\'t make this request, just ignore this email. If you\'d like to proceed:', 'woocommerce' ) . "\n\n";
}
echo esc_url( add_query_arg( array( 'key' => $reset_key, 'id' => $user_id, 'login' => rawurlencode( $user_login ) ), wc_get_endpoint_url( 'lost-password', '', wc_get_page_permalink( 'myaccount' ) ) ) ) . "\n\n"; // phpcs:ignore WordPress.Arrays.ArrayDeclarationSpacing.AssociativeArrayFound
echo "\n\n----------------------------------------\n\n";
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
echo "\n\n----------------------------------------\n\n";
}
echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) );

View File

@@ -0,0 +1,47 @@
<?php
/**
* Customer Stock Notification Confirm template.
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/customer-stock-notification-verified.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Plain
* @version 10.2.0
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
echo esc_html( wp_strip_all_tags( $email_heading ) );
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
echo esc_html( wp_strip_all_tags( wptexturize( apply_filters( 'woocommerce_email_intro_content', $intro_content, $notification ) ) ) ); // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment
echo "\n\n----------------------------------------\n\n";
/**
* Hook: woocommerce_email_stock_notification_product.
*
* @since 10.2.0
*/
do_action( 'woocommerce_email_stock_notification_product', $product, $notification, true, $email );
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
echo "\n\n----------------------------------------\n\n";
}
echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) ); // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment

View File

@@ -0,0 +1,47 @@
<?php
/**
* Back in Stock Notification Verify template.
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/customer-stock-notification-verify.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Plain
* @version 10.2.0
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
echo esc_html( wp_strip_all_tags( $email_heading ) );
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
echo esc_html( wp_strip_all_tags( wptexturize( apply_filters( 'woocommerce_email_intro_content', $intro_content, $notification ) ) ) ); // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment
echo "\n\n----------------------------------------\n\n";
/**
* Hook: woocommerce_email_stock_notification_product.
*
* @since 10.2.0
*/
do_action( 'woocommerce_email_stock_notification_product', $product, $notification, true, $email );
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
echo "\n\n----------------------------------------\n\n";
}
echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) ); // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment

View File

@@ -0,0 +1,47 @@
<?php
/**
* Customer Stock Notification template.
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/customer-stock-notification.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Plain
* @version 10.2.0
*/
// Exit if accessed directly.
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
echo "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
echo esc_html( wp_strip_all_tags( $email_heading ) );
echo "\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n\n";
echo esc_html( wp_strip_all_tags( wptexturize( apply_filters( 'woocommerce_email_intro_content', $intro_content, $notification ) ) ) ); // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment
echo "\n\n----------------------------------------\n\n";
/**
* Hook: woocommerce_email_stock_notification_product.
*
* @since 10.2.0
*/
do_action( 'woocommerce_email_stock_notification_product', $product, $notification, true, $email );
/**
* Show user-defined additional content - this is set in each email's settings.
*/
if ( $additional_content ) {
echo esc_html( wp_strip_all_tags( wptexturize( $additional_content ) ) );
echo "\n\n----------------------------------------\n\n";
}
echo wp_kses_post( apply_filters( 'woocommerce_email_footer_text', get_option( 'woocommerce_email_footer_text' ) ) ); // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment

View File

@@ -0,0 +1,66 @@
<?php
/**
* Email Addresses (plain)
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/email-addresses.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Plain
* @version 8.6.0
*/
defined( 'ABSPATH' ) || exit;
echo "\n" . esc_html( wc_strtoupper( esc_html__( 'Billing address', 'woocommerce' ) ) ) . "\n\n";
echo preg_replace( '#<br\s*/?>#i', "\n", $order->get_formatted_billing_address() ) . "\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
if ( $order->get_billing_phone() ) {
echo $order->get_billing_phone() . "\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
if ( $order->get_billing_email() ) {
echo $order->get_billing_email() . "\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
/**
* Fires after the core address fields in emails.
*
* @since 8.6.0
*
* @param string $type Address type. Either 'billing' or 'shipping'.
* @param WC_Order $order Order instance.
* @param bool $sent_to_admin If this email is being sent to the admin or not.
* @param bool $plain_text If this email is plain text or not.
*/
do_action( 'woocommerce_email_customer_address_section', 'billing', $order, $sent_to_admin, true );
if ( ! wc_ship_to_billing_address_only() && $order->needs_shipping_address() ) {
$shipping = $order->get_formatted_shipping_address();
if ( $shipping ) {
echo "\n" . esc_html( wc_strtoupper( esc_html__( 'Shipping address', 'woocommerce' ) ) ) . "\n\n";
echo preg_replace( '#<br\s*/?>#i', "\n", $shipping ) . "\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
if ( $order->get_shipping_phone() ) {
echo $order->get_shipping_phone() . "\n"; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
}
/**
* Fires after the core address fields in emails.
*
* @since 8.6.0
*
* @param string $type Address type. Either 'billing' or 'shipping'.
* @param WC_Order $order Order instance.
* @param bool $sent_to_admin If this email is being sent to the admin or not.
* @param bool $plain_text If this email is plain text or not.
*/
do_action( 'woocommerce_email_customer_address_section', 'shipping', $order, $sent_to_admin, true );
}
}

View File

@@ -0,0 +1,26 @@
<?php
/**
* Additional Customer Details (plain)
*
* This is extra customer data which can be filtered by plugins. It outputs below the order item table.
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/email-customer-details.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Plain
* @version 3.4.0
*/
defined( 'ABSPATH' ) || exit;
echo esc_html( wc_strtoupper( esc_html__( 'Customer details', 'woocommerce' ) ) ) . "\n\n";
foreach ( $fields as $field ) {
echo wp_kses_post( $field['label'] ) . ': ' . wp_kses_post( $field['value'] ) . "\n";
}

View File

@@ -0,0 +1,50 @@
<?php
/**
* Email Downloads.
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/email-downloads.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates
* @version 3.4.0
*/
defined( 'ABSPATH' ) || exit;
echo esc_html( wc_strtoupper( esc_html__( 'Downloads', 'woocommerce' ) ) ) . "\n\n";
foreach ( $downloads as $download ) {
foreach ( $columns as $column_id => $column_name ) {
echo wp_kses_post( $column_name ) . ': ';
if ( has_action( 'woocommerce_email_downloads_column_' . $column_id ) ) {
do_action( 'woocommerce_email_downloads_column_' . $column_id, $download, $plain_text );
} else {
switch ( $column_id ) {
case 'download-product':
echo esc_html( $download['product_name'] );
break;
case 'download-file':
echo esc_html( $download['download_name'] ) . ' - ' . esc_url( $download['download_url'] );
break;
case 'download-expires':
if ( ! empty( $download['access_expires'] ) ) {
echo esc_html( date_i18n( get_option( 'date_format' ), strtotime( $download['access_expires'] ) ) );
} else {
esc_html_e( 'Never', 'woocommerce' );
}
break;
}
}
echo "\n";
}
echo "\n";
}
echo '=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=';
echo "\n\n";

View File

@@ -0,0 +1,91 @@
<?php
/**
* Order fulfillment details table shown in emails as plain text.
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/email-fulfillment-details.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Plain
* @version 10.1.0
*/
defined( 'ABSPATH' ) || exit;
if ( null === $fulfillment->get_date_deleted() ) {
$tracking_number = $fulfillment->get_meta( '_tracking_number', true );
$tracking_url = $fulfillment->get_meta( '_tracking_url' );
$shipment_provider = $fulfillment->get_meta( '_shipment_provider' );
if ( ! $tracking_number && ! $tracking_url && ! $shipment_provider ) {
echo esc_html__( 'No tracking information available for this fulfillment at the moment.', 'woocommerce' );
return;
} else {
echo esc_html__( 'Tracking Number', 'woocommerce' ) . ': ' . esc_attr( $tracking_number ) . "\n";
echo esc_html__( 'Shipment Provider', 'woocommerce' ) . ': ' . esc_html( $shipment_provider ) . "\n";
echo esc_html__( 'Tracking URL', 'woocommerce' ) . ': ' . esc_html( $tracking_url ) . "\n\n";
}
echo esc_html__( 'You can access to more details of your order by visiting My Account > Orders and select the order you wish to see the latest status of the delivery.', 'woocommerce' );
echo "\n\n\n";
}
/**
* Action hook to add custom content before fulfillment details in email.
*
* @param WC_Order $order Order object.
* @param Fulfillment $fulfillment Fulfillment object.
* @param bool $sent_to_admin Whether it's sent to admin or customer.
* @param bool $plain_text Whether it's a plain text email.
* @param WC_Email $email Email object.
* @since 2.5.0
*/
do_action( 'woocommerce_email_before_fulfillment_table', $order, $fulfillment, $sent_to_admin, $plain_text, $email );
echo wp_kses_post( __( 'Fulfillment summary', 'woocommerce' ) );
echo "\n\n==========\n\n";
if ( $sent_to_admin ) {
$before = '';
$after = '(' . esc_url( $order->get_edit_order_url() ) . ')';
} else {
$before = '';
$after = '';
}
/* translators: %s: Order ID. */
$order_number_string = __( 'Order #%s', 'woocommerce' );
echo wp_kses_post(
$before . sprintf(
$order_number_string . $after . ' (%s)',
$order->get_order_number(),
wc_format_datetime( $order->get_date_created() )
)
);
echo "\n\n\n";
echo wc_get_email_fulfillment_items( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
$order,
$fulfillment,
array(
'show_sku' => $sent_to_admin,
'show_image' => true,
'image_size' => array( 48, 48 ),
'plain_text' => $plain_text,
'sent_to_admin' => $sent_to_admin,
)
);
/**
* Action hook to add custom content after fulfillment details in email.
*
* @param WC_Order $order Order object.
* @param bool $sent_to_admin Whether it's sent to admin or customer.
* @param bool $plain_text Whether it's a plain text email.
* @param WC_Email $email Email object.
* @since 2.5.0
*/
do_action( 'woocommerce_email_after_fulfillment_table', $order, $fulfillment, $sent_to_admin, $plain_text, $email );

View File

@@ -0,0 +1,77 @@
<?php
/**
* Email Fulfillment Items (plain)
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/email-fulfillment-items.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Plain
* @version 10.1.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
foreach ( $items as $item_id => $item ) :
/**
* Email Order Item Visibility hook.
*
* @since 2.5.0
* @param $visible Whether the item is visible in the email.
* @param WC_Order_Item_Product $item The order item object.
*
* @return bool
*/
if ( apply_filters(
'woocommerce_order_item_visible',
true,
$item->item
) ) {
$product = $item->item->get_product();
$sku = '';
$purchase_note = '';
if ( is_object( $product ) ) {
$sku = $product->get_sku();
$purchase_note = $product->get_purchase_note();
}
/**
* Email Order Item Name hook.
*
* @since 2.1.0
* @since 2.4.0 Added $is_visible parameter.
* @param string $product_name Product name.
* @param WC_Order_Item $item Order item object.
* @param bool $is_visible Is item visible.
*/
$product_name = apply_filters( 'woocommerce_order_item_name', $item->item->get_name(), $item->item, false );
/**
* Email Order Item Quantity hook.
*
* @since 2.4.0
* @param int $quantity Item quantity.
* @param WC_Order_Item $item Item object.
*/
$product_name .= ' × ' . apply_filters( 'woocommerce_email_order_item_quantity', $item->qty, $item->item );
echo wp_kses_post( str_pad( wp_kses_post( $product_name ), 40 ) );
echo ' ';
echo esc_html( str_pad( wp_kses( $order->get_formatted_line_subtotal( $item->item ), array() ), 20, ' ', STR_PAD_LEFT ) ) . "\n";
// SKU.
if ( $show_sku && $sku ) {
echo esc_html( '(#' . $sku . ")\n" );
}
}
// Note.
if ( $show_purchase_note && $purchase_note ) {
echo "\n" . do_shortcode( wp_kses_post( $purchase_note ) );
}
endforeach;

View File

@@ -0,0 +1,82 @@
<?php
/**
* Order details table shown in emails.
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/email-order-details.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails
* @version 10.1.0
*/
use Automattic\WooCommerce\Utilities\FeaturesUtil;
defined( 'ABSPATH' ) || exit;
$email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
if ( $email_improvements_enabled ) {
add_filter( 'woocommerce_order_shipping_to_display_shipped_via', '__return_false' );
}
do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text, $email );
if ( $email_improvements_enabled ) {
/* translators: %1$s: Order ID. %2$s: Order date */
echo wp_kses_post( sprintf( esc_html__( 'Order #%1$s (%2$s)', 'woocommerce' ), $order->get_order_number(), wc_format_datetime( $order->get_date_created() ) ) ) . "\n";
echo "\n==========\n";
} else {
/* translators: %1$s: Order ID. %2$s: Order date */
echo wp_kses_post( wc_strtoupper( sprintf( esc_html__( '[Order #%1$s] (%2$s)', 'woocommerce' ), $order->get_order_number(), wc_format_datetime( $order->get_date_created() ) ) ) ) . "\n";
}
echo "\n" . wc_get_email_order_items( // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
$order,
array(
'show_sku' => $sent_to_admin,
'show_image' => false,
'image_size' => array( 32, 32 ),
'plain_text' => true,
'sent_to_admin' => $sent_to_admin,
)
);
echo "==========\n\n";
$item_totals = $order->get_order_item_totals();
if ( $item_totals ) {
foreach ( $item_totals as $total ) {
if ( $email_improvements_enabled ) {
$label = $total['label'];
if ( isset( $total['meta'] ) ) {
$label .= ' ' . $total['meta'];
}
echo wp_kses_post( str_pad( wp_kses_post( $label ), 40 ) );
echo ' ';
echo esc_html( str_pad( wp_kses( $total['value'], array() ), 20, ' ', STR_PAD_LEFT ) ) . "\n";
} else {
echo wp_kses_post( $total['label'] . "\t " . $total['value'] ) . "\n";
}
}
}
if ( $order->get_customer_note() ) {
if ( $email_improvements_enabled ) {
echo "\n" . esc_html__( 'Note:', 'woocommerce' ) . "\n" . wp_kses( wc_wptexturize_order_note( $order->get_customer_note() ), array() ) . "\n";
} else {
echo esc_html__( 'Note:', 'woocommerce' ) . "\t " . wp_kses( wc_wptexturize_order_note( $order->get_customer_note() ), array() ) . "\n";
}
}
if ( $sent_to_admin ) {
/* translators: %s: Order link. */
echo "\n" . sprintf( esc_html__( 'View order: %s', 'woocommerce' ), esc_url( $order->get_edit_order_url() ) ) . "\n";
}
do_action( 'woocommerce_email_after_order_table', $order, $sent_to_admin, $plain_text, $email );

View File

@@ -0,0 +1,113 @@
<?php
/**
* Email Order Items (plain)
*
* This template can be overridden by copying it to yourtheme/woocommerce/emails/plain/email-order-items.php.
*
* HOWEVER, on occasion WooCommerce will need to update template files and you
* (the theme developer) will need to copy the new files to your theme to
* maintain compatibility. We try to do this as little as possible, but it does
* happen. When this occurs the version of the template file will be bumped and
* the readme will list any important changes.
*
* @see https://woocommerce.com/document/template-structure/
* @package WooCommerce\Templates\Emails\Plain
* @version 9.8.0
*/
use Automattic\WooCommerce\Utilities\FeaturesUtil;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly.
}
$email_improvements_enabled = FeaturesUtil::feature_is_enabled( 'email_improvements' );
foreach ( $items as $item_id => $item ) :
if ( apply_filters( 'woocommerce_order_item_visible', true, $item ) ) {
$product = $item->get_product();
$sku = '';
$purchase_note = '';
if ( is_object( $product ) ) {
$sku = $product->get_sku();
$purchase_note = $product->get_purchase_note();
}
if ( $email_improvements_enabled ) {
/**
* Email Order Item Name hook.
*
* @since 2.1.0
* @since 2.4.0 Added $is_visible parameter.
* @param string $product_name Product name.
* @param WC_Order_Item $item Order item object.
* @param bool $is_visible Is item visible.
*/
$product_name = apply_filters( 'woocommerce_order_item_name', $item->get_name(), $item, false );
/**
* Email Order Item Quantity hook.
*
* @since 2.4.0
* @param int $quantity Item quantity.
* @param WC_Order_Item $item Item object.
*/
$product_name .= ' × ' . apply_filters( 'woocommerce_email_order_item_quantity', $item->get_quantity(), $item );
echo wp_kses_post( str_pad( wp_kses_post( $product_name ), 40 ) );
echo ' ';
echo esc_html( str_pad( wp_kses( $order->get_formatted_line_subtotal( $item ), array() ), 20, ' ', STR_PAD_LEFT ) ) . "\n";
if ( $show_sku && $sku ) {
echo esc_html( '(#' . $sku . ")\n" );
}
} else {
// phpcs:disable WordPress.Security.EscapeOutput.OutputNotEscaped
/**
* Email Order Item Name hook.
*
* @since 2.1.0
* @since 2.4.0 Added $is_visible parameter.
* @param string $product_name Product name.
* @param WC_Order_Item $item Order item object.
* @param bool $is_visible Is item visible.
*/
echo wp_kses_post( apply_filters( 'woocommerce_order_item_name', $item->get_name(), $item, false ) );
if ( $show_sku && $sku ) {
echo ' (#' . $sku . ')';
}
/**
* Email Order Item Quantity hook.
*
* @since 2.4.0
* @param int $quantity Item quantity.
* @param WC_Order_Item $item Item object.
*/
echo ' X ' . apply_filters( 'woocommerce_email_order_item_quantity', $item->get_quantity(), $item );
echo ' = ' . $order->get_formatted_line_subtotal( $item ) . "\n";
// phpcs:enable WordPress.Security.EscapeOutput.OutputNotEscaped
}
// allow other plugins to add additional product information here.
do_action( 'woocommerce_order_item_meta_start', $item_id, $item, $order, $plain_text );
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
echo strip_tags(
wc_display_item_meta(
$item,
array(
'before' => "\n- ",
'separator' => "\n- ",
'after' => '',
'echo' => false,
'autop' => false,
)
)
);
// allow other plugins to add additional product information here.
do_action( 'woocommerce_order_item_meta_end', $item_id, $item, $order, $plain_text );
}
// Note.
if ( $show_purchase_note && $purchase_note ) {
echo "\n" . do_shortcode( wp_kses_post( $purchase_note ) );
}
echo "\n\n";
endforeach;