Redirect WooCommerce Shop URL to HomePage

If your not using the “shop” page in your WooCommerce store, add the following your theme’s child function.php file. This code will redirect when you should land on the “shop” page back to the “Home Page” (root). This will change the link on the “Continue Shopping” button.

// REDIRECT SHOP URL TO HOMEPAGE
add_filter( 'woocommerce_return_to_shop_redirect', "custom_woocommerce_return_to_shop_redirect" ,20 ); 
function custom_woocommerce_return_to_shop_redirect(){
    return home_url('/');
}