Override woocommerce files from includes folder

woocommerce, wordpress

Solution

I was having this same issue. I don't have a need for reviews on my site, so I copied what I wanted to remove from a file inside of the `includes` folder and copied it into my `functions.php` file like so:

// Remove reviews from WooCommerce

if (! function_exists( 'woocommerce_default_product_tabs')) {
    function woocommerce_default_product_tabs($tabs = array()) {
    }
}

Works for me!

Problem

I have directly modified the `class-wc-checkout.php` file from `includes` folder in woocommerce plugin to add custom `line item meta` data. Is there any way to `override` the class-wc-checkout.php file from my-theme folder as we override template files in woocommerce?

Original source