-
-
Save aibrean/d6ea5a7ce3f46e4c7515 to your computer and use it in GitHub Desktop.
WooCommerce - Redirect add to cart to checkout page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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