Problem edit email woocommerce

Hello, I have various problems with woocommerce, when you give the new update of the x theme? I can not return to the old woocommerce. Thanks

Hi @PANCRAZIO,

Thank you for writing in, please do the following

  • Ensure that you are fully up to date. WordPress, Theme, and Cornerstone (Version Compatibility)

  • Clear all the site caches (plugin, server-side, CDN, and browser’s cache) so that the code from the latest release is always in use. This will help you to avoid any potential errors. Please deactivate this caching features while we tackle this issue.

  • Test for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

If the issue persists, please provide us the site URL and credentials in a Secure Note so we can take a closer look. And please clarify what are the issues.

Cheers,

Hi, I did what you told me, but it does not work, not the new woocommerce update I can not edit the automatic emails, here’s the error:

Hi Pancrazio,

You might need to update that file. Please backup that file and remove it from your child theme. Then copy the file again from wp-content\plugins\woocommerce\templates\emails and paste it to your child theme wp-content/themes/x-child/woocommerce/templates/emails. So now that you have the updated file, you may add your customization to that new file.

Hope this helps

Thanks, I did as you said, but I can’t change the content of the email anywhere. How can I do that?

Hello @PANCRAZIO,

Please be advised that the X theme does not modify the WooCommerce emails. The theme uses the default WooCommerce email templates. The default WooCommerce email template contains this code:

<?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://docs.woocommerce.com/document/template-structure/
 * @package WooCommerce/Templates/Emails/HTML
 * @version 3.5.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 billing full name */ ?>
<p><?php printf( __( 'You’ve received the following order from %s:', 'woocommerce' ), $order->get_formatted_billing_full_name() ); ?></p><?php // phpcs:ignore WordPress.XSS.EscapeOutput.OutputNotEscaped ?>
<?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 );

/*
 * @hooked WC_Emails::email_footer() Output the email footer
 */
do_action( 'woocommerce_email_footer', $email );

Please keep in mind that editing the template will only change the email template layout and not the email texts. It is best that you consult WooCommerce documentation to properly customize the WooCommerce emails.

Please note that custom coding is outside the scope of our support. Issues that might arise from the use of custom code and further enhancements should be directed to a third party developer.

Thank you for your understanding.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.