This is for anyone who makes custom shop pages for WooCommerce websites.
There is a ‘Return To Shop’ button the Cart and Checkout pages when are no products in your cart.
Instead of using display:none; try using this function instead! You can link to whatever page you’d like.
/* -- Changes the redirect URL for the Return To Shop button in the cart. -- */
function wc_empty_cart_redirect_url() {
return 'https://yourdomain.com/your-page/';
}
add_filter( 'woocommerce_return_to_shop_redirect', 'wc_empty_cart_redirect_url' );
For more information on how to do this, explore this article: Change The “Return to Shop” Button URL in the Cart Page.
Jon Fullerhttps://freshysites.com/team/#Jon-FullerJon is from the Binghamton, NY area and graduated from the School of Art and Design at Alfred University with a Bachelor of Fine Arts. Concentrated studies were in Graphic Design and Video. Jon has an appreciation of all aspects of art and design, and has an extensive background in both print media and web — with a thorough understanding of video and photography. Jon comes to FreshySites with 9 years of graphic design and web experience. He continues to make a habit of researching new tools and technologies to broaden his knowledge in the web development industry. He’s a tech junkie who has a passion for implementing new techniques and improving his surroundings. Outside of work, Jon also enjoys going on new adventures with his wife, exercising, and sipping on quality craft beer.