WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Redirect to checkout bypassing cart page (5 posts)

  1. jorgesim
    Member
    Posted 1 year ago #

    Hi.

    Is there a way, using a link or shortcode, to add a product to cart and jump straight to checkout page, bypassing the cart page?

    Thanks.

    http://wordpress.org/extend/plugins/woocommerce/

  2. ntsolutions
    Member
    Posted 1 year ago #

    @jorgesim have you found a solution yet? I'm also looking for the same thing.

  3. Pulkits
    Member
    Posted 1 year ago #

    Hi,

    Add this code in woocommerce-function.php to bypass the cart page :

    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;
    }

    Regards
    Pulkit

  4. J
    Member
    Posted 1 year ago #

    Pulkits, what if I want this to happen only in some case, not all?

  5. J
    Member
    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.