Skip to content

Instantly share code, notes, and snippets.

@sethrubenstein
Forked from corsonr/gist:6725310
Created March 11, 2014 14:37
Show Gist options
  • Save sethrubenstein/9487091 to your computer and use it in GitHub Desktop.
Save sethrubenstein/9487091 to your computer and use it in GitHub Desktop.
Redirect product add to cart to checkout
add_filter ('add_to_cart_redirect', 'woo_redirect_to_checkout');
function woo_redirect_to_checkout() {
global $woocommerce;
$checkout_url = $woocommerce->cart->get_checkout_url();
return $checkout_url;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment