Skip to content

Instantly share code, notes, and snippets.

@aibrean
Forked from corsonr/gist:6725310
Created October 6, 2015 15:40
Show Gist options
  • Save aibrean/d6ea5a7ce3f46e4c7515 to your computer and use it in GitHub Desktop.
Save aibrean/d6ea5a7ce3f46e4c7515 to your computer and use it in GitHub Desktop.
WooCommerce - Redirect add to cart to checkout page
<?php
add_filter ('woocommerce_add_to_cart_redirect', 'woo_redirect_to_checkout');
function woo_redirect_to_checkout() {
$checkout_url = WC()->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