Redirect to cart instead of checkout

/Redirect to cart instead of checkout

Redirect to cart instead of checkout

Please add these below codes into your theme functions.php file and save

remove_filter (‘woocommerce_add_to_cart_redirect’, ‘mep_event_redirect_to_checkout’);
add_filter (‘woocommerce_add_to_cart_redirect’, ‘mep_event_redirect_to_cart’);
function mep_event_redirect_to_cart() {
global $woocommerce;
$checkout_url = $woocommerce->cart->get_cart_url();
return $checkout_url;
}


« Back to the Knowledgebase
By |2018-12-13T04:44:48+00:00December 13th, 2018|Comments Off on Redirect to cart instead of checkout

About the Author: