daily pastebin goal
51%
SHARE
TWEET

WooCommerce - Bypass cart page

lorro Mar 18th, 2016 69 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
 
Top