-
-
Save doozy/7e55841dcdc02b6b7961aaee32d98559 to your computer and use it in GitHub Desktop.
[wishlist] Modify back to shop url only for wishlist page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Modify back to shop URL only for the wishlist page. | |
add_action( 'tinvwl_wishlist_is_null', 'tinvwl_apply_back_to_shop_url' ); | |
add_action( 'tinvwl_before_wishlist', 'tinvwl_apply_back_to_shop_url', 9, 1 ); | |
// Apply filters for the wishlist page only. | |
function tinvwl_apply_back_to_shop_url() { | |
add_filter( 'woocommerce_return_to_shop_redirect', 'tinvwl_back_to_shop_url' ); | |
} | |
// Customize the back to shop URL. | |
function tinvwl_back_to_shop_url( $url ) { | |
return 'https://google.com'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey there! is this currently updated? I tired using your code, unfortunately is still returns me to the shop page. I have no what's going on. I replaced 'https://google.com/ with my home page link. - save changes and refreshed still took me the shop page.
Any ideas/theories
Thanks for your kind responds, appreciate your time and contribution.