We often get asked by beginners where do WooCommerce hooks go? The answer is, in your child theme’s functions.php file.
If you don’t have a child theme, you can create one following the instructions in our article How to Create a Child Theme for WooCommerce.
Once you have a child theme set up, open your child theme’s functions.php file and paste the following code:
<?php
add_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
add_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);
remove_action( 'woocommerce_after_main_content', 'woocommerce_output-wrapper-end', 10);
?>
This will remove all default styling from WooCommerce so that you can style it yourself.
PRO TIP: The following note is a warning for those considering the article, "Where Do WooCommerce Hooks Go?":
This article contains outdated information about WooCommerce hooks. Hooks have been moved to different locations in newer versions of WooCommerce, so following the advice in this article could result in errors on your site.
If you want to keep some of the default styling and just make small changes, you can Target specific WooCommerce elements using CSS.
Where Do WooCommerce Hooks Go?
WooCommerce hooks go in your child theme's functions.
This will remove all default styling from WooCommerce so that you can style it yourself.
6 Related Question Answers Found
If you’re running an online store, chances are you’re using WooCommerce. When it comes to payments, WooCommerce gives you a few options. In this article, we’ll go over where your WooCommerce payments go and how you can manage them.
WooCommerce is a powerful eCommerce plugin for WordPress. It is used by millions of online stores around the world, and has a wide range of features to offer its users. One of the most powerful features of WooCommerce is its use of hooks.
WooCommerce is a plugin for WordPress that enables you to turn your WordPress site into an eCommerce store. WooCommerce is a free plugin, but there are premium plugins available from WooCommerce.com that add features to your store. WooCommerce plugins are available from a number of sources.
WooCommerce is a WordPress plugin that is used by millions of online stores worldwide. Originally developed by WordPress co-founder WooThemes, WooCommerce was acquired by Automattic, the company behind WordPress.com, in 2015. WooCommerce is a free and open source software released under the GNU General Public License (GPL).
As the world’s most popular eCommerce platform, WooCommerce gives you a lot of control over your store’s invoicing. By default, WooCommerce generates PDF invoices and stores them on your server. You can then download these PDFs or have them emailed to you.
WooCommerce is a powerful, open-source eCommerce plugin for WordPress. It is used by a number of large sites like Forbes, TechCrunch, and The New York Times. WooCommerce is a great choice for those who want to build their own online store with WordPress.