New Landing How can we help? Atelier Theme Updates delete changes on functions.php and headers.php

Viewing 6 posts - 1 through 6 (of 6 total)
  • Posted in: Atelier
  • #259930
    giu_gugl
    Member
    Post count: 39

    Hi Guys

    Thanks for your effort and I’m sorry if sometimes I put down crazy stuff (btw I’m going to mark as resolved the previous topic)!

    I put some changes in the functions.php to customize the billing section but whenever I update the theme this changes go wested and I have to put hands again into the file.

    Same problem with the Google Analytics Tag (Using Tag Manager) within the header.php (And this is a huge issue)!

    As the website is made in 2 languages with two different wordpress installations, you understand that I can get crazy with this!

    Is there a way to make the changes permanent?

    Can you help me?

    Thanks so much!!

    functions.php Changes:
    /* Add the field to the checkout
    ================================================== */
    // Hook in
    add_filter( ‘woocommerce_checkout_fields’ , ‘custom_override_checkout_fields’ );

    // Our hooked in function – $fields is passed via the filter!
    function custom_override_checkout_fields( $fields ) {
    $fields[‘billing’][‘billiing_codicefiscale/piva’] = array(
    ‘label’ => __(‘Codice Fiscale/P.Iva’, ‘woocommerce’),
    ‘placeholder’ => _x(‘Codice Fiscale o Partita Iva’, ‘placeholder’, ‘woocommerce’),
    ‘required’ => true,
    ‘class’ => array(‘form-row-wide’),
    ‘clear’ => true
    );

    return $fields;
    }

    #259934
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    You need to use a child theme, that’s what they are for. We included one in the ThemeForest Download files, make your changes to the child theme so that they are not ovwerwritten when you update

    – Kyle

    #259949
    giu_gugl
    Member
    Post count: 39

    Hi Kyle

    Thanks for the superfast answer!!

    I put the GA Tag in the tracking code filed into the theme options section as you suggested me! It looks working!

    About the customization of “billing section” in checkout page.
    I made my changes into the functions.php file within atelier directory (theme).
    Is That correct?
    If it’s not, can you please provide me more tips on how to make my changes through the child theme?

    Tnx

    #259973
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Upload the child theme provided and activate it, then go to Appearance > Editor, click on functions.php and add the code there

    – Kyle

    #262978
    giu_gugl
    Member
    Post count: 39

    Thanks Kyle!

    Your support is been really useful!
    gg

    #262979
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    No problem 🙂

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register