Need a unique gift idea?
A Pastebin account makes a great Christmas gift

WooCommerce - Bypass cart page

lorro Mar 18th, 2016 69 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  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.  }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand