• Hi

    Whats the way when i want to change some woocommerce or wordpress files, or plugin files, but after refresh the plugin i lost the changes? Can you help me how can i change things outside the file, so ehen i refresh a plugin my “hack” still working.

    Thanks

    Ndrew

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi ndrewebdev,

    Sounds like what you need is a child theme. With a child theme, you can override both original, parent theme and plugin code without theme and plugin updates wiping out your changes.

    You can find an overview of child theme development here: https://codex.www.ads-software.com/Child_Themes

    Note also that you’ll need to keep the parent theme installed so your child theme will work, since you’re overriding only selected bits of code. The codex is pretty straightforward, but if you have any problems or questions, let me know and I’ll try to walk you through it.

    Moderator bcworkz

    (@bcworkz)

    I second the use of a child theme. I just wanted to add that you can also override WooCommerce templates in a child theme by placing altered templates in a specific child theme sub-folder structure. More details at the WC site:
    https://docs.woocommerce.com/document/template-structure/

    As noted on that page, you are much better off using the action and filter hooks provided instead of altering templates. But sometimes there is no better solution other than overriding templates.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change wordpress files without change’ is closed to new replies.