[Resolved] Woocommerce templates vs update

Home Forums Support Woocommerce templates vs update

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #116330
    Adrian Cojocariu

    Hey man, I want to edit some of the Woocommerce templates and they will overwrite when I update Woocommerce, so they recommend putting them into the theme-folder/woocommerce …

    The thing is … will the theme update then overwrite the new folder ? I mean… wipe it out completely ?

    Should I use a child theme for Generatepress too ? Sounds a bit complicated to me ^_^

    #116387
    Tom
    Lead Developer
    Lead Developer

    If you want to make changes to any core file, using a child theme is the way to go.

    Simply copy the woocommerce.php file from the generatepress folder, and paste it into your child theme folder. Then you can make changes to that file without worrying about your changes being removed when you update 🙂

    You can download a blank child theme for GP here: http://generatepress.com/api/themes/generatepress_child.zip

    #116402
    Adrian Cojocariu

    All my CSS is in Simple Custom CSS

    If I install a child theme now, over the customized Generatepress, will it keep all the Customizer settings and CSS ? Or will it be blanked ?

    #116403
    Tom
    Lead Developer
    Lead Developer

    It will keep all of your custom CSS and settings.

    The only thing you may need to do is re-set your theme location for the menu in “Appearance > Menus”.

    #116404
    Adrian Cojocariu

    Gr8 stuff man, thanks !

    #116406
    Tom
    Lead Developer
    Lead Developer
    #977949
    Linda

    Hi Tom or other Supporter,

    I noticed this thread is 4 years old so wanted to ensure its advice is still current.

    Before reading this, I made changes directly into a WooCommerce email template php file. The changes worked so I felt really proud of my non-technical self … until I read this!

    4 questions:
    1. Should I undo the changes I made there yesterday?
    2. Do I set up a child theme before changing such files? It sounds like I do.
    3. WooCommerce has this message at the bottom of all email edit pages:
    “To override and edit this email template copy woocommerce/templates/emails/admin-new-order.php to your theme folder: generatepress/woocommerce/emails/admin-new-order.php.”
    Should I be doing this? Do these need to be copied into a child theme?
    4. Should this same process be done for any WooCommerce PHP text I’d like to edit?

    It looks as if I got ahead of myself. Don’t want to mess things up by doing any further editing until I know how to do it correctly!

    Thanks for your advice,

    Linda

    #978028
    David
    Staff
    Customer Support

    Hi there,

    topic is still relevant.

    1. Yes
    2. Yes – this doc for setting up child theme:
    https://docs.generatepress.com/article/using-child-theme/
    3. Correct except generatepress-child will be the root theme folder e.g
    generatepress-child/woocommerce/emails/admin-new-order.php.
    4. and Yes 🙂

    #978186
    Linda

    Hi David,

    As always, I’m super impressed (and grateful) for your super fast response! 🙂

    You’ve answered all my questions and now I know what to do. Looks as if this will not be a “quick fix”. Think I’ll hold off on doing anything except undoing my yesterday changes until I can set aside a big chunk of time.

    Appreciate your advice. Am heading off to undo my php changes in WooCommerce.

    Thanks again,

    Linda

    #978188
    David
    Staff
    Customer Support
Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.