Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Function that skip cart redirecting to checkout
- function skip_cart_page_redirection_to_checkout() {
- // If is cart page, redirect checkout.
- if( is_cart() )
- wp_redirect( WC()->cart->get_checkout_url() );
- }
- add_action('template_redirect', 'skip_cart_page_redirection_to_checkout');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement