'Woocommerce Subscriptions - Move file to theme folder
Is it possible to move a copy of a file from the plugin to the theme folder?
I know this can be done with templates, but the file I wish to move and edit is located at woocommerce-subscriptions/includes/class-wc-subscriptions-product.php
I've tried moving it to the woocommerce folder in my theme, as well as a 'includes' folder in my theme.
Can this be done?
Solution 1:[1]
No, you cannot override php classes like that, this can only be achieved through filters and action hooks.
You can move plugin code to your theme by integrating the whole plugin into your theme but this is highly unadvised due to the code not getting any updates and a variety of security and maintainability issues in the future.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Josh Bonnick |
