Skip to content

Instantly share code, notes, and snippets.

@brandalismo
Created March 21, 2017 20:29
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 brandalismo/f11d878d41efa34f7d6e2507ec2e3a59 to your computer and use it in GitHub Desktop.
Save brandalismo/f11d878d41efa34f7d6e2507ec2e3a59 to your computer and use it in GitHub Desktop.
/*
* REDIRIGIR A FINALIZAR COMPRA TRAS AÑADIR PRODUCTO
*/
function woo_redirect_to_checkout() {
global $woocommerce;
$checkout_url = $woocommerce->cart->get_checkout_url();
return $checkout_url;
}
add_filter ('add_to_cart_redirect', 'woo_redirect_to_checkout');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment