Today someone sent me a question about the error in WooCommerce alerting them that their WooCommerce template files were out of date and needed to be update. Here’s what to do when you find you’ve got outdated template files in WooCommerce.
Again, there's going to be red text next to EACH of WooCommerc's outdated template files.
Now, lets’ get those Outdated Template Files Fixed!
Patrick made a great write up back in February. Why this error still exists (especially in paid themes) is a complete mystery to me! Regardless, I’m going to go over this process using the one example file above. Lather, rinse, repeat for any and all of the other files.
First, let’s run over to git and find the current WooCommerce template files. <–click the sentence!
Next, look at the file we need to replace. It’s the /myaccount/form-login.php file, right? So, let’s find that specific file. Run back over to the git page and scroll down until you find the files
Now that you’ve Clicked and opened the Folder labelled ‘myaccount’, see the files?
You should be looking at this screen right here: This is the current WooCommerce Template file in raw code.
Now, you need to get to the old outdated WooCommerce Template file. Copy / paste the old file into something and keep it somewhere just in case.(Thanks for the note Brian) It doesn’t matter if you use your favorite code editor or use WordPress’s built in plugin editor located at Administration > Plugins > Editor. Open the file. Select All. Copy the correct “raw” file, and replace the outdated WooCommerce Template File with your new one. Click save, or be sure to ftp the correct WooCommerce Template File back to the server.
If you run back over to the admin area of your theme, you’ll notice that the alert is now gone.
Many themes and primarily many other WooCommerce plugins rely on WooCommerce Template Files to be current (not outdated). Not having current files can hurt you in more ways than one. But more importantly, you’re site’s visitors could be faced with functions that don’t work, fields that aren’t current, and layouts that are messed up.
***Usually, (and best practice) the theme will make any customizations outside of the core WooCommerce files. If you’re unsure about any customizations that the theme is working with, you can simply paste the old and new file in diffchecker.com and update the old file by copy / pasting the different code in ‘chunks’ or ‘pieces’ so that any tweaks the theme might be using are not lost. In the diffchecker, simply find the highlighted portions of the two files and create one new file with the updated code. Be sure to change the version number of the file to reflect the current file’s version number as well.
Regardless if it’s a theme you’ve bought, or one you’ve hand written yourself, now you know how to replace outdated WooCommerce Template files.
[product_hero layout=”center” background_img=”https://bradgriffin.me/wp-content/uploads/2015/10/pillow-fight-cropped.png” width=”full” full_height=”0″ background_size=”cover” overlay_opacity=”0.25″ product_id=”3452″ parallax=”1″ description_text_color=”#eeeeee”]