WooCommerce how to checkout a product without adding it to the cart

admin2025-06-05  3

I am trying to implement this in my website:

Having a second button on a single product next to the"Add to cart" button, let that button be "Buy now".

When the add to cart button is clicked, the product will be added to the cart, when the Buy now button is clicked the client will be redirected to the checkout page where he will only checkout that single product, and that product will not be added to the cart.

For example, if the client was having products A and B in the cart, and clicks the Buy now o product C, he will only checkout for that product, and C will never be added to the cart.

I was thinking of a way to implement this, and I thought that having two different checkout pages might help,.. I don't know if it can, if you have a solution on how I can do this, I'd love to hear from you.

Thanks

I am trying to implement this in my website:

Having a second button on a single product next to the"Add to cart" button, let that button be "Buy now".

When the add to cart button is clicked, the product will be added to the cart, when the Buy now button is clicked the client will be redirected to the checkout page where he will only checkout that single product, and that product will not be added to the cart.

For example, if the client was having products A and B in the cart, and clicks the Buy now o product C, he will only checkout for that product, and C will never be added to the cart.

I was thinking of a way to implement this, and I thought that having two different checkout pages might help,.. I don't know if it can, if you have a solution on how I can do this, I'd love to hear from you.

Thanks

Share Improve this question edited Dec 18, 2018 at 3:48 fuxia 107k39 gold badges255 silver badges461 bronze badges asked Dec 18, 2018 at 0:18 Real MoiseReal Moise 14 bronze badges 18
  • You could use the YITH One Click Checkout: wordpress/plugins/yith-woocommerce-one-click-checkout – Nathaniel Flick Commented Dec 18, 2018 at 0:23
  • That one works only on the logged in users, is it possible to configure it so that non logged in users can access it too?? – Real Moise Commented Dec 18, 2018 at 0:26
  • You could if you wrote one that used LocalStorage instead of a user account, but then the user doesn't really benefit from that (has to enter her information anyway) – Nathaniel Flick Commented Dec 18, 2018 at 0:26
  • Just reauested by my client, and i failed to do this. Just want to make it work even on the non logged in users – Real Moise Commented Dec 18, 2018 at 0:29
  • Hi Nathan, do you have any other suggestions?? – Real Moise Commented Dec 18, 2018 at 0:33
 |  Show 13 more comments

1 Answer 1

Reset to default 2

You could code your own, and connect to a payment gateway's API, but plenty have tread this road before you so stand on their shoulders. Two possibilities:

Stripe One Click Checkout plugin by WooCommerce

PayPal One Click Checkout plugin by StoreApps

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1749089005a316269.html

最新回复(0)