V
V
Vladik Bubin2020-08-11 07:02:06
WooCommerce
Vladik Bubin, 2020-08-11 07:02:06

How to change files correctly so that they are not affected by the update?

Changed files in woocommerce>teamplate plugin folder. After the update, some of the files have changed - back to their original form. Can you please tell me how to properly customize woocommerce? Create your own templates and display data through hooks? Or just disable plugin update? What is another way?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
T
Tester2020, 2020-08-11
@ikoit

1. Write your plugins and use hooks to shove the desired output into untouched (by you) woocommerce templates.
2. If this does not help, copy, for example, "/wp-content/plugins/woocommerce/templates/content-product.php" to the folder
/wp-content/themes/your_active_theme/woocommerce/content-product.php and change him there.
"one." much better than
"2." worse because no one knows what will change in "/wp-content/plugins/woocommerce/templates/content-product.php" the next Woocommerce update. At least the line like "@version 3.6.0" will change.

A
Alex, 2020-08-11
@Kozack

Create your own templates and display data through hooks?

Exactly.
Or just disable plugin update?

In no case.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question