2024-12-05
This commit is contained in:
parent
cdcf186a16
commit
8746287655
329 changed files with 9090 additions and 532 deletions
|
|
@ -98,6 +98,10 @@ html {
|
|||
color: inherit; /* 3 */
|
||||
}
|
||||
|
||||
/* Réalise une Transition entre les pages */
|
||||
@view-transition {
|
||||
navigation: auto;
|
||||
}
|
||||
/*
|
||||
* 1. Utilise une couleur d'arrière-plan définie.
|
||||
* 2. Utilise la couleur primaire du site.
|
||||
|
|
@ -150,6 +154,9 @@ button, input, select, textarea {
|
|||
transition: none !important;
|
||||
animation-duration: 0s !important;
|
||||
}
|
||||
@view-transition {
|
||||
navigation: none !important;
|
||||
}
|
||||
}
|
||||
/*
|
||||
* 2. Rendu spécifique du texte pour Safari/iOS.
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -24,6 +24,11 @@ html {
|
|||
color: inherit; /* 3 */
|
||||
}
|
||||
|
||||
/* Réalise une Transition entre les pages */
|
||||
@view-transition {
|
||||
navigation: auto;
|
||||
}
|
||||
|
||||
/*
|
||||
* 1. Utilise une couleur d'arrière-plan définie.
|
||||
* 2. Utilise la couleur primaire du site.
|
||||
|
|
@ -76,4 +81,8 @@ button, input, select, textarea {
|
|||
transition: none !important;
|
||||
animation-duration: 0s !important;
|
||||
}
|
||||
|
||||
@view-transition {
|
||||
navigation: none !important;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ const E = {
|
|||
};
|
||||
|
||||
/** Le ratio minimum hauteur de page/hauteur de la fenêtre à atteindre pour que le Bouton soit nécessaire. */
|
||||
const RATIO_MINIMUM_PAGE_PAR_FENETRE = 2;
|
||||
const RATIO_MINIMUM_PAGE_PAR_FENETRE = 3;
|
||||
|
||||
/** Le ratio actuel hauteur de page/hauteur de la fenêtre. */
|
||||
let ratioActuel = E.CORPS_HTML.getBoundingClientRect().height / window.innerHeight;
|
||||
|
|
@ -52,11 +52,11 @@ const majVisibiliteBouton = (estVisible: boolean): void => {
|
|||
if (estVisible) {
|
||||
E.BOUTON_RETOUR_SOMMET.setAttribute(ATTRIBUT_ACTIF, "");
|
||||
E.BOUTON_RETOUR_SOMMET.setAttribute(ATTRIBUT_TABINDEX, "99");
|
||||
E.IMAGE_BOUTON.removeAttribute(ATTRIBUT_ARIA_HIDDEN);
|
||||
E.IMAGE_BOUTON.setAttribute(ATTRIBUT_ARIA_HIDDEN, "false");
|
||||
} else {
|
||||
E.BOUTON_RETOUR_SOMMET.removeAttribute(ATTRIBUT_ACTIF);
|
||||
E.BOUTON_RETOUR_SOMMET.setAttribute(ATTRIBUT_TABINDEX, "-2");
|
||||
E.IMAGE_BOUTON.setAttribute(ATTRIBUT_ARIA_HIDDEN, "");
|
||||
E.IMAGE_BOUTON.setAttribute(ATTRIBUT_ARIA_HIDDEN, "true");
|
||||
}
|
||||
etapePlanifiee = false;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ import type { FetchErrors } from "./lib/types/reseau";
|
|||
|
||||
import { ROUTE_API_AJOUTE_ARTICLE_PANIER } from "./constantes/api.ts";
|
||||
import {
|
||||
ATTRIBUT_ARIA_HIDDEN,
|
||||
ATTRIBUT_ARIA_SELECTED,
|
||||
ATTRIBUT_CHARGEMENT,
|
||||
ATTRIBUT_DESACTIVE,
|
||||
|
|
@ -62,7 +61,7 @@ const ETATS_PAGE: EtatsPage = _etats;
|
|||
*/
|
||||
const deplieToutesSections = (ensembleLiensContenus: Array<EnsembleLienContenu>): void =>
|
||||
arrayForEach(ensembleLiensContenus, (ensemble: EnsembleLienContenu): void => {
|
||||
Maybe.fromNullable(ensemble.at(0)).ifJust((e): void => e.setAttribute(ATTRIBUT_ARIA_HIDDEN, "false"));
|
||||
Maybe.fromNullable(ensemble.at(0)).ifJust((e): void => e.setAttribute(ATTRIBUT_ARIA_SELECTED, "false"));
|
||||
Maybe.fromNullable(ensemble.at(1)).ifJust((e): void => e.setAttribute(ATTRIBUT_HIDDEN, "true"));
|
||||
});
|
||||
|
||||
|
|
@ -154,7 +153,7 @@ const gereBoiteInformationsProduit = (): void => {
|
|||
|
||||
// Sauvegarde l'état d'ouverture de la section avant de toutes les fermer
|
||||
const estAncienOngletCourant: boolean = lien.getAttribute(ATTRIBUT_ARIA_SELECTED) === "true";
|
||||
deplieToutesSections(pipe(onglets.values(), Array.from<EnsembleLienContenu>));
|
||||
pipe(onglets.values(), Array.from<EnsembleLienContenu>, deplieToutesSections);
|
||||
|
||||
// Ne fais rien de plus si l'onglet sélectionné était le courant
|
||||
if (estAncienOngletCourant) return;
|
||||
|
|
|
|||
|
|
@ -7,13 +7,13 @@
|
|||
<div class="storytelling__conteneur">
|
||||
<div class="storytelling__image" data-index="0">
|
||||
{{
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll0", "", 903, 1080)
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll0", "", 903, 1080, "image-scroll0")
|
||||
}}
|
||||
</div>
|
||||
|
||||
<div class="storytelling__image" data-index="1">
|
||||
{{
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll1", "", 903, 1080)
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll1", "", 903, 1080, "image-scroll1")
|
||||
}}
|
||||
</div>
|
||||
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
data-cache data-index="2"
|
||||
>
|
||||
{{
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll2", "", 903, 1080)
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll2", "", 903, 1080, "image-scroll2")
|
||||
}}
|
||||
</div>
|
||||
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
data-cache data-index="3"
|
||||
>
|
||||
{{
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll3", "", 903, 1080)
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll3", "", 903, 1080, "image-scroll3")
|
||||
}}
|
||||
</div>
|
||||
|
||||
|
|
@ -40,7 +40,7 @@
|
|||
data-cache data-index="4"
|
||||
>
|
||||
{{
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll4", "", 903, 1080)
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll4", "", 903, 1080, "image-scroll4")
|
||||
}}
|
||||
</div>
|
||||
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
data-cache data-index="5"
|
||||
>
|
||||
{{
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll5", "", 903, 1080)
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll5", "", 903, 1080, "image-scroll5")
|
||||
}}
|
||||
</div>
|
||||
|
||||
|
|
@ -58,7 +58,7 @@
|
|||
data-cache data-index="6"
|
||||
>
|
||||
{{
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll6", "", 903, 1080)
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll6", "", 903, 1080, "image-scroll6")
|
||||
}}
|
||||
</div>
|
||||
|
||||
|
|
@ -67,7 +67,7 @@
|
|||
data-cache data-index="7"
|
||||
>
|
||||
{{
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll7", "", 903, 1080)
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll7", "", 903, 1080, "image-scroll7")
|
||||
}}
|
||||
</div>
|
||||
|
||||
|
|
@ -76,7 +76,7 @@
|
|||
data-cache data-index="8"
|
||||
>
|
||||
{{
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll8", "", 903, 1080)
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll8", "", 903, 1080, "image-scroll8")
|
||||
}}
|
||||
</div>
|
||||
|
||||
|
|
@ -85,7 +85,7 @@
|
|||
data-cache data-index="9"
|
||||
>
|
||||
{{
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll9", "", 903, 1080)
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll9", "", 903, 1080, "image-scroll9")
|
||||
}}
|
||||
</div>
|
||||
|
||||
|
|
@ -94,7 +94,7 @@
|
|||
data-cache data-index="10"
|
||||
>
|
||||
{{
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll10", "", 903, 1080)
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll10", "", 903, 1080, "image-scroll10")
|
||||
}}
|
||||
</div>
|
||||
|
||||
|
|
@ -103,7 +103,7 @@
|
|||
data-cache data-index="11"
|
||||
>
|
||||
{{
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll11", "", 903, 1080)
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll11", "", 903, 1080, "image-scroll11")
|
||||
}}
|
||||
</div>
|
||||
|
||||
|
|
@ -112,7 +112,7 @@
|
|||
data-cache data-index="12"
|
||||
>
|
||||
{{
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll12", "", 903, 1080)
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll12", "", 903, 1080, "image-scroll12")
|
||||
}}
|
||||
</div>
|
||||
|
||||
|
|
@ -121,7 +121,7 @@
|
|||
data-cache data-index="13"
|
||||
>
|
||||
{{
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll13", "", 903, 1080)
|
||||
images.genere_source_img_multi_formats("#{ site.theme.link }/assets/img/storytelling/scroll13", "", 903, 1080, "image-scroll13")
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,17 +1,8 @@
|
|||
{% macro genere_source_img_multi_formats(rel_url, alt="", width, height, id="") %}
|
||||
<picture id="{{ id }}">
|
||||
<source
|
||||
height="{{ height }}" srcset="{{ rel_url }}.jxl"
|
||||
type="image/jxl" width="{{ width }}"
|
||||
/>
|
||||
<source
|
||||
height="{{ height }}" srcset="{{ rel_url }}.avif"
|
||||
type="image/avif" width="{{ width }}"
|
||||
/>
|
||||
<source
|
||||
height="{{ height }}" srcset="{{ rel_url }}.webp"
|
||||
type="image/webp" width="{{ width }}"
|
||||
/>
|
||||
<source srcset="{{ rel_url }}.jxl" type="image/jxl" />
|
||||
<source srcset="{{ rel_url }}.avif" type="image/avif" />
|
||||
<source srcset="{{ rel_url }}.webp" type="image/webp" />
|
||||
|
||||
<img
|
||||
alt="{{ alt }}" decoding="sync"
|
||||
|
|
|
|||
|
|
@ -2,15 +2,11 @@
|
|||
{# Bouton (dés)activant le menu mobile #}
|
||||
<section class="logo">
|
||||
<button id="bouton-menu-mobile" type="button">
|
||||
<figure>
|
||||
<picture>
|
||||
<img
|
||||
alt="Haiku Atelier's Logo" decoding="async"
|
||||
height="25.6" loading="eager"
|
||||
src="{{ site.theme.link }}/assets/img/logos/logo-lines.svg" width="80"
|
||||
/>
|
||||
</picture>
|
||||
</figure>
|
||||
<img
|
||||
alt="Haiku Atelier's Logo" decoding="async"
|
||||
height="25" loading="eager"
|
||||
src="{{ site.theme.link }}/assets/img/logos/logo-lines.svg" width="80"
|
||||
/>
|
||||
</button>
|
||||
</section>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
<head>
|
||||
<meta charset="{{ site.charset }}" />
|
||||
<meta name="description" content="{{ site.description }}" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
|
||||
{# Pinterest #}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,68 @@
|
|||
<?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 4.1.0
|
||||
*/
|
||||
|
||||
if (!defined("ABSPATH")) {
|
||||
exit();
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_header() Output the email header
|
||||
*/
|
||||
do_action("woocommerce_email_header", $email_heading, $email);
|
||||
?>
|
||||
|
||||
<?php
|
||||
/* translators: %1$s: Order number, %2$s: Customer full name. */
|
||||
?>
|
||||
<p><?php printf(
|
||||
esc_html__('Notification to let you know — order #%1$s belonging to %2$s has been cancelled:', "woocommerce"),
|
||||
esc_html($order->get_order_number()),
|
||||
esc_html($order->get_formatted_billing_full_name()),
|
||||
); ?></p>
|
||||
|
||||
<?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 wp_kses_post(wpautop(wptexturize($additional_content)));
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_footer() Output the email footer
|
||||
*/
|
||||
do_action("woocommerce_email_footer", $email);
|
||||
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
<?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 3.7.0
|
||||
*/
|
||||
|
||||
if (!defined("ABSPATH")) {
|
||||
exit();
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_header() Output the email header
|
||||
*/
|
||||
do_action("woocommerce_email_header", $email_heading, $email);
|
||||
?>
|
||||
|
||||
<?php
|
||||
/* translators: %1$s: Order number. %2$s: Customer full name. */
|
||||
?>
|
||||
<p><?php printf(
|
||||
esc_html__('Payment for order #%1$s from %2$s has failed. The order was as follows:', "woocommerce"),
|
||||
esc_html($order->get_order_number()),
|
||||
esc_html($order->get_formatted_billing_full_name()),
|
||||
); ?></p>
|
||||
|
||||
<?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 wp_kses_post(wpautop(wptexturize($additional_content)));
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_footer() Output the email footer
|
||||
*/
|
||||
do_action("woocommerce_email_footer", $email);
|
||||
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
<?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 3.7.0
|
||||
*/
|
||||
|
||||
defined("ABSPATH") || exit();
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_header() Output the email header
|
||||
*/
|
||||
do_action("woocommerce_email_header", $email_heading, $email);
|
||||
?>
|
||||
|
||||
<?php
|
||||
/* translators: %s: Customer billing full name */
|
||||
?>
|
||||
<p><?php printf(
|
||||
esc_html__("You’ve received the following order from %s:", "woocommerce"),
|
||||
$order->get_formatted_billing_full_name(),
|
||||
);
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
?></p>
|
||||
<?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 wp_kses_post(wpautop(wptexturize($additional_content)));
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_footer() Output the email footer
|
||||
*/
|
||||
do_action("woocommerce_email_footer", $email);
|
||||
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
<?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 3.7.0
|
||||
*/
|
||||
|
||||
if (!defined("ABSPATH")) {
|
||||
exit();
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_header() Output the email header
|
||||
*/
|
||||
do_action("woocommerce_email_header", $email_heading, $email);
|
||||
?>
|
||||
|
||||
<?php
|
||||
/* translators: %s: Customer first name */
|
||||
?>
|
||||
<p><?php printf(esc_html__("Hi %s,", "woocommerce"), esc_html($order->get_billing_first_name())); ?></p>
|
||||
<p><?php esc_html_e("We have finished processing your order.", "woocommerce"); ?></p>
|
||||
<?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 wp_kses_post(wpautop(wptexturize($additional_content)));
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_footer() Output the email footer
|
||||
*/
|
||||
do_action("woocommerce_email_footer", $email);
|
||||
|
||||
|
|
@ -0,0 +1,108 @@
|
|||
<?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 3.7.0
|
||||
*/
|
||||
|
||||
if (!defined("ABSPATH")) {
|
||||
exit();
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes the e-mail header.
|
||||
*
|
||||
* @hooked WC_Emails::email_header() Output the email header
|
||||
*/
|
||||
do_action("woocommerce_email_header", $email_heading, $email);
|
||||
?>
|
||||
|
||||
<?php
|
||||
/* translators: %s: Customer first name */
|
||||
?>
|
||||
<p><?php printf(esc_html__("Hi %s,", "woocommerce"), esc_html($order->get_billing_first_name())); ?></p>
|
||||
|
||||
<?php
|
||||
if ($order->needs_payment()) { ?>
|
||||
<p>
|
||||
<?php printf(
|
||||
wp_kses(
|
||||
/* translators: %1$s Site title, %2$s Order pay link */
|
||||
__(
|
||||
'An order has been created for you on %1$s. Your invoice is below, with a link to make payment when you’re ready: %2$s',
|
||||
"woocommerce",
|
||||
),
|
||||
[
|
||||
"a" => [
|
||||
"href" => [],
|
||||
],
|
||||
],
|
||||
),
|
||||
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 }
|
||||
|
||||
/**
|
||||
* 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 wp_kses_post(wpautop(wptexturize($additional_content)));
|
||||
}
|
||||
|
||||
/**
|
||||
* Executes the email footer.
|
||||
*
|
||||
* @hooked WC_Emails::email_footer() Output the email footer
|
||||
*/
|
||||
do_action("woocommerce_email_footer", $email);
|
||||
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
<?php
|
||||
/**
|
||||
* Customer new account email - html.
|
||||
*
|
||||
* This is intended as a replacement to WC_Email_Customer_New_Account(),
|
||||
* with a set password link instead of including the new password in email
|
||||
* content.
|
||||
*
|
||||
* @package WooCommerce/Blocks
|
||||
*/
|
||||
|
||||
defined("ABSPATH") || exit();
|
||||
/**
|
||||
* Fires to output the email header.
|
||||
*
|
||||
* @hooked WC_Emails::email_header()
|
||||
*
|
||||
* @since 3.7.0
|
||||
*/
|
||||
do_action("woocommerce_email_header", $email_heading, $email);
|
||||
?>
|
||||
|
||||
<?php
|
||||
/* translators: %s: Customer username */
|
||||
?>
|
||||
<p><?php printf(esc_html__("Hello %s,", "woocommerce"), esc_html($user_login)); ?></p>
|
||||
<?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 ($set_password_url): ?>
|
||||
<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
|
||||
/**
|
||||
* Show user-defined additional content - this is set in each email's settings.
|
||||
*/
|
||||
if ($additional_content) {
|
||||
echo wp_kses_post(wpautop(wptexturize($additional_content)));
|
||||
}
|
||||
/**
|
||||
* Fires to output the email footer.
|
||||
*
|
||||
* @hooked WC_Emails::email_footer()
|
||||
*
|
||||
* @since 3.7.0
|
||||
*/
|
||||
do_action("woocommerce_email_footer", $email);
|
||||
|
||||
|
|
@ -0,0 +1,63 @@
|
|||
<?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 6.0.0
|
||||
*/
|
||||
|
||||
defined("ABSPATH") || exit();
|
||||
|
||||
do_action("woocommerce_email_header", $email_heading, $email);
|
||||
?>
|
||||
|
||||
<?php
|
||||
/* translators: %s: Customer username */
|
||||
?>
|
||||
<p><?php printf(esc_html__("Hi %s,", "woocommerce"), esc_html($user_login)); ?></p>
|
||||
<?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 (
|
||||
"yes" === get_option("woocommerce_registration_generate_password") &&
|
||||
$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
|
||||
/**
|
||||
* Show user-defined additional content - this is set in each email's settings.
|
||||
*/
|
||||
if ($additional_content) {
|
||||
echo wp_kses_post(wpautop(wptexturize($additional_content)));
|
||||
}
|
||||
|
||||
do_action("woocommerce_email_footer", $email);
|
||||
|
||||
|
|
@ -0,0 +1,71 @@
|
|||
<?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 3.7.0
|
||||
*/
|
||||
|
||||
if (!defined("ABSPATH")) {
|
||||
exit();
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_header() Output the email header
|
||||
*/
|
||||
do_action("woocommerce_email_header", $email_heading, $email);
|
||||
?>
|
||||
|
||||
<?php
|
||||
/* translators: %s: Customer first name */
|
||||
?>
|
||||
<p><?php printf(esc_html__("Hi %s,", "woocommerce"), esc_html($order->get_billing_first_name())); ?></p>
|
||||
<p><?php esc_html_e("The following note has been added to your order:", "woocommerce"); ?></p>
|
||||
|
||||
<blockquote><?php echo wpautop(wptexturize(make_clickable($customer_note)));
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
?></blockquote>
|
||||
|
||||
<p><?php esc_html_e("As a reminder, here are your order details:", "woocommerce"); ?></p>
|
||||
|
||||
<?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 wp_kses_post(wpautop(wptexturize($additional_content)));
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_footer() Output the email footer
|
||||
*/
|
||||
do_action("woocommerce_email_footer", $email);
|
||||
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
<?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 7.3.0
|
||||
*/
|
||||
|
||||
defined("ABSPATH") || exit();
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_header() Output the email header
|
||||
*/
|
||||
do_action("woocommerce_email_header", $email_heading, $email);
|
||||
?>
|
||||
|
||||
<?php
|
||||
/* translators: %s: Customer first name */
|
||||
?>
|
||||
<p><?php printf(esc_html__("Hi %s,", "woocommerce"), esc_html($order->get_billing_first_name())); ?></p>
|
||||
<p><?php esc_html_e(
|
||||
"Thanks for your order. It’s on-hold until we confirm that payment has been received.",
|
||||
"woocommerce",
|
||||
); ?></p>
|
||||
|
||||
<?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 wp_kses_post(wpautop(wptexturize($additional_content)));
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_footer() Output the email footer
|
||||
*/
|
||||
do_action("woocommerce_email_footer", $email);
|
||||
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
<?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 3.7.0
|
||||
*/
|
||||
|
||||
if (!defined("ABSPATH")) {
|
||||
exit();
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_header() Output the email header
|
||||
*/
|
||||
do_action("woocommerce_email_header", $email_heading, $email);
|
||||
?>
|
||||
|
||||
<?php
|
||||
/* translators: %s: Customer first name */
|
||||
?>
|
||||
<p><?php printf(esc_html__("Hi %s,", "woocommerce"), esc_html($order->get_billing_first_name())); ?></p>
|
||||
<?php
|
||||
/* translators: %s: Order number */
|
||||
?>
|
||||
<p><?php printf(
|
||||
esc_html__(
|
||||
'Just to let you know — we\'ve received your order #%s, and it is now being processed:',
|
||||
"woocommerce",
|
||||
),
|
||||
esc_html($order->get_order_number()),
|
||||
); ?></p>
|
||||
|
||||
<?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 wp_kses_post(wpautop(wptexturize($additional_content)));
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_footer() Output the email footer
|
||||
*/
|
||||
do_action("woocommerce_email_footer", $email);
|
||||
|
||||
|
|
@ -0,0 +1,80 @@
|
|||
<?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 3.7.0
|
||||
*/
|
||||
|
||||
defined("ABSPATH") || exit();
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_header() Output the email header
|
||||
*/
|
||||
do_action("woocommerce_email_header", $email_heading, $email);
|
||||
?>
|
||||
|
||||
<?php
|
||||
/* translators: %s: Customer first name */
|
||||
?>
|
||||
<p><?php printf(esc_html__("Hi %s,", "woocommerce"), esc_html($order->get_billing_first_name())); ?></p>
|
||||
|
||||
<p>
|
||||
<?php if ($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",
|
||||
),
|
||||
wp_specialchars_decode(get_option("blogname"), ENT_QUOTES),
|
||||
); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
|
||||
} else {
|
||||
/* translators: %s: Site title */
|
||||
printf(
|
||||
esc_html__("Your order on %s has been refunded. There are more details below for your reference:", "woocommerce"),
|
||||
wp_specialchars_decode(get_option("blogname"), ENT_QUOTES),
|
||||
); // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped
|
||||
} ?>
|
||||
</p>
|
||||
<?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 wp_kses_post(wpautop(wptexturize($additional_content)));
|
||||
}
|
||||
|
||||
/*
|
||||
* @hooked WC_Emails::email_footer() Output the email footer
|
||||
*/
|
||||
do_action("woocommerce_email_footer", $email);
|
||||
|
||||
|
|
@ -0,0 +1,65 @@
|
|||
<?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 9.3.0
|
||||
*/
|
||||
|
||||
if (!defined("ABSPATH")) {
|
||||
exit(); // Exit if accessed directly.
|
||||
} ?>
|
||||
|
||||
<?php do_action("woocommerce_email_header", $email_heading, $email); ?>
|
||||
|
||||
<?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(wp_specialchars_decode(get_option("blogname"), ENT_QUOTES)),
|
||||
); ?></p>
|
||||
<?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>
|
||||
<p>
|
||||
<a class="link" href="<?php echo esc_url(
|
||||
add_query_arg(
|
||||
["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("Click here to reset your password", "woocommerce"); ?>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<?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)));
|
||||
}
|
||||
|
||||
do_action("woocommerce_email_footer", $email);
|
||||
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
<?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 8.6.0
|
||||
*/
|
||||
|
||||
if (!defined("ABSPATH")) {
|
||||
exit();
|
||||
}
|
||||
|
||||
$text_align = is_rtl() ? "right" : "left";
|
||||
$address = $order->get_formatted_billing_address();
|
||||
$shipping = $order->get_formatted_shipping_address();
|
||||
?><table id="addresses" cellspacing="0" cellpadding="0" style="width: 100%; vertical-align: top; margin-bottom: 40px; padding:0;" border="0">
|
||||
<tr>
|
||||
<td style="text-align:<?php echo esc_attr(
|
||||
$text_align,
|
||||
); ?>; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; border:0; padding:0;" valign="top" width="50%">
|
||||
<h2><?php esc_html_e("Billing address", "woocommerce"); ?></h2>
|
||||
|
||||
<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; ?>
|
||||
/**
|
||||
* 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.
|
||||
*/<?php 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 style="text-align:<?php echo esc_attr(
|
||||
$text_align,
|
||||
); ?>; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; padding:0;" valign="top" width="50%">
|
||||
<h2><?php esc_html_e("Shipping address", "woocommerce"); ?></h2>
|
||||
|
||||
<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; ?>
|
||||
/**
|
||||
* 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.
|
||||
*/<?php do_action("woocommerce_email_customer_address_section", "shipping", $order, $sent_to_admin, false); ?>
|
||||
</address>
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
<?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 2.5.0
|
||||
*/
|
||||
|
||||
defined("ABSPATH") || exit(); ?>
|
||||
<?php if (!empty($fields)): ?>
|
||||
<div style="font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; 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; ?>
|
||||
|
|
@ -0,0 +1,66 @@
|
|||
<?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 3.4.0
|
||||
*/
|
||||
|
||||
defined("ABSPATH") || exit();
|
||||
|
||||
$text_align = is_rtl() ? "right" : "left";
|
||||
?><h2 class="woocommerce-order-downloads__title"><?php esc_html_e("Downloads", "woocommerce"); ?></h2>
|
||||
|
||||
<table class="td" cellspacing="0" cellpadding="6" style="width: 100%; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; margin-bottom: 40px;" border="1">
|
||||
<thead>
|
||||
<tr>
|
||||
<?php foreach ($columns as $column_id => $column_name): ?>
|
||||
<th class="td" scope="col" style="text-align:<?php echo esc_attr($text_align); ?>;"><?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): ?>
|
||||
<td class="td" style="text-align:<?php echo esc_attr($text_align); ?>;">
|
||||
<?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;
|
||||
}
|
||||
} ?>
|
||||
</td>
|
||||
<?php endforeach; ?>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
|
|
@ -0,0 +1,72 @@
|
|||
<?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 7.4.0
|
||||
*/
|
||||
|
||||
defined("ABSPATH") || exit(); ?>
|
||||
</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">
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<table border="0" cellpadding="10" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td colspan="2" valign="middle" id="credit">
|
||||
<?php 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", get_option("woocommerce_email_footer_text")),
|
||||
),
|
||||
),
|
||||
); ?>
|
||||
</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>
|
||||
|
|
@ -0,0 +1,76 @@
|
|||
<?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 7.4.0
|
||||
*/
|
||||
|
||||
if (!defined("ABSPATH")) {
|
||||
exit(); // Exit if accessed directly
|
||||
} ?>
|
||||
<!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 get_bloginfo("name", "display"); ?></title>
|
||||
</head>
|
||||
<body <?php echo is_rtl()
|
||||
? "rightmargin"
|
||||
: "leftmargin"; ?>="0" marginwidth="0" topmargin="0" marginheight="0" offset="0">
|
||||
<table width="100%" id="outer_wrapper">
|
||||
<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%">
|
||||
<tr>
|
||||
<td align="center" valign="top">
|
||||
<div id="template_header_image">
|
||||
<?php
|
||||
$img = get_option("woocommerce_email_header_image");
|
||||
|
||||
if ($img) {
|
||||
echo '<p style="margin-top:0;"><img src="' .
|
||||
esc_url($img) .
|
||||
'" alt="' .
|
||||
esc_attr(get_bloginfo("name", "display")) .
|
||||
'" /></p>';
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="template_container">
|
||||
<tr>
|
||||
<td align="center" valign="top">
|
||||
<!-- Header -->
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="100%" id="template_header">
|
||||
<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">
|
||||
<tr>
|
||||
<td valign="top" id="body_content">
|
||||
<!-- Content -->
|
||||
<table border="0" cellpadding="20" cellspacing="0" width="100%">
|
||||
<tr>
|
||||
<td valign="top">
|
||||
<div id="body_content_inner">
|
||||
|
|
@ -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));
|
||||
|
|
@ -0,0 +1,114 @@
|
|||
<?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 3.7.0
|
||||
*/
|
||||
|
||||
defined("ABSPATH") || exit();
|
||||
|
||||
$text_align = is_rtl() ? "right" : "left";
|
||||
|
||||
do_action("woocommerce_email_before_order_table", $order, $sent_to_admin, $plain_text, $email);
|
||||
?>
|
||||
|
||||
<h2>
|
||||
<?php
|
||||
if ($sent_to_admin) {
|
||||
$before = '<a class="link" href="' . esc_url($order->get_edit_order_url()) . '">';
|
||||
$after = "</a>";
|
||||
} else {
|
||||
$before = "";
|
||||
$after = "";
|
||||
}
|
||||
/* translators: %s: Order ID. */
|
||||
echo wp_kses_post(
|
||||
$before .
|
||||
sprintf(
|
||||
__("[Order #%s]", "woocommerce") . $after . ' (<time datetime="%s">%s</time>)',
|
||||
$order->get_order_number(),
|
||||
$order->get_date_created()->format("c"),
|
||||
wc_format_datetime($order->get_date_created()),
|
||||
),
|
||||
);
|
||||
?>
|
||||
</h2>
|
||||
|
||||
<div style="margin-bottom: 40px;">
|
||||
<table class="td" cellspacing="0" cellpadding="6" style="width: 100%; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;" 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($text_align); ?>;"><?php esc_html_e(
|
||||
"Quantity",
|
||||
"woocommerce",
|
||||
); ?></th>
|
||||
<th class="td" scope="col" style="text-align:<?php echo esc_attr($text_align); ?>;"><?php esc_html_e(
|
||||
"Price",
|
||||
"woocommerce",
|
||||
); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php echo wc_get_email_order_items(
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
||||
$order,
|
||||
[
|
||||
"show_sku" => $sent_to_admin,
|
||||
"show_image" => false,
|
||||
"image_size" => [32, 32],
|
||||
"plain_text" => $plain_text,
|
||||
"sent_to_admin" => $sent_to_admin,
|
||||
],
|
||||
); ?>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<?php
|
||||
$item_totals = $order->get_order_item_totals();
|
||||
|
||||
if ($item_totals) {
|
||||
$i = 0;
|
||||
foreach ($item_totals as $total) {
|
||||
$i++; ?>
|
||||
<tr>
|
||||
<th class="td" scope="row" colspan="2" style="text-align:<?php echo esc_attr($text_align); ?>; <?php echo 1 === $i
|
||||
? "border-top-width: 4px;"
|
||||
: ""; ?>"><?php echo wp_kses_post($total["label"]); ?></th>
|
||||
<td class="td" style="text-align:<?php echo esc_attr($text_align); ?>; <?php echo 1 === $i
|
||||
? "border-top-width: 4px;"
|
||||
: ""; ?>"><?php echo wp_kses_post($total["value"]); ?></td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
}
|
||||
if ($order->get_customer_note()) { ?>
|
||||
<tr>
|
||||
<th class="td" scope="row" colspan="2" style="text-align:<?php echo esc_attr($text_align); ?>;"><?php esc_html_e(
|
||||
"Note:",
|
||||
"woocommerce",
|
||||
); ?></th>
|
||||
<td class="td" style="text-align:<?php echo esc_attr($text_align); ?>;"><?php echo wp_kses(
|
||||
nl2br(wptexturize($order->get_customer_note())),
|
||||
[],
|
||||
); ?></td>
|
||||
</tr>
|
||||
<?php }
|
||||
?>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<?php do_action("woocommerce_email_after_order_table", $order, $sent_to_admin, $plain_text, $email); ?>
|
||||
|
|
@ -0,0 +1,106 @@
|
|||
<?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 3.7.0
|
||||
*/
|
||||
|
||||
defined("ABSPATH") || exit();
|
||||
|
||||
$text_align = is_rtl() ? "right" : "left";
|
||||
$margin_side = is_rtl() ? "left" : "right";
|
||||
|
||||
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" style="text-align:<?php echo esc_attr(
|
||||
$text_align,
|
||||
); ?>; vertical-align: middle; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif; word-wrap:break-word;">
|
||||
<?php
|
||||
// Show title/image etc.
|
||||
if ($show_image) {
|
||||
echo wp_kses_post(apply_filters("woocommerce_order_item_thumbnail", $image, $item));
|
||||
}
|
||||
|
||||
// Product name.
|
||||
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 here.
|
||||
do_action("woocommerce_order_item_meta_start", $item_id, $item, $order, $plain_text);
|
||||
|
||||
wc_display_item_meta($item, [
|
||||
"label_before" =>
|
||||
'<strong class="wc-item-meta-label" style="float: ' .
|
||||
esc_attr($text_align) .
|
||||
"; margin-" .
|
||||
esc_attr($margin_side) .
|
||||
': .25em; clear: both">',
|
||||
]);
|
||||
|
||||
// allow other plugins to add additional product information here.
|
||||
do_action("woocommerce_order_item_meta_end", $item_id, $item, $order, $plain_text);
|
||||
?>
|
||||
</td>
|
||||
<td class="td" style="text-align:<?php echo esc_attr(
|
||||
$text_align,
|
||||
); ?>; vertical-align:middle; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;">
|
||||
<?php
|
||||
$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" style="text-align:<?php echo esc_attr(
|
||||
$text_align,
|
||||
); ?>; vertical-align:middle; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;">
|
||||
<?php echo wp_kses_post($order->get_formatted_line_subtotal($item)); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if ($show_purchase_note && $purchase_note) { ?>
|
||||
<tr>
|
||||
<td colspan="3" style="text-align:<?php echo esc_attr(
|
||||
$text_align,
|
||||
); ?>; vertical-align:middle; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;">
|
||||
<?php echo wp_kses_post(wpautop(do_shortcode($purchase_note))); ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
endforeach; ?>
|
||||
|
|
@ -0,0 +1,269 @@
|
|||
<?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 9.3.0
|
||||
*/
|
||||
|
||||
if (!defined("ABSPATH")) {
|
||||
exit();
|
||||
}
|
||||
|
||||
// Load colors.
|
||||
$bg = get_option("woocommerce_email_background_color");
|
||||
$body = get_option("woocommerce_email_body_background_color");
|
||||
$base = get_option("woocommerce_email_base_color");
|
||||
$base_text = wc_light_or_dark($base, "#202020", "#ffffff");
|
||||
$text = get_option("woocommerce_email_text_color");
|
||||
$footer_text = get_option("woocommerce_email_footer_text_color");
|
||||
|
||||
// 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;
|
||||
}
|
||||
|
||||
$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); ?>;
|
||||
}
|
||||
|
||||
#wrapper {
|
||||
margin: 0 auto;
|
||||
padding: 70px 0;
|
||||
-webkit-text-size-adjust: none !important;
|
||||
width: 100%;
|
||||
max-width: 600px;
|
||||
}
|
||||
|
||||
#template_container {
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1) !important;
|
||||
background-color: <?php echo esc_attr($body); ?>;
|
||||
border: 1px solid <?php echo esc_attr($bg_darker_10); ?>;
|
||||
border-radius: 3px !important;
|
||||
}
|
||||
|
||||
#template_header {
|
||||
background-color: <?php echo esc_attr($base); ?>;
|
||||
border-radius: 3px 3px 0 0 !important;
|
||||
color: <?php echo esc_attr($base_text); ?>;
|
||||
border-bottom: 0;
|
||||
font-weight: bold;
|
||||
line-height: 100%;
|
||||
vertical-align: middle;
|
||||
font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
|
||||
}
|
||||
|
||||
#template_header h1,
|
||||
#template_header h1 a {
|
||||
color: <?php echo esc_attr($base_text); ?>;
|
||||
background-color: inherit;
|
||||
}
|
||||
|
||||
#template_header_image img {
|
||||
margin-left: 0;
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
#template_footer td {
|
||||
padding: 0;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
#template_footer #credit {
|
||||
border: 0;
|
||||
color: <?php echo esc_attr($footer_text); ?>;
|
||||
font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
|
||||
font-size: 12px;
|
||||
line-height: 150%;
|
||||
text-align: center;
|
||||
padding: 24px 0;
|
||||
}
|
||||
|
||||
#template_footer #credit p {
|
||||
margin: 0 0 16px;
|
||||
}
|
||||
|
||||
#body_content {
|
||||
background-color: <?php echo esc_attr($body); ?>;
|
||||
}
|
||||
|
||||
#body_content table td {
|
||||
padding: 48px 48px 32px;
|
||||
}
|
||||
|
||||
#body_content table td td {
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
#body_content table td th {
|
||||
padding: 12px;
|
||||
}
|
||||
|
||||
#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 p {
|
||||
margin: 0 0 16px;
|
||||
}
|
||||
|
||||
#body_content_inner {
|
||||
color: <?php echo esc_attr($text_lighter_20); ?>;
|
||||
font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
|
||||
font-size: 14px;
|
||||
line-height: 150%;
|
||||
text-align: <?php echo is_rtl() ? "right" : "left"; ?>;
|
||||
}
|
||||
|
||||
.td {
|
||||
color: <?php echo esc_attr($text_lighter_20); ?>;
|
||||
border: 1px solid <?php echo esc_attr($body_darker_10); ?>;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.address {
|
||||
padding: 12px;
|
||||
color: <?php echo esc_attr($text_lighter_20); ?>;
|
||||
border: 1px solid <?php echo esc_attr($body_darker_10); ?>;
|
||||
}
|
||||
|
||||
.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 {
|
||||
color: <?php echo esc_attr($text); ?>;
|
||||
font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
|
||||
}
|
||||
|
||||
.link {
|
||||
color: <?php echo esc_attr($link_color); ?>;
|
||||
}
|
||||
|
||||
#header_wrapper {
|
||||
padding: 36px 48px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
#template_footer #credit,
|
||||
#template_footer #credit a {
|
||||
color: <?php echo esc_attr($footer_text); ?>;
|
||||
}
|
||||
|
||||
h1 {
|
||||
color: <?php echo esc_attr($base); ?>;
|
||||
font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
|
||||
font-size: 30px;
|
||||
font-weight: 300;
|
||||
line-height: 150%;
|
||||
margin: 0;
|
||||
text-align: <?php echo is_rtl() ? "right" : "left"; ?>;
|
||||
text-shadow: 0 1px 0 <?php echo esc_attr($base_lighter_20); ?>;
|
||||
}
|
||||
|
||||
h2 {
|
||||
color: <?php echo esc_attr($base); ?>;
|
||||
display: block;
|
||||
font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
line-height: 130%;
|
||||
margin: 0 0 18px;
|
||||
text-align: <?php echo is_rtl() ? "right" : "left"; ?>;
|
||||
}
|
||||
|
||||
h3 {
|
||||
color: <?php echo esc_attr($base); ?>;
|
||||
display: block;
|
||||
font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
line-height: 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"; ?>: 10px;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/**
|
||||
* 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) {
|
||||
#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;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue