Answers for "woocommerce redirect to checkout if user is cart"

0

woocommerce redirect to checkout after adding product

add_filter( 'woocommerce_add_to_cart_redirect', 'misha_skip_cart_redirect_checkout' );
 
function misha_skip_cart_redirect_checkout( $url ) {
    return wc_get_checkout_url();
}
Posted by: Guest on May-07-2020
0

wordpress add to cart redirect php

add_filter ('add_to_cart_redirect', 'redirect_to_checkout');

function redirect_to_checkout() {
    global $woocommerce;
    $checkout_url = $woocommerce->cart->get_checkout_url();
    return $checkout_url;
}
Posted by: Guest on March-14-2020

Code answers related to "woocommerce redirect to checkout if user is cart"

Browse Popular Code Answers by Language