Skip to content

Instantly share code, notes, and snippets.

@fbmoises
Created November 23, 2017 12:17
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 fbmoises/ce78e182c318e2988c9a44a3afdd4bb9 to your computer and use it in GitHub Desktop.
Save fbmoises/ce78e182c318e2988c9a44a3afdd4bb9 to your computer and use it in GitHub Desktop.
Redirigir al checkout al añadir un producto al carrito
// Redirigir al checkout al añadir un producto al carrito
add_filter ('woocommerce_add_to_cart_redirect', 'redirect_to_checkout');
function 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