Skip to content

Instantly share code, notes, and snippets.

@jrick1229
Last active September 5, 2020 16:51
Show Gist options
  • Save jrick1229/0df43aa406b9d1797ec9135682a75624 to your computer and use it in GitHub Desktop.
Save jrick1229/0df43aa406b9d1797ec9135682a75624 to your computer and use it in GitHub Desktop.
Custom add to cart redirect
<?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