2024-12-08

This commit is contained in:
gcch 2024-12-08 15:40:07 +01:00
commit 110d5e6745
45 changed files with 966 additions and 2005 deletions

View file

@ -5,7 +5,6 @@ declare(strict_types=1);
use Carbon_Fields\Carbon_Fields;
use HaikuAtelier\StarterSite;
use Timber\Timber;
use function Env\env;
// Récupère les dépendances Composer
require_once __DIR__ . "../../../../../vendor/autoload.php";
@ -193,3 +192,10 @@ function charge_carbon_fields(): void {
Carbon_Fields::boot();
}
add_action("after_setup_theme", "charge_carbon_fields");
// Emails
// add_filter("woocommerce_email_styles", "patricks_woocommerce_email_styles");
// function patricks_woocommerce_email_styles($css) {
// $css = "";
// return $css;
// }

View file

@ -122,8 +122,8 @@ class StarterSite extends Site {
$context["categories_produits"] = $entrees_menu_categories;
// Récupère le Panier de l'Utilisateur
$panier = WC()->cart->get_cart();
$quantite_articles = WC()->cart->get_cart_contents_count();
$panier = WC()?->cart?->get_cart();
$quantite_articles = WC()?->cart?->get_cart_contents_count();
$articles_presents = $quantite_articles > 0 ? "true" : "false";
$context["panier"] = $panier;

View file

@ -18,7 +18,7 @@
<img
alt="" height="56"
src="{{ site.theme.link }}/assets/img/icons/aboutlclick-black.svg" width="82"
/>
>
</button>
<button
@ -28,7 +28,7 @@
<img
alt="" height="56"
src="{{ site.theme.link }}/assets/img/icons/aboutlclick-black.svg" width="82"
/>
>
</button>
<button
@ -38,7 +38,7 @@
<img
alt="" height="56"
src="{{ site.theme.link }}/assets/img/icons/aboutlclick-black.svg" width="82"
/>
>
</button>
<button
@ -48,7 +48,7 @@
<img
alt="" height="56"
src="{{ site.theme.link }}/assets/img/icons/aboutlclick-black.svg" width="82"
/>
>
</button>
<button
@ -58,7 +58,7 @@
<img
alt="" height="56"
src="{{ site.theme.link }}/assets/img/icons/aboutlclick-black.svg" width="82"
/>
>
</button>
<button
@ -68,7 +68,7 @@
<img
alt="" height="56"
src="{{ site.theme.link }}/assets/img/icons/aboutlclick-black.svg" width="82"
/>
>
</button>
{# Boîtes de texte #}
@ -77,7 +77,7 @@
<img
alt="An icon in form of a cross" height="20"
src="{{ site.theme.link }}/assets/img/icons/cross.svg" width="20"
/>
>
</button>
<p>
@ -93,7 +93,7 @@
<img
alt="An icon in form of a cross" height="20"
src="{{ site.theme.link }}/assets/img/icons/cross.svg" width="20"
/>
>
</button>
<p>
@ -111,7 +111,7 @@
<img
alt="An icon in form of a cross" height="20"
src="{{ site.theme.link }}/assets/img/icons/cross.svg" width="20"
/>
>
</button>
<p>
@ -130,7 +130,7 @@
<img
alt="An icon in form of a cross" height="20"
src="{{ site.theme.link }}/assets/img/icons/cross.svg" width="20"
/>
>
</button>
<p>Here you can see some of the tools used at the studio.</p>
@ -148,7 +148,7 @@
<img
alt="An icon in form of a cross" height="20"
src="{{ site.theme.link }}/assets/img/icons/cross.svg" width="20"
/>
>
</button>
<p>
@ -170,7 +170,7 @@
<img
alt="An icon in form of a cross" height="20"
src="{{ site.theme.link }}/assets/img/icons/cross.svg" width="20"
/>
>
</button>
<p>

View file

@ -24,7 +24,7 @@
<img
alt="An arrow pointing to the top" src="{{ site.theme.link }}/assets/img/icons/arrow.svg"
aria-hidden
/>
>
<span class="visuellement-cache">Back to top</span>
</button>

View file

@ -86,8 +86,8 @@
<p>
Haiku Atelier jewelry are guarantee for a year. If your piece unexpectedly broke or loses its gold color
within a year, you can send it back to us and we will repair it for free, you will just have to organize
your own shipping label (our workshop is located in Brussels).<br /> We still provide after sale services
past the guarantee year, the price of those services will be determined depending on each case.
your own shipping label (our workshop is located in Brussels).<br> We still provide after sale services past
the guarantee year, the price of those services will be determined depending on each case.
</p>
</section>
@ -131,7 +131,7 @@
</p>
<p>
The site uses the 3D Secure payment system to prevent fraud.<br />
The site uses the 3D Secure payment system to prevent fraud.<br>
Customers can pay for their purchase order:
</p>
@ -149,15 +149,15 @@
<p>
International deliveries are subject to import charges, duties, taxes, or fees of the destination country.
These funds are set by the government of that country, in accordance with import/export regulations, and
billed by the courier. Haiku Atelier is not responsible for these duties, taxes, or other charges.<br /> If
a package is returned because a customer has refused to pay any import taxes or customs duties owed, the
billed by the courier. Haiku Atelier is not responsible for these duties, taxes, or other charges.<br> If a
package is returned because a customer has refused to pay any import taxes or customs duties owed, the
package refund will not include shipping and return costs.
</p>
<p>
Haiku Atelier is the exclusive owner of all intellectual property rights or holds the rights of use relating
to both the structure and the content of the site. The GTCU are subject to French law, regardless of the
country of residence of the user and the place of placing the purchase order.<br />In the absence of an
country of residence of the user and the place of placing the purchase order.<br>In the absence of an
amicable agreement, any dispute will be submitted to the competent French courts.
</p>
</section>
@ -168,14 +168,14 @@
</header>
<p>
<strong>Contact:</strong><br />
<strong>Contact:</strong><br>
For inquiries and customer service, please refer to <a class="lien-lien" href="/contact"
>our Contact page</a>.
</p>
<p>
<strong>Credits:</strong><br />
Webdesign by Manon Designere.<br />
<strong>Credits:</strong><br>
Webdesign by Manon Designere.<br>
Development by Gauthier Colin--Haag.
</p>
</section>

View file

@ -1,14 +1,14 @@
{% macro genere_source_img_multi_formats(rel_url, alt="", width, height, id="") %}
<picture id="{{ id }}">
<source srcset="{{ rel_url }}.jxl" type="image/jxl" />
<source srcset="{{ rel_url }}.avif" type="image/avif" />
<source srcset="{{ rel_url }}.webp" type="image/webp" />
<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"
height="{{ height }}" loading="eager"
src="{{ rel_url }}.jpg" width="{{ width }}"
onload="this.style.opacity=1"
/>
>
</picture>
{% endmacro %}

View file

@ -6,7 +6,7 @@
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>

View file

@ -1,38 +1,38 @@
<head>
<meta charset="{{ site.charset }}" />
<meta name="description" content="{{ site.description }}" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta charset="{{ site.charset }}">
<meta name="description" content="{{ site.description }}">
<meta name="viewport" content="width=device-width, initial-scale=1">
{# Pinterest #}
<meta name="p:domain_verify" content="98fed4c924501d2f2a90c5b37e165085" />
<meta name="p:domain_verify" content="98fed4c924501d2f2a90c5b37e165085">
{# Favicon #}
<link rel="apple-touch-icon" href="{{ site.theme.link }}/assets/img/apple-touch-icon.png" />
<link rel="apple-touch-icon" href="{{ site.theme.link }}/assets/img/apple-touch-icon.png">
<link
rel="icon" href="{{ site.theme.link }}/assets/img/favicon.ico"
sizes="48x48"
/>
>
<link
rel="icon" href="{{ site.theme.link }}/assets/img/favicon.svg"
type="image/svg+xml"
/>
<link rel="manifest" href="{{ site.theme.link }}/assets/site.webmanifest" />
>
<link rel="manifest" href="{{ site.theme.link }}/assets/site.webmanifest">
{# Préchargements #}
<link
as="image" href="{{ site.theme.link }}/assets/img/icons/cloud-gris.svg"
rel="preload" type="image/svg+xml"
/>
>
<link
as="font" crossorigin
href="{{ site.theme.link }}/assets/fonts/lato/lato-variable-webfont.woff2" rel="preload"
type="font/woff2"
/>
>
<link
as="font" crossorigin
href="{{ site.theme.link }}/assets/fonts/lato/lato-variable-italic-webfont.woff2" rel="preload"
type="font/woff2"
/>
>
{# Plausible #}
{% if environnement == "production" %}

View file

@ -12,11 +12,11 @@
<img
alt="PayPal's Logo" height="18"
src="{{ site.theme.link }}/assets/img/paypal/logo-paypal.svg" width="13.48"
/>
>
<img
alt="PayPal" height="18"
src="{{ site.theme.link }}/assets/img/paypal/titre-paypal.svg" width="67.69"
/>
>
</button>
</div>
@ -29,7 +29,7 @@
<input
id="separation-adresses" name="separation-adresses"
type="checkbox"
/>
>
<label for="separation-adresses">Use a separate billing address</label>
</div>
@ -44,7 +44,7 @@
minlength="2" name="livraison-prenom"
required type="text"
value="{{ adresse_livraison.first_name }}"
/>
>
</div>
<div class="formulaire__champs__champ">
@ -54,7 +54,7 @@
name="livraison-nom" minlength="2"
required type="text"
value="{{ adresse_livraison.last_name }}"
/>
>
</div>
<div class="formulaire__champs__champ">
@ -63,7 +63,7 @@
autocomplete="street-address" id="livraison-adresse"
name="livraison-adresse" required
type="text" value="{{ adresse_livraison.address_1 }}"
/>
>
</div>
<div class="formulaire__champs__champ">
@ -72,7 +72,7 @@
id="livraison-code-postal" minlength="3"
name="livraison-code-postal" required
type="text" value="{{ adresse_livraison.postcode }}"
/>
>
</div>
<div class="formulaire__champs__champ">
@ -82,7 +82,7 @@
minlength="2" name="livraison-ville"
required type="text"
value="{{ adresse_livraison.city }}"
/>
>
</div>
<div class="formulaire__champs__champ">
@ -91,7 +91,7 @@
autocomplete="address-level1" id="livraison-region-etat"
name="livraison-region-etat" placeholder="If applicable"
type="text" value="{{ adresse_livraison.state }}"
/>
>
</div>
<div class="formulaire__champs__champ">
@ -115,7 +115,7 @@
minlength="6" name="livraison-telephone"
required type="tel"
value="{{ adresse_livraison.phone }}"
/>
>
</div>
<div class="formulaire__champs__champ">
@ -125,7 +125,7 @@
minlength="4" name="livraison-email"
required type="email"
value="{{ email }}"
/>
>
</div>
</div>
</div>
@ -141,7 +141,7 @@
id="facturation-prenom" name="facturation-prenom"
minlength="2" required
type="text" value="{{ adresse_facturation.first_name }}"
/>
>
</div>
<div class="formulaire__champs__champ">
@ -151,7 +151,7 @@
id="facturation-nom" name="facturation-nom"
minlength="2" required
type="text" value="{{ adresse_facturation.last_name }}"
/>
>
</div>
<div class="formulaire__champs__champ">
@ -161,7 +161,7 @@
id="facturation-adresse" name="facturation-adresse"
required type="text"
value="{{ adresse_facturation.address_1 }}"
/>
>
</div>
<div class="formulaire__champs__champ">
@ -171,7 +171,7 @@
minlength="3" name="facturation-code-postal"
required type="text"
value="{{ adresse_facturation.postcode }}"
/>
>
</div>
<div class="formulaire__champs__champ">
@ -181,7 +181,7 @@
id="facturation-ville" minlength="2"
name="facturation-ville" required
type="text" value="{{ adresse_facturation.city }}"
/>
>
</div>
<div class="formulaire__champs__champ">
@ -191,7 +191,7 @@
id="facturation-region-etat" name="facturation-region-etat"
placeholder="If applicable" type="text"
value="{{ adresse_facturation.state }}"
/>
>
</div>
<div class="formulaire__champs__champ">
@ -215,7 +215,7 @@
id="facturation-telephone" minlength="6"
name="facturation-telephone" required
type="tel" value="{{ adresse_facturation.phone }}"
/>
>
</div>
<div class="formulaire__champs__champ">
@ -225,7 +225,7 @@
id="facturation-email" minlength="4"
name="facturation-email" required
type="email" value="{{ email }} "
/>
>
</div>
</div>
</div>
@ -252,7 +252,7 @@
<input
id="paiement-stripe" name="type-paiement"
type="radio"
/>
>
</div>
</div>
</div>

View file

@ -26,7 +26,7 @@
{# Affiche tous les attributs relevants pour la variation choisie #}
{% for attribut in produit.attributs %}
{% if attribut.valeur %}
{{ attribut.nom }}: <strong>{{ attribut.valeur }}</strong><br />
{{ attribut.nom }}: <strong>{{ attribut.valeur }}</strong><br>
{% endif %}
{% endfor %}
{# Affiche le nom de la Variation #}
@ -42,7 +42,7 @@
<input
min="1" type="number"
value="{{ produit.quantite }}"
/>
>
<button class="detail-produit__actions__addition" type="button">
+
</button>
@ -75,7 +75,7 @@
maxlength="20" minlength="3"
name="code-promo" placeholder="Discount code or gift card"
type="text" value='{{ code_promo ? code_promo : ""}}'
/>
>
<button
class="bouton-blanc-sur-noir" for="code-promo"
id="bouton-code-promo" type="button"
@ -106,20 +106,20 @@
{% if sous_total_livraison == 0 %}
<p>
<strong>Enter your delivery address</strong>
<br />
<br>
<span>&nbsp;</span>
</p>
{% else %}
<p>
<strong>{{ sous_total_livraison }}€</strong>
<br />
<br>
<span>{{ methode_livraison }}</span>
</p>
{% endif %}
</div>
<p class="panneau__sous-totaux__conditions-livraison">
Belgium and France: free shipping on orders above 50€.<br />
Belgium and France: free shipping on orders above 50€.<br>
Worldwide: free shipping on orders above 100€.
</p>
</div>

View file

@ -42,7 +42,7 @@
{# Affiche tous les attributs relevants pour la variation choisie #}
{% if produit.attribut|length > 0 %}
{% for attribut in produit.attribut %}
{{ attribut.nom }}: <strong>{{ attribut.valeur }}</strong><br />
{{ attribut.nom }}: <strong>{{ attribut.valeur }}</strong><br>
{% endfor %}
{% endif %}
qty: <strong>{{ produit.quantite }}</strong>

View file

@ -0,0 +1,86 @@
<?php
/**
* Le modèle du reçu envoyé au client.
*/
use Illuminate\Support\Number;
use Illuminate\Support\Str;
use Timber\Timber;
use Carbon\Carbon;
if (!defined("ABSPATH")) {
exit();
}
// Initialise Timber
Timber::init();
// Sélectionne le répertoire contenant les modèles Twig
Timber::$dirname = ["views"];
// Contexte et modèles
$contexte = Timber::context();
$modeles = ["email-base.twig"];
/** @var Order $commande */
$commande = $order;
/** @var Carbon $date */
$date = new Carbon($commande->get_date_created());
$email = [
"adresses" => [
"facturation" => $commande->get_address("billing"),
"livraison" => $commande->get_address("shipping"),
],
"commande" => [
"date" => $date->toDateString(),
"id" => $commande->get_id(),
],
"livraison" => $commande->get_shipping_method(),
"paiement" => [
"methode" => "",
],
"produits" => collect($commande->get_items())->map(function (WC_Order_Item_Product $article) {
/** @var WC_Product_Simple|WC_Product_Variable $produit */
$produit = wc_get_product($article["product_id"]);
/** @var WC_Product_Simple|WC_Product_Variation $produit_article */
$produit_article = $article->get_product();
return [
"attribut" => $produit->is_type("variable")
? collect($produit->get_attributes())
->mapWithKeys(function ($atr, $cle) use ($produit_article) {
$nom_attribut = Str::lower(wc_attribute_label($cle, $produit_article));
$valeur_attribut = $produit_article->get_attribute($cle);
return ["nom" => $nom_attribut, "valeur" => $valeur_attribut];
})
->toArray()
: [],
"lien" => $produit->get_permalink(),
"nom" => $produit->get_title(),
"prix_total" => $article->get_total(),
"quantite" => $article->get_quantity(),
];
}),
"totaux" => [
"sous_total_livraison" => $commande->get_shipping_total() == "0" ? "Free" : $commande->get_shipping_total() . "",
"sous_total_produits" => $commande->get_subtotal() . "",
"sous_total_reduction" =>
$commande->get_discount_total == "0.00"
? "0"
: Number::format($commande->get_discount_total(), maxPrecision: 2) . "",
"total" => Number::format($commande->get_total(), maxPrecision: 2) . "",
],
];
// Transforme les codes de pays en noms de pays
$email["adresses"]["livraison"]["country"] = WC()->countries->countries[$commande->get_shipping_country()];
$email["adresses"]["facturation"]["country"] = WC()->countries->countries[$commande->get_billing_country()];
// echo "<pre>";
// print_r($commande);
// echo "</pre>";
$contexte["commande"] = $email;
// Rendu
Timber::render(filenames: $modeles, data: $contexte);

View file

@ -0,0 +1,58 @@
<?php
/**
* Customer processing order email
*/
use Timber\Timber;
use Carbon\Carbon;
if (!defined("ABSPATH")) {
exit();
}
// Initialise Timber
Timber::init();
// Sélectionne le répertoire contenant les modèles Twig
Timber::$dirname = ["views"];
// Contexte et modèles
$contexte = Timber::context();
$modeles = ["email-base.twig"];
/** @var WC_Order $commande */
$commande = $order;
/** @var Carbon $date */
$date = new Carbon($commande->get_date_created());
$email = [
"adresses" => [
"facturation" => [],
"livraison" => [],
],
"commande" => [
"date" => $date->toDateString(),
"id" => $commande->get_id(),
],
"livraison" => [],
"produits" => collect($commande->get_items())->map(function (WC_Order_Item $produit) {
return [
"lien" => $produit->get_permalink(),
"nom" => $produit->get_name(),
"prix_total" => $produit->get_total(),
"quantite" => $produit->get_quantity(),
"titre_variation" => "",
];
}),
"totaux" => [
"sous_total_livraison" => $commande->get_shipping_total(),
"sous_total_produits" => $commande->get_subtotal(),
"sous_total_reduction" => $commande->get_discount_total(),
"total" => $commande->get_total(),
],
];
$contexte["commande"] = $email;
// Rendu
Timber::render(filenames: $modeles, data: $contexte);

View file

@ -0,0 +1,8 @@
<?php
/**
* Le modèle du reçu envoyé au client.
*/
if (!defined("ABSPATH")) {
exit(); // Exit if accessed directly
} ?>

View file

@ -0,0 +1,8 @@
<?php
/**
* Le modèle du reçu envoyé au client.
*/
if (!defined("ABSPATH")) {
exit(); // Exit if accessed directly
} ?>

View file

@ -0,0 +1,5 @@
<?php
if (!defined("ABSPATH")) {
exit(); // Exit if accessed directly
} ?>

File diff suppressed because one or more lines are too long

View file

@ -1,68 +0,0 @@
<?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 &mdash; 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);

View file

@ -1,68 +0,0 @@
<?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);

View file

@ -1,66 +0,0 @@
<?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__("Youve 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);

View file

@ -1,64 +0,0 @@
<?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);

View file

@ -1,108 +0,0 @@
<?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 youre 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);

View file

@ -1,62 +0,0 @@
<?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);

View file

@ -1,63 +0,0 @@
<?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);

View file

@ -1,71 +0,0 @@
<?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);

View file

@ -1,66 +0,0 @@
<?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. Its 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);

View file

@ -1,74 +0,0 @@
<?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 &mdash; 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);

View file

@ -1,80 +0,0 @@
<?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);

View file

@ -1,65 +0,0 @@
<?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);

View file

@ -1,77 +0,0 @@
<?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>

View file

@ -1,32 +0,0 @@
<?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; ?>

View file

@ -1,66 +0,0 @@
<?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>

View file

@ -1,72 +0,0 @@
<?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>

View file

@ -1,76 +0,0 @@
<?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">

View file

@ -1,20 +0,0 @@
<?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

@ -1,114 +0,0 @@
<?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); ?>

View file

@ -1,106 +0,0 @@
<?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; ?>

View file

@ -1,269 +0,0 @@
<?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;
}
}