Change the WooCommerce Return to Shop Link

PHOTO EMBED

Sat Apr 16 2022 08:08:44 GMT+0000 (Coordinated Universal Time)

Saved by @netropol #php

//Change the Return to Shop url to the homepage
add_filter( 'woocommerce_return_to_shop_redirect', 'snippetpress_change_shop_return_url_home' ); 
 
function snippetpress_change_shop_return_url_home() {
    return home_url();
}

//Change the Return to Shop url to a specific page
add_filter( 'woocommerce_return_to_shop_redirect', 'snippetpress_change_shop_return_url' ); 
 
function snippetpress_change_shop_return_url() {
    return '/example.com/custom-page';
}
content_copyCOPY

https://snippetpress.com/change-the-woocommerce-return-to-shop-link/