Advertisement
lorro

WooCommerce - Bypass cart page

Mar 18th, 2016
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.23 KB | None | 0 0
  1. <?php
  2.   // bypass the cart page
  3.   // code goes in functions.php for your child theme
  4.   add_filter ( 'add_to_cart_redirect', 'wc_redirect_to_checkout' );
  5.   function wc_redirect_to_checkout() {
  6.     return WC()->cart->get_checkout_url();
  7.  }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement