Child Theme
-
So I decided to give Customizr another try before I scrap the idea of using it on this particular site, everything works fine with woocommerce and the plugins in the PARENT THEME. But the moment I go to use the child theme I insert the coding I need into the functions.php file which has been verified to work via Mike Jolley from woocommerce and has worked in the past and it goes to hell and a handbasket really quick.
I do my test by adding items to the cart using the CHILD THEME and when I go to checkout all it does is hang and will not let me proceed to the finale steps to finish the transaction.
I have cleared all transients as was suggested by Mike also disabled all plugins except woocommerce in the CHILD THEME, cleared my cache in the browser, reinstalled both customizr, child theme that was downloaded from presscustomizr, wordpress core and woocommerce. Even went as far as clearing out the database on the server side. And still no luck. I use Customnizr on 2 other websites with child themes and have no issues granted they do not have woocommerce installed on them and when you copy Customizr core files that you want to modify everything still works.
Here is what the style.css and the functions.php look like.. I would really like to keep using the Customizr theme and would consider going pro for this one retail site because I really like how it looks so any help would be appreciated.
?/* Theme Name: EatGaff Tape Theme URI: https://eatgafftaperadio.com/childmain Description: A child theme for the Customizr WordPress theme. This child theme simply includes 2 files : style.css to add your custom css and functions.php where you can extend Customizr's core code. In order to keep your code as clean and flexible as possible, try to use Customizr's hooks API for your customizations. Do something awesome and have fun ! Author: Nicolas Guillaume (nikeo) Author URI: https://eatgafftaperadio.com Template: customizr Version: 1.0.0 */ /* Your awesome customizations start right here ! -------------------------------------------------------------- */
?<?php /** * This is where you can copy and paste your functions ! */ /** * woocommerce_package_rates is a 2.1+ hook */ add_filter( 'woocommerce_package_rates', 'hide_shipping_when_free_is_available', 10, 2 ); /** * Hide shipping rates when free shipping is available * * @param array $rates Array of rates found for the package * @param array $package The package array/object being shipped * @return array of modified rates */ function hide_shipping_when_free_is_available( $rates, $package ) { // Only modify rates if free_shipping is present if ( isset( $rates['free_shipping'] ) ) { // To unset a single rate/method, do the following. This example unsets flat_rate shipping unset( $rates['flat_rate'] ); // To unset all methods except for free_shipping, do the following $free_shipping = $rates['free_shipping']; $rates = array(); $rates['free_shipping'] = $free_shipping; } return $rates; }
- The topic ‘Child Theme’ is closed to new replies.