Archived topic
rewrite php code.
1 reply · Started by Jusung on February 18, 2023
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.
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:
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.