WordPress.org

Support

Support » Plugins and Hacks » How to Skip Checkout Page?

How to Skip Checkout Page?

  • I’ve got a product category that includes only free products and they are all displaying in a loop. I need to make it so that when a user clicks the “Add to Cart” button, it purchases the product and redirects them straight to the My Account page.

    If that’s too difficult, I’m willing to settle on a solution that will automatically activate the submit button on the checkout page if someone can help me achieve that. I’ve tried this javascript code which has worked for me on ordinary forms so I know it does what it’s supposed to do:

    function addtocart () {
    var form = document.getElementsByClassName("checkout")[0];
    form.submit();
    }
    window.onload = addtocart;

    It seems to activate an endless loop of redirecting to the checkout page, rather than purchasing the free product. I’m almost there, but I could really use some help!

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

Viewing 1 replies (of 1 total)
  • To put it simple, here’s the default Woocommerce progression:

    Shop Loop -> Cart -> Checkout -> Order Confirmation -> Account Page

    Here’s what I currently have:

    Shop Loop -> Checkout -> Account Page

    I would prefer this:

    Shop Loop -> Account Page

    But am willing to accept this if I can find a way to automatically submit the checkout form when that page loads so the user doesn’t have to click anything:

    Shop Loop -> Checkout -> Account Page

Viewing 1 replies (of 1 total)
  • The topic ‘How to Skip Checkout Page?’ is closed to new replies.