If you are using a custom theme with WooCommerce, make sure to declare WooCommerce support using the add_theme_support
function. This will enable WooCommerce template overrides and ensure that your theme is compatible with WooCommerce. If you don’t declare WooCommerce support, your shop may be displayed using shortcode-based unsupported theme rendering.
Declaring WooCommerce support is straightforward and involves adding one function in your theme’s functions.php file.
function mytheme_add_woocommerce_support() {
add_theme_support( 'woocommerce' );
}
add_action( 'after_setup_theme', 'mytheme_add_woocommerce_support' );
Another way of adding this code without editing your theme file is by using a WordPress plugin, WPCode. Just create and activate a code snippet in your WordPress admin panel to add this functionality.
Read more about adding theme support to your WordPress theme: https://woocommerce.com/document/woocommerce-theme-developer-handbook/#section-5