Skip to content

Instantly share code, notes, and snippets.

@orenshim
Created March 8, 2019 09:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save orenshim/d851ad72ae8d8fc3ac8211ba1d3e1fb3 to your computer and use it in GitHub Desktop.
Save orenshim/d851ad72ae8d8fc3ac8211ba1d3e1fb3 to your computer and use it in GitHub Desktop.
add_filter('add_to_cart_redirect', 'cw_redirect_add_to_cart');
function cw_redirect_add_to_cart() {
global $woocommerce;
$cw_redirect_url_checkout = $woocommerce->cart->get_checkout_url();
return $cw_redirect_url_checkout;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment