Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Dante › How to update Woocommerce files in child theme?
New Landing › How can we help? › Themeforest Theme Support › Dante › How to update Woocommerce files in child theme?
- This topic has 9 replies, 5 voices, and was last updated 8 years by Swift Ideas – Ed.
-
Posted in: Dante
-
November 9, 2015 at 6:45 pm #227197
Hi,
I have done a woocommerce update on my site. Since I was using a child theme I am getting a message that my child theme has copies of non updated templates of woocommerce. It also tells me to check with the theme developer before updating.
Could you please let me know how to update these files from an ftp?
Do I have to locate the files that need to be updated and replace these or I have to replace the whole woocommerce folder?
Thanks in advance.
November 9, 2015 at 6:54 pm #227201Hi,
Since you have modified some files you can’t replace them, you need to check in Woocommerce System status what files are different and compare the modified one with our latest version that is in the parent theme and copy the changes across.
-Rui
November 9, 2015 at 7:02 pm #227206Thanks for your reply Rui,
Just to not do any mistake I am getting only the following update from the System Status:
dante/woocommerce/single-product\price.php version 1.6.4 where the updated version is 2.4.9.
What I have to do is go to wp-content/plugins/woocommerce/templates/single-product/price.php and copy the code and replace it in wp-content/themes/dante/woocommerce/single-product/price.php ?
As I said I have dante and dante child installed and I am currently running dante child but the price.php file isn’t modified inside dante-child theme.
So, do I do what I wrote above or I have to create the path in my dante-child theme like wp-content/themes/dante-child/woocommerce/single-product/price.php?
In other words, do I replace the price.php file inside dante theme or I create the path inside dante child and drop it in there?
Please let me know.
Thanks in advance.November 9, 2015 at 8:06 pm #227229Hi Rui,
Dante theme is using the following code for price.php
<?php /** * Single Product Price, including microdata for SEO * * @author WooThemes * @package WooCommerce/Templates * @version 1.6.4 */ if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly global $post, $product; ?> <div itemprop="offers" itemscope itemtype="http://schema.org/Offer"> <p itemprop="price" class="price"><?php echo $product->get_price_html(); ?></p> <meta itemprop="priceCurrency" content="<?php echo get_woocommerce_currency(); ?>" /> <link itemprop="availability" href="http://schema.org/<?php echo $product->is_in_stock() ? 'InStock' : 'OutOfStock'; ?>" /> </div>
However, the new update is running this version:
<?php /** * Single Product Price, including microdata for SEO * * @author WooThemes * @package WooCommerce/Templates * @version 2.4.9 */ if ( ! defined( 'ABSPATH' ) ) { exit; // Exit if accessed directly } global $product; ?> <div itemprop="offers" itemscope itemtype="http://schema.org/Offer"> <p class="price"><?php echo $product->get_price_html(); ?></p> <meta itemprop="price" content="<?php echo esc_attr( $product->get_price() ); ?>" /> <meta itemprop="priceCurrency" content="<?php echo esc_attr( get_woocommerce_currency() ); ?>" /> <link itemprop="availability" href="http://schema.org/<?php echo $product->is_in_stock() ? 'InStock' : 'OutOfStock'; ?>" /> </div>
Will the functionality of the theme break if I add the updated price.php (version 2.4.9) to child theme or I should wait for a Dante theme update?
Sorry if I insist but it’s a bit confusing.
November 9, 2015 at 8:42 pm #227237I did a bit of research and a lot of people are saying not to do any updates and stay with the theme’s files in order to be safe.
Would you recommend this as well?I have also noticed that there are going to be some MAJOR changes in woocommerce plugin and I would like to remind you of this:
https://woocommerce.wordpress.com/2015/11/09/woocommerce-2-5-beta-1/
I am sure your developers might be aware of this but these changes look like they will really affect swiftideas themes so I wanted to know if you are planning to work on modifications before the official release on January 2016.
November 9, 2015 at 11:51 pm #227271If you didn’t changed that file in your child theme then we probably need to update our version according to the latest Woocommerce plugin.
Will forward the topic to the development team.
Let’s wait for the reply.
-Rui
November 10, 2015 at 9:49 am #227326Thanks a lot Rui,
I actually just added the price.php in child theme and it seems to be working fine for now. If there is a problem I will remove it and start using again the outdated version of dante.
I guess the most important thing is to be ready for woocommerce 2.5 as according to the developers the changes from 2.4.9 to 2.5 are going to be major and they are going to affect a lot of themes that have woocommerce integrated.
Thanks again for your time.
November 10, 2015 at 10:05 am #227327Ok no problem
July 27, 2016 at 9:16 pm #284392Hi Rui, are there an news regarding the topic mentioned above? you wanted to update your version according to the latest Woocommerce plugin and contact your support team.
My problem is also, that I am getting a message that my child theme has copies of non updated templates of woocommerce. It also tells me to check with the theme developer before updating.
Thanks for your support. Ben
July 28, 2016 at 11:58 am #284567Hi @solidsn2004
Apologies for the delay.
That price.php file is no longer included in the Dante parent theme, so unless you need to override it then you can remove it from your child theme.
If you are overriding files in your child theme, then that is fine. The messages you’ve seen about not replacing parent theme files is purely because the changes we have made there are for a reason. If you are planning to make edits, then I’d just suggest to check the parent theme files to see if a template is there, and then copy that down rather than straight from the WooCommerce template files.
Let us know if you have any more questions.
– Ed
-
Posted in: Dante
You must be logged in and have valid license to reply to this topic.