Site logo

[Support request] rewrite php code.

Home Forums Support [Support request] rewrite php code.

Home Forums Support rewrite php code.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2538243
    Jusung

    Hello. I just have a question.

    I have changed the whole code on a woocommerce file.

    my-account.php
    On this file, there were default codes.
    But I changed the whole codes.

    Is there a way to replace the default codes to my customized code without changing codes on the files?
    because when it is updated, my code will be gone.
    So, I wanna do in different way, (not changing codes on the file)

    I also don’t use child them.

    #2538548
    David
    Staff
    Customer Support

    Hi there,

    you need to use a Child Theme.

    In each of the Woo template files, it will tell you how to make changes.
    For example the my-address.php template:

    https://github.com/woocommerce/woocommerce/blob/trunk/plugins/woocommerce/templates/myaccount/my-address.php

    It tells you in the top comments where to make a copy in your child theme:

    * This template can be overridden by copying it to yourtheme/woocommerce/myaccount/my-address.php.

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