-
-
There is a warning at the top of my site that has been there for a while: “Your theme (Tower) contains outdated copies of some WooCommerce template files. These files may need updating to ensure they are compatible with the current version of WooCommerce.”
The out of date files are:
tower/woocommerce/content-product.php
version <strong style=”color: red;”>2.4.0 is out of date. The core version is 2.5.0,
tower/woocommerce/loop/add-to-cart.php
version <strong style=”color: red;”>2.1.0 is out of date. The core version is 2.5.0,
tower/woocommerce/single-product/add-to-cart/variable.php
version <strong style=”color: red;”>2.4.0 is out of date. The core version is 2.5.0,
tower/woocommerce/single-product/review.php
version <strong style=”color: red;”>2.1.0 is out of date. The core version is 2.5.0,Will there be an update to the Tower theme at some point that will include updates to the old WooCommerce files? I realize there is a way to do it manually, but I’m a newbie and would rather not be messing with the core of the theme unless I have to (since I don’t really know what I’m doing.) Thanks.
-
Hello,
What version of the theme do you have? Please update it to it’s latest version. It has WooCommerce files updated.
Best regards!
-
Mihalia – I am currently using Tower 1.4. I believe that I updated when I received the email last week. Is that the correct version? I cannot find any indication online what the most recent version of the theme is.
I am still seeing the warning at the top of my dashboard: “Your theme (Tower) contains outdated copies of some WooCommerce template files. These files may need updating to ensure they are compatible with the current version of WooCommerce.”
However, two of the files have dropped off the list (perhaps with the update?) and now there are only two that are out of date:
tower/woocommerce/single-product/add-to-cart/variable.php
version <strong style=”color: red;”>2.4.0 is out of date. The core version is 2.5.0tower/woocommerce/single-product/review.php
version <strong style=”color: red;”>2.1.0 is out of date. The core version is 2.5.0, -
Hello,
Sorry for the late reply.
The included files of Woocommerce have no issue working and being fully compatible with theme files. Despite the warnings, you can use Woocommerce without any issue.
Sometimes there are no changes made to a file from a version to another, just the version number. The files that have major changes, have been updated.
However, i will notify the developer team and we will update these two as well in the upcoming theme update.
Let us know if you need further help.Best regards!
-
Mihaila – Do you have an estimate for when the next theme update will happen?
I’m trying to customize WooCommerce on my functions.php page, and the code is not working (I’ve been speaking to someone on the wordpress.org forum.) We can’t figure it out, and all I can think is that it’s related to those two outdated files. I would change them manually, but after reading how to do it I’m not sure I understand and I don’t want to screw up my site.
-
Hello,
I can’t tell the exact release date at the time.
What issue are you having? Let us know, maybe we can help you sort it out.Best regards!
-
Thanks Mihaila! Here is my issue (WooCommerce specific):
When you click on a product category or subcategory, you see a list of products (image, name, and price.) When you hover over the product image a button pops up that says “add to cart.” You need to click on the product image to go to the product page that has the actual product information (product description, reviews, etc.).
It is confusing, because it isn’t intuitive, and so far no one I’ve tested the site on has figured out that if you click on the image, you’ll get more information about the product. I want to change the button to “product info” to send you to the product page instead of adding to the cart.
The WooCommerce author who responded to my request on the forum gave me the following instructions, but they didn’t work. I’m hoping that it’s a matter of the outdated php files.
INSTRUCTIONS FROM WOOCOMMERC AUTHOR
Turn off the ‘ajax add to cart’ option in WC > Settings > ProductS
Add this to theme functions.php:
add_filter( 'woocommerce_product_add_to_cart_url', 'custom_woocommerce_product_add_to_cart_url', 10, 2 );
function custom_woocommerce_product_add_to_cart_url( $url, $product ) {
if ( $product->is_type( ‘simple’ ) ) {
$url = get_permalink( $product->id );
}return $url;
}If you want to see the entire conversation, it’s here:
https://wordpress.org/support/topic/change-add-to-cart-button-in-category-to-product-description-1?replies=8#post-8191868
-
Hello,
This is a customization that does not depend on either some files are updated or not. I followed the steps described above and i was able to switch from ‘Add to Chart’ action to ‘product profile’. Please try these steps again:
1-Go to WooCommerce > Settings > Products > Display (options screenshot) make sure to have unchecked the “Enable AJAX add to cart buttons on archives”.
2-Go to file function.php and add the code given by plugins author (screenshot).Best regards!
-
Mihaila – When I follow those instructions, it does not work. I suspect I am adding this information to the wrong area, because when I open functions.php it does not look like what you showed me on your screenshot.
I have been getting to the functions.php page by going through Appearance>Editor and then selecting the functions.php file from the list on the right. Is there somewhere else that I’m supposed to be adding it instead?
I’ve left it as-is so you can see what I’ve done. Please let me know if I’m missing a } bracket, put it in the wrong spot, etc.
Thank you so much for your help!
-
Hello,
-I unchecked the “Enable AJAX add to cart buttons on archives” in WooCommerce > Settings > Products > Display;
-I corrected the code pasted in file functions.php. You had not pasted it at the very end of the file, but inside the last function.
Please check your shop page. Every “Add to chart” leads to product profile page.
If you want to remove the button and let only the image as link, then add this code into your custom css box:.woocommerce ul.products li.product:hover .button, .woocommerce-page ul.products li.product:hover .button { display: none; }
Best regards!
- This reply was modified 8 years, 8 months ago by Mirela.
-
Mihaila – Thank you so much! I had a suspicion that I was adding the code to the wrong spot. Now I know where to add it for other/future changes, so thank you again. I really appreciate it.
Do you know how to change the text of the “add to cart” button, so that it says “product info” or “view product” instead? Or is that something I would need to ask back in the wordpress.org forum?
Thank you for the CSS – I may choose to do that if I can’t change the button text.
Thank you again for all of your help!
-
Hello,
I added this code at the end of functions.php file:
add_filter( 'add_to_cart_text', 'woo_custom_product_add_to_cart_text' ); // < 2.1 add_filter( 'woocommerce_product_add_to_cart_text', 'woo_custom_product_add_to_cart_text' ); // 2.1 + function woo_custom_product_add_to_cart_text() { return __( 'Product Info', 'woocommerce' ); }
And i commented out the css code that removed the button.
Please read more about it, in this article:Best regards!
-
-
You must be logged in to reply to this topic.