Title: template files not overwriting
Last modified: May 15, 2023

---

# template files not overwriting

 *  Resolved [marxmann](https://wordpress.org/support/users/marxmann/)
 * (@marxmann)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/template-files-not-overwriting/)
 * I have two apparent very outdated files:
 * kleo/woocommerce/cart/cart.php version 4.4.0 is out of date. The core version
   is 7.0.1,
    kleo/woocommerce/product-searchform.php version 3.3.0 is out of date.
   The core version is 7.0.1
 * I downloaded the latest Woocommerce template files and added them to the exact
   file structure in the child theme but the files are still outdated. Also added
   to child root directory, a ‘woocommerce/templates” directory, nothing works, 
   files are still outdated.
 * I also replaced the files in the root theme folder structure and that didn’t 
   work either. Is there a SPECIFIC code I can copy to place in the child themes
   functions.php file or is there another solution? Other similar topics here are
   outdated.
 * I don’t understand why this problem even exists, if the woocommerce plugin is
   updated regularly why doesn’t it update all the necessary files?

Viewing 8 replies - 1 through 8 (of 8 total)

 *  [xue28 (woo-hc)](https://wordpress.org/support/users/xue28/)
 * (@xue28)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/template-files-not-overwriting/#post-16157278)
 * Hi [@marxmann](https://wordpress.org/support/users/marxmann/)
 * Thanks for reaching out!
 * I understand that there are outdated template files on your site.
 * Have you followed the steps on this support documentation about [Fixing Outdated WooCommerce Templates](https://woocommerce.com/document/fix-outdated-templates-woocommerce/?quid=ed987821e91fac5dccaec59451a053ca)?
 * Meanwhile, I’d like to understand your site properly, can you please share your**
   System Status Report**, that will help us further troubleshoot.
 * You can find it via `WooCommerce > Status`. Select `Get system report` and then`
   Copy for support`. Once you’ve done that, you can paste it into your reply here.
 * If you could also provide the **fatal error logs** (if any) under `WooCommerce
   > Status > Logs`.
 *  Thread Starter [marxmann](https://wordpress.org/support/users/marxmann/)
 * (@marxmann)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/template-files-not-overwriting/#post-16157886)
 * I don’t see how pasting a large system file in a public forum is going to help.
   I have followed the guidelines but as I said it doesn’t work, the files are still
   appearing as outdated in system status.
 * At this page [https://developer.wordpress.org/reference/functions/add_theme_support/](https://developer.wordpress.org/reference/functions/add_theme_support/)
   they say `Must be called in the theme’s functions.php file to work.
    If attached
   to a hook, it must be ‘after_setup_theme’. The ‘init’ hook may be too late for
   some features.
 * But I do not know exactly what to past into my functions.php file. Does anyone
   know the solution to this?
 *  [xue28 (woo-hc)](https://wordpress.org/support/users/xue28/)
 * (@xue28)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/template-files-not-overwriting/#post-16159095)
 * Hi [@marxmann](https://wordpress.org/support/users/marxmann/)
 * > I don’t see how pasting a large system file in a public forum is going to help.
   > I have followed the guidelines but as I said it doesn’t work, the files are
   > still appearing as outdated in system status.
 * The **WooCommerce System Status report** is useful for troubleshooting issues
   with your store. Containing a wide variety of information and tools, you can 
   check software versions, server settings, and more from within.
 * Hence, as a first step, we need to check your site’s SSR. If you aren’t comfortable
   sharing it here, I recommend sending it using a service like [https://pastebin.com/](https://pastebin.com/)
   then you can allow some days for the info to be alive while the issue is being
   checked. (Once the info is removed or deactivated from Pastebin this will not
   be accessible).
 * Hope this helps!
 *  Thread Starter [marxmann](https://wordpress.org/support/users/marxmann/)
 * (@marxmann)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/template-files-not-overwriting/#post-16167177)
 * The only two errors on the status report are what I have already added here, 
   the 2 files that are out of date. If there is something more specific you want
   to see let me know and I’ll tell you. But there are no other warnings.
 * Adding the 2 new template files from the latest version to my child theme is 
   not being recognized, they still appear as outdated in the SR. There is probably
   a simple fix for this if by someone more qualified.
 * I tried adding (with my theme name):
 *  function mytheme_add_woocommerce_support() {
    add_theme_support( ‘woocommerce’);}
   add_action( ‘after_setup_theme’, ‘mytheme_add_woocommerce_support’ );
 * to the child theme functions.php file but it crashes the site, is there anyone
   more qualified that knows exactly what the code is to register overwrites?
 *  [anastas10s](https://wordpress.org/support/users/anastas10s/)
 * (@anastas10s)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/template-files-not-overwriting/#post-16176295)
 * Hi there [@marxmann](https://wordpress.org/support/users/marxmann/) 👋
 * > kleo/woocommerce/cart/cart.php version 4.4.0 is out of date. The core version
   > is 7.0.1,
   >  kleo/woocommerce/product-searchform.php version 3.3.0 is out of 
   > date. The core version is 7.0.1
 * Thanks for reaching out. Happy to help you with this!
    From what I gather, the
   site’s template files appear to not being overwriten.
 * Kindly note that the latest version of the `cart.php` file [is 3.8.0 (direct link here)](https://github.com/woocommerce/woocommerce/blob/6.5.0/plugins/woocommerce/templates/cart/cart.php).
   The one for `product-searchform.php` [is 3.3.0 (direct link here)](https://github.com/woocommerce/woocommerce/blob/6.5.0/plugins/woocommerce/templates/product-searchform.php).
 * Side note: not all template files need to be overwritten/replaced. Only the ones
   you actually need altered/customized. Are those two teplate files added in a `/
   woocommerce` folder, in your child theme’s folder, without the `/templates/` 
   subdirectory, [as described here](https://woocommerce.com/document/template-structure-overriding-templates-via-a-theme/#how-to-edit-files)?
 * > I don’t understand why this problem even exists, if the woocommerce plugin 
   > is updated regularly why doesn’t it update all the necessary files?
 * The purpose of having a child theme and custom template files is exactly that
   they do not get overwritten with a plugin update. Feel free to refer to the related“
   [Template structure & Overriding templates via a theme](https://woocommerce.com/document/template-structure-overriding-templates-via-a-theme/)”
   documentation, in addition to “[Customizing WooCommerce: Best Practices](https://woocommerce.com/document/customizing-woocommerce-best-practices/)“,
   to learn more about it.
 * > I don’t see how pasting a large system file in a public forum is going to help.
   > I have followed the guidelines but as I said it doesn’t work, the files are
   > still appearing as outdated in system status.
 * Feel free to read further in this pinned thread, detailing [what to do before posting](https://wordpress.org/support/topic/before-posting-gather-the-following-details/),
   as a site’s URL and System Status Report are very much required tools for troubleshooting
   issues like the one your site is having. Linked directly here is also the [guide to the WooCommerce forum](https://wordpress.org/support/topic/guide-to-the-woocommerce-forum/).
 * I trust that points you in the right direction, but if you have more questions,
   let us know. We’re happy to help.
    -  This reply was modified 3 years, 5 months ago by [anastas10s](https://wordpress.org/support/users/anastas10s/).
      Reason: typo
 *  Thread Starter [marxmann](https://wordpress.org/support/users/marxmann/)
 * (@marxmann)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/template-files-not-overwriting/#post-16219798)
 * Thanks for the reply. First I replaced the two outdated files as outlined in 
   the status report in the child theme with the latest version’s template files,
   it didn’t help as the report still said the two files are still outdated. I also
   replaced them with these direct link files (after deleted old files) but they
   are still appearing as outdated in the status report. Nothing as changed.
 * I also replaced the two files directly in the main theme woocommerce directory
   and nothing helped there either.
 * from status report:
 * {childtheme}/woocommerce/cart/cart.php version 3.8.0 is out of date. The core
   version is 7.0.1,
    {childtheme}/product-searchform.php version 3.3.0 is out of
   date. The core version is 7.0.1,
 * Are these what the correct paths should be? There has to be a simple solution
   to this somewhere, why can’t the main theme’s woo files just be overwritten?
 *  [Skyedesign](https://wordpress.org/support/users/skyedesign/)
 * (@skyedesign)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/template-files-not-overwriting/#post-16220035)
 * Okay, [@marxmann](https://wordpress.org/support/users/marxmann/) I have resolved
   my issue by updating the child theme files even though there are no WooCommerce
   files in that directory, and even though it shows as being the same version number
   as my child theme (3.0) it nonetheless solved the issue of the outdated files.
 * There are only 3 files in my child theme folder:
    functions.php screenshot.png
   style.css
 * To be noted: it cleared my functions.php to blank, but I saved the contents of
   that file and pasted it back in so don’t forget to do this if you have custom
   code in your functions.php file.
    -  This reply was modified 3 years, 5 months ago by [Skyedesign](https://wordpress.org/support/users/skyedesign/).
 *  Thread Starter [marxmann](https://wordpress.org/support/users/marxmann/)
 * (@marxmann)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/template-files-not-overwriting/#post-16220127)
 * [@skyedesign](https://wordpress.org/support/users/skyedesign/) good to see someone
   had success. I still didn’t, I deleted/replaced files in the child theme with
   latest copies but they still appear as outdated. I’m thinking maybe its a woo
   caching issue? I don’t know I’m not a programmer – which is why I’m using the
   plugin in the first place. I’m using W3 Total Cache but clearing didn’t help 
   either, I don’t see a cache in Woocommerce itself.
 * Too bad there’s no actual support for this unless you pay for it, which makes
   me not want to pay for it.
    -  This reply was modified 3 years, 5 months ago by [marxmann](https://wordpress.org/support/users/marxmann/).

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘template files not overwriting’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [template files](https://wordpress.org/support/topic-tag/template-files/)

 * 8 replies
 * 6 participants
 * Last reply from: [marxmann](https://wordpress.org/support/users/marxmann/)
 * Last activity: [3 years, 5 months ago](https://wordpress.org/support/topic/template-files-not-overwriting/#post-16220127)
 * Status: resolved