Last active
July 3, 2019 07:04
-
-
Save yanknudtskov/f06a5c1758cd93e4c3a16759a5a3f757 to your computer and use it in GitHub Desktop.
Skip the cart and go directly to checkout #woocommerce #cart
This file contains hidden or 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 | |
| /** | |
| * Direct Checkout on Add-to-cart | |
| */ | |
| add_filter('woocommerce_add_to_cart_redirect', 'yanco_woocommerce_add_to_cart_redirect'); | |
| function yanco_woocommerce_add_to_cart_redirect() { | |
| $checkout_url = wc_get_checkout_url(); | |
| return $checkout_url; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment