1
votes

Tell me pls how to skip checkout page Woocommerce?

A page where a person simply has to click the "place order" button, since the rest of the data is substituted itself. After clicking it is redirected to the payment gateway...

How do I skip this formality by clicking one button and redirect them straight to the payment gateway?

1
There is this answer I have used myself in the past. It redirects to the cart and removes the products from the user's cart so if they abandon it and come back there are no duplication of products in the cart. stackoverflow.com/questions/48502472/…jeh

1 Answers

1
votes

Payment gateways is part of the WooCommerce checkout page. Do you have any payment gateways set up? May be you are referring to skipping the cart page and going to the checkout. Here's a great tutorial to do that: https://www.webroomtech.com/woocommerce-skip-cart-and-go-to-checkout/

    add_filter('add_to_cart_redirect', 'webroom_redirect_add_to_cart');
function webroom_redirect_add_to_cart() {
    global $woocommerce;
    $cw_redirect_url_checkout = $woocommerce->cart->get_checkout_url();
    return $cw_redirect_url_checkout;
}

add the above code to functions.php file and save it. From now on every time a user clicks the add-to-cart button it will be redirected to the checkout page.