Guest User

Untitled

a guest
Feb 17th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. function my_custom_add_to_cart_redirect( $url ) {
  2. $url = wc_get_checkout_url();
  3. return $url;
  4. }
  5.  
  6. add_filter( 'woocommerce_add_to_cart_redirect','my_custom_add_to_cart_redirect');
  7.  
  8. function my_custom_add_to_cart_redirect( $url ) {
  9.  
  10. if ( is_product() ){
  11. $url = wc_get_checkout_url();
  12. return $url;
  13. }
  14. }
  15.  
  16. add_filter( 'woocommerce_add_to_cart_redirect', 'my_custom_add_to_cart_redirect' );
Add Comment
Please, Sign In to add comment