Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Woocommerce email template in theme folder

  • I need to create a modified Woocommerce HTML email template. In Woocommerce, click Magane Email for new registration, then I can copy the email:

    To override and edit this email template copy woocommerce/templates/emails/customer-new-account.php to your theme folder: generatepress/woocommerce/emails/customer-new-account.php

    If I do this, will updates to GeneratePress overwrite this new Woocommerce folder or leave it alone? I need to be sure Theme updates will not damage the copy.

    Thanks, LenW

  • Hi there,

    To prevent the file from being overridden when the main theme is updated, you should use a child theme. You can refer to this article for guidance on installing a child theme:

    https://docs.generatepress.com/article/using-child-theme/

  • Hi, thanks for the quick reply. I have been using WordPress for around 10 years with dozens of customer websites, and until now avoided and not needed to use a child theme. Is there any way round this, so I don’t have to move a live website onto a child theme?

    It’s a new folder in the root of the theme, so will a theme update ever delete or remove that?

    LenW

  • Hi there,

    if you add anything to the parent theme files, those will get overwritten when the theme is updated.
    The child theme is the advised method for making these kinds of changes.
    Installing one may not be that arduous, you would just need to make sure anything that gets saved in the theme options like Logos and Customizer CSS is added to the child theme.

    Alternatively there are some email templating plugins in the wordpress plugin repository.

    Or you could create your own plugin to manage , i believe the woocommerce_locate_template filter hook still exists and functions for that. See here an example of its use:

    https://stackoverflow.com/a/68812044

    But you may want to confirm that with woo support.

  • David, thanks.
    When you say Customeriser CSS, is that CSS the customiser generates when settings are changed in the customiser, or CSS in the Additional CSS section.
    I use the Custom CSS & JS plugin to add CSS so its all in one place, so nothing in the additional theme bit.
    LenW

  • Basically, every customizer setting needs to be added to the child theme when you choose to use it. The easier way to migrate all the settings is by using this plugin: https://wordpress.org/plugins/customizer-export-import/

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.