Outdated woocommerce template files (not a child theme or own template)

hey there,
I got the message “outdated woocommerce template files”.

I don’t use any templates or child theme. What do I have to do?
I checked the support forum for answers…didn’t found a solution.

Hope you can help.

Best,
Linda

1 Like

Hi there,

Please follow the suggestion here:

Hope his helps.

@Jade,

I’ve been stuck on this issue for weeks, trying to figure it out from the WooCommerce docs.

Could you break down the process more for us down to very specific steps? It looks like a few people have written in within the past week on this issue, and we’re all lost. And yes, we’ve been to the WooCommerce link.

If you could clarify the steps to fix this that would be great!

@Jade and will your themes be updated for the new woocommerce update so that this tinkering with the child-theme will not be necessary by any chance? (i refer to this:

Most theme authors fix their themes in a timely manner, so you only need to update your theme to get the updated templates.<

i also can’t understand the developer guide you suggested using. thanks a lot! kai

ps: i looked around on the server via ftp:
if i have not done any changes to the file in question (single-product-reviews.php) can’t i just replace the old one in the childtheme with the new one in the updated plugin? why did the update not do it?

Hi Jade,
I found the page before writing about the problem here.

As I said: I did NOT change the template or have a child theme. I updated to the latest version of pro.
So I don’t know what to change in the file, as it said…

Would be great, if you help.

Best,
Linda

I could use some help on this as well. Thx Themeco support.

Outdated theme files are a warning, not an error. Often it won’t affect your site. If the template file in question is in the parent theme (Woo status report will tell you), you’re better off waiting for a theme update.

If it’s your child theme (you made your own Woo overrides), then simply download the new version of Woocommerce, open the templates directory and find the same file. Apply your customization to the new file, and save it into your child theme.

thanks michael!
so this is the file in question:
x/woocommerce/single-product-reviews.php
it is not in the child theme but in the main theme. and this is the old version.
the new version is in the updated plugin of woocommerce.
can i just copy it over or wait for the next update of x?
thanks a lot! kai

Hello Everyone,

The original template from woocommerce can be found here:
wp-content\plugins\woocommerce\templates\single-product-reviews.php
The customization on X theme on that specific template can be found here:
wp-content\themes\x\woocommerce\single-product-reviews.php

You may copy the woocommerce original template file on your child theme here:
\wp-content\themes\x-child\woocommerce\single-product-reviews.php
Copying the original woocommerce template file on the child theme means the message will be gone but you will lose X theme customization on that file.

Alternatively, you can compare the original file, and the custom template and if you understand the structure, feel free update your template on the child theme. Only do this if you are familiar with coding templates because this might result on fatal error if not done properly.

Hope this helps.

@Lely thanks for clarifying! could you also explain what to do in case you do not want to copy that newer template to your child theme? can i just replace the newer one of the woocommerce plugin with the one in x-theme? or should i wait for a theme update on this? please reply quickly i really want to be done with this actually simple issue asap. thanks a lot! kai
ps: will there be an update regarding this in pro/x?

Shouldn’t there be an update to X and Pro to correct this issue since it’s the file that comes with them that is the wrong version?

1 Like

The only breaking change I see in single-product-reviews.php is on line 68.

Change

<?php if ( get_option( 'woocommerce_review_rating_verification_required' ) === 'no' || wc_customer_bought_product( '', get_current_user_id(), $product->id ) ) : ?>

to

<?php if ( get_option( 'woocommerce_review_rating_verification_required' ) === 'no' || wc_customer_bought_product( '', get_current_user_id(), $product->get_id() ) ) : ?>

Basically, you are changing $product->id to $product->get_id() to fix the error in the code.

Your Woocommerce will still complain until apex updates the template, but at least there won’t be any coding errors.

cool and thanks @Kode3We!
@Lely could you pls confirm?

Hi There,

Yes, that is part of the changes. But the template outdated message will still be there even if you update that line.

dear @Lely, i am still confused what to do. as i understand it theme.co would have to update their themes to make it compatible with woocommerce again. right? and if so will you? thanks, kai

also germanized for woocommerce gives me that information:
Theme ist noch nicht für WooCommerce Germanized optimiert (Theme is not yet optimized for WooCommerce Germanized). do you also take the plugin germanized in consideration?
thanks again! kai

Correct, Woocommerce would still say that it’s out of date when you change that line.

However, at least the code would work for anyone using Woocommerce >v3.2 until you guys release an update that has a fix that will work for Woocommerce both before and after v3.2.

When should we expect to see an update?

@Kode3Web thanks a lot for your help!
just a thought: why can’t i just replace the whole php page with the latest version? why only that one line in the code? would it break something?
too bad we have not better information from theme.co!

You could do that but the Woocommerce template wouldn’t have the theme-specific code that is in the file.

ah thanks. of course - now that you say it… :wink: