You want to override the file, not edit it directly.
How to Edit Files
Edit files in an upgrade-safe way using overrides. Copy the template into a directory within your theme named /woocommerce keeping the same file structure but removing the /templates/ subdirectory.
Example:
To override the cart.php file…
copy:
wp-content/plugins/woocommerce/templates/cart/cart.php
to wp-content/themes/yourtheme/woocommerce/cart/cart.php
The copied file will now override the WooCommerce default template file. Make your updates in the new file.
Here is more detailed information.
Related Posts:
- Creating custom Woocommerce attribute taxonomies from a plugin
- Display a selected custom product option in WooCommerce cart
- Add attribute / custom attribute to product in woocommerce
- Trying to build simple deposit code that hooks into woocommerce
- How to get private property in parent class into extended class?
- After disabling WPML multi currency, the currency is still handled by the WPML
- How do i wrap woocomerce attribute in list?
- How do I know if the user is a customer?
- I want to fusion the product columns in email table order
- Add a new view on the Woocommerce account page
- How can I update the price when someone enters postcode or zip code in woocommerce checkout page?
- Adding new divs with custom classes to products on WooCommerce shop page [closed]
- Woocommerce linking variations
- Receiving Stripe Webhooks on a wordpress website
- What would be a PHP command to erase all posts from category X from the last month?
- Walker class: Problems with understanding how walk() method can be called without error
- Change comments form title on a page by page basis
- Setting up the child theme so as to enable right-to-left WordPress?
- Replace existing content from specific WooCommerce admin orders list column
- Type hinting and void return question
- Customized title tag for each page in pagination?
- Woocommerce filter cart and category specific quantity [closed]
- How to break down importing of feeds
- How to get woocommerce cart content without an action?
- WooCommerce: Add Payment Gateway Field to Webhooks [closed]
- How to create and work with custom data / tables (i.e., for arbitrary data)?
- Woocommerce product download URL
- Multiple choice in a custom taxonomy
- Limiting woocommerce line_total decimal length
- How can I use wp_query to show all product data using just the products ID?
- Get stock by custom meta field on all Woocommerce variable products
- Set a condition based on WooCommerce checkout city field while placing order
- Call global variable array() in woocommerce child/template
- Remove price from Woocommerce variable product dropdown menu
- WP dynamic featured image – Can’t get second featured image url
- How to hide products that do not have an image from a slider carousel for an ecommerce webpage?
- Get and insert order email address to the PHP template inside HTML text
- If no products are on sale – hide ID or class
- Send an email to specific adress when button is clicked?
- How can I pass a custom/dynamic product to the Woocommerce cart?
- How to get the value of input hidden html from text editor to custom page template?
- how to show only specific category for a template
- Replace Woocommerce “add to cart” to be “Download” button [closed]
- Woocommerce Email attachments not working – file not being attached
- Clickable image link sends people to wrong URL
- WooCommerce pages looks unstyled
- How to include custom PHP file both in header and footer files
- How to display a custom product field value of a specific category on a Woo Commerce checkout page?
- Personalize checkout text
- Disable if there are no children – Woocommerce
- get_theme_mod outputs number when using WP_Customize_Cropped_Image_Control
- Reusable code that I can store in the function.php and apply to other templates as need. Dry Code
- Custom Taxonomy Select Menu: Setting default option value?
- Assign Custom classes to every Excerpt
- Make next post button link to random post
- Site DOES NOT LOAD after 3.1 update
- Woocommerce Custom Meta Boxes- How to only display if they actually have content
- Display Sibling WooCommerce Product Categories on Archive Page
- Customizer control save then return to default
- How to sort WooCommerce products page by latest in-stock items first?
- Generate images with html2canvas and the woocommerce api
- How to update ticket price programatically when adding to cart and checkout in woocommerce
- Woocommerce My acount page
- Get WooCommerce products with similar SKU
- Use CSS tag inside PHP code
- Set ACF on order during checkout
- update_user_meta as multiple value but with same meta key
- Hide payment method based on user role AND minimum cart value
- How can I show how much water got saved on this order (making use of the number of items bought) on a thank-you-page?
- IF statement not working – Any suggestions?
- Delete post meta by serialized meta value
- WooCommerce function not working correctly after moving from the functions.php into a class
- Filter for product subcategory listing page load
- Reduce Stock Based on Custom Variation Field Rather than Attribute (Working Script)
- Get x numbers of a woocommerce category products using Wp_Query
- Get field value and use as variable in php
- Set notification if is two product category in cart
- Dynamic Banner Text based on Subdomain
- AJAX to add to cart multiple products woocommerce
- Redirecting the lost password page request when using a custon login page
- Create custom admin page with custom text fields
- WooCommerce – Add Shipping class below each product in Shopping Cart page
- WooCommerce Custom Tab with ACF Repeater Field
- Multisite – Display different header content based on which site is accessed
- How can I customize a WordPress theme before it’s downloaded?
- Display product attributes for current product
- How to remove image on single product and get product to span page?
- PHP call div with function
- WordPress causing all code to be displayed on line 1. Receiving multiple errors after cleaning cookies and cache
- Adding placeholder text field to woocommerce checkout [closed]
- HTML in PHP problem [closed]
- Getting custom field data from cart page to checkout page in woocomerce [closed]
- Send a custom notification to customer on WooCommerce cancelled order status
- How to code bulk order form in wordpress
- Show button in header when product custom field is not empty
- WordPress 6.1.1 UTF8 Slug Limit Increase
- Woocommerce Convert existing order to the cart
- How to change shipping method title based on cart amount?
- Product Search in search.php
- using custom pages for myaccount in woocommerce