-
-
Save INDIAN2020/54a23f1ab81a7771a632e99554c38c43 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('add_to_cart_redirect', 'yanco_add_to_cart_redirect'); | |
| function yanco_add_to_cart_redirect() { | |
| 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