Problems after adding WooCommerce functions to functions.php
-
Hi,
My questions deal with the integration between a child theme and WooCommerce.Here’s the link to a zip which contains the files of my child theme https://drive.google.com/open?id=1jQmv_-e3v6nl48swXKPAOZR__hvcN6id
Please notice the function wc_cart_totals_shipping_method_label of WooCommerce which I copied from \plugins\woocommerce\includes\wc-cart-functions.php to the child theme’s functions.php.
Then I came across two issues.
The first one is critical: I couldn’t add or modified any page on my site! Only when I deleted this function from the functions.php of my child theme was I able to work as usual on my site.The second issue was that this function didn’t override the functions from \plugins\woocommerce\includes\wc-cart-functions.php.
Notice that I changed
$has_cost = 0 < $method->cost;
to
$has_cost = 0 <= $method->cost;But this change didn’t reflect in the behavior and it seemed the WP was ignoring my change and was executing the original function from \plugins\woocommerce\includes\wc-cart-functions.php.
It seems that there are some integration issues with the WooCommerce and my child theme.
I’ve already contacted my theme’s support and they told me that that was a Woocommerce issue.
Any help would be highly appreciated,
- The topic ‘Problems after adding WooCommerce functions to functions.php’ is closed to new replies.