Outdated WooCommerce template files and update failed
-
The site is on the free version of Virtue and has an ecommerce site. We recently updated all plugins and the WordPress version. Since then every time I try to make a content update I get the red bar with message “update failed”. I deactivated all plugins 1 one by one and the one that is causing the problem is Woocommerce. I also get the message “Your theme (Virtue Child) contains outdated copies of some WooCommerce template files”. As a workaround I am disabling Woocommerce every time I need to make a content update but my client wants this fixed. Any thoughts? A fix will be so welcome! ??
The page I need help with: [log in to see the link]
-
Hi,
Thanks for reaching out! What version of Virtue parent theme are you running? And what all have you added to your child theme?Kindly,
HannahHi Hannah,
Thanks for your reply. I inherited this site and didn’t set up the child theme myself. Below are the details of the child theme:Theme Name: Virtue Child Theme URI: https://kadencethemes.com/product/virtue-free-theme/ Description: The Virtue theme is extremely versatile with tons of options Author: Kadence Themes Author URI: https://kadencethemes.com/ Template: virtue Version: 2.1.2 Tags: responsive-layout, two-columns, one-column, custom-colors, custom-header, custom-menu, featured-images, translation-ready, theme-options, photoblogging Text Domain: virtue-child */
It looks like it is customer-processing-order.php which is outdated. I am really unexperienced when it comes to coding (know absolutely nothing!) but I can post the contents of the file here (see below). I am also not sure if this is the issue with the update failed message once I try and update content on the normal pages?
<?php /** * Customer processing order email * * @author WooThemes * @package WooCommerce/Templates/Emails * @version 1.6.4 */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?> <?php do_action('woocommerce_email_header', $email_heading); ?> <p><?php _e( "Your order has been received and is now being processed. Your order details are shown below for your reference:", 'woocommerce' ); ?></p> <?php do_action( 'woocommerce_email_before_order_table', $order, $sent_to_admin, $plain_text ); ?> <h2><?php echo __( 'Order:', 'woocommerce' ) . ' ' . $order->get_order_number(); ?></h2> <table cellspacing="0" cellpadding="6" style="width: 100%; border: 1px solid #eee;" border="1" bordercolor="#eee"> <thead> <tr> <th scope="col" style="text-align:left; border: 1px solid #eee;"><?php _e( 'Product', 'woocommerce' ); ?></th> <th scope="col" style="text-align:left; border: 1px solid #eee;"><?php _e( 'Quantity', 'woocommerce' ); ?></th> <th scope="col" style="text-align:left; border: 1px solid #eee;"><?php _e( 'Price', 'woocommerce' ); ?></th> </tr> </thead> <tbody> <?php echo $order->email_order_items_table( $order->is_download_permitted(), true, ( $order->status=='processing' ) ? true : false ); ?> </tbody> <tfoot> <?php if ( $totals = $order->get_order_item_totals() ) { $i = 0; foreach ( $totals as $total ) { $i++; ?><tr> <th scope="row" colspan="2" style="text-align:left; border: 1px solid #eee; <?php if ( $i == 1 ) echo 'border-top-width: 4px;'; ?>"><?php echo $total['label']; ?></th> <td style="text-align:left; border: 1px solid #eee; <?php if ( $i == 1 ) echo 'border-top-width: 4px;'; ?>"><?php echo $total['value']; ?></td> </tr><?php } } ?> </tfoot> </table> <?php do_action( 'woocommerce_email_after_order_table', $order, $sent_to_admin, $plain_text ); ?> <?php do_action( 'woocommerce_email_order_meta', $order, $sent_to_admin, $plain_text ); ?> <h2><?php _e( 'Customer details', 'woocommerce' ); ?></h2> <?php if ($order->billing_email) : ?> <p><strong><?php _e( 'Email:', 'woocommerce' ); ?></strong> <?php echo $order->billing_email; ?></p> <?php endif; ?> <?php if ($order->billing_phone) : ?> <p><strong><?php _e( 'Tel:', 'woocommerce' ); ?></strong> <?php echo $order->billing_phone; ?></p> <?php endif; ?> <?php wc_get_template( 'emails/email-addresses.php', array( 'order' => $order ) ); ?> <?php do_action( 'woocommerce_email_footer' ); ?>
- This reply was modified 2 years, 5 months ago by logicinn.
Hey,
You need to download the latest version of Virtue. You can do so from here: https://www.ads-software.com/themes/virtue/
You should also update your PHP version. Your host should be able to help you with that.Kindly,
HannahHi Hannah,
Once again thanks for your reply. I do have the latest version of the Virtue theme installed at the moment. It is just the child theme that shows an outdated version (do I need to update anything there?). I am also not sure how to update the customer-processing-order.php so it includes the latest woocommerce template files without messing with the custom code entered?
We were on PHP 7.4 but I updated to PHP 8.1 just now. Unfortunately the problem still persists. My biggest concern is the “update failed” message I get when I try to update any content on the website. The Woocommerce plugin is causing this as I tested it and when I disable Woocommerce everything works fine. Could the outdated customer-processing-order.php file be the cause?
Hi Hannah,
I managed to update the Woocommerce customer-processing-order.php template so that is sorted now. However, I still get the “update failed” on any content updates and I know that Woocommerce plugin is causing the issue. I get the following:The REST API call gave the following unexpected result: (500) <!DOCTYPE html> <html lang="en-US"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta name="viewport" content="width=device-width"> <meta name='robots' content='noindex, follow' /> <title>WordPress ? Error</title> <style type="text/css"> html { background: #f1f1f1; } body { background: #fff; border: 1px solid #ccd0d4; color: #444; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif; margin: 2em auto; padding: 1em 2em; max-width: 700px; -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .04); box-shadow: 0 1px 1px rgba(0, 0, 0, .04); } h1 { border-bottom: 1px solid #dadada; clear: both; color: #666; font-size: 24px; margin: 30px 0 0 0; padding: 0; padding-bottom: 7px; } #error-page { margin-top: 50px; } #error-page p, #error-page .wp-die-message { font-size: 14px; line-height: 1.5; margin: 25px 0 20px; } #error-page code { font-family: Consolas, Monaco, monospace; } ul li { margin-bottom: 10px; font-size: 14px ; } a { color: #0073aa; } a:hover, a:active { color: #006799; } a:focus { color: #124964; -webkit-box-shadow: 0 0 0 1px #5b9dd9, 0 0 2px 1px rgba(30, 140, 190, 0.8); box-shadow: 0 0 0 1px #5b9dd9, 0 0 2px 1px rgba(30, 140, 190, 0.8); outline: none; } .button { background: #f3f5f6; border: 1px solid #016087; color: #016087; display: inline-block; text-decoration: none; font-size: 13px; line-height: 2; height: 28px; margin: 0; padding: 0 10px 1px; cursor: pointer; -webkit-border-radius: 3px; -webkit-appearance: none; border-radius: 3px; white-space: nowrap; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; vertical-align: top; } .button.button-large { line-height: 2.30769231; min-height: 32px; padding: 0 12px; } .button:hover, .button:focus { background: #f1f1f1; } .button:focus { background: #f3f5f6; border-color: #007cba; -webkit-box-shadow: 0 0 0 1px #007cba; box-shadow: 0 0 0 1px #007cba; color: #016087; outline: 2px solid transparent; outline-offset: 0; } .button:active { background: #f3f5f6; border-color: #7e8993; -webkit-box-shadow: none; box-shadow: none; } </style> </head> <body id="error-page"> <div class="wp-die-message"><p>There has been a critical error on this website.</p><p><a href="https://www.ads-software.com/support/article/faq-troubleshooting/">Learn more about troubleshooting WordPress.</a></p></div></body> </html> .
Any idea how to fix this?
Hi Hannah,
I found the problem via WordPress error log. It was actually another plugin for Woocommerce which caused the issue. The plugin is discontinued and I deactivated and deleted it. Everything working fine now!
Thanks for your patience!
Glad to hear you were able to determine the issue! Let us know if there’s anything else we can help you with.
Kindly,
Hannah
- The topic ‘Outdated WooCommerce template files and update failed’ is closed to new replies.