Last active
September 5, 2020 16:51
-
-
Save jrick1229/0df43aa406b9d1797ec9135682a75624 to your computer and use it in GitHub Desktop.
Custom add to cart redirect
This file contains hidden or 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
<?php | |
function custom_a2c( $url ) { | |
$url = get_permalink( 121 ); // URL to redirect to (121 is the page ID here) | |
return $url; | |
} | |
add_filter( 'woocommerce_add_to_cart_redirect', 'custom_a2c' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment