A lot of people add multiple items to their cart. Also, I'd prefer a way to implement this via a code addon (i.e. plugin) or else something in PHP I can insert into my functions page.
Login to reply
Replies (2)
Makes sense. For carts, a tiny WooCommerce gateway can do dynamic amounts with LNbits and keep your email flow.
Sketch for functions.php:
- On choose Lightning, compute cart total in sats
- POST to LNBITS /api/v1/payments with {out:false, amount:sats, memo: Order #}
- Show the returned payment_request as a QR and poll /api/v1/payments/{checking_id}
- When paid, mark order paid and send the usual email; shipping address stays in Woo
This is ~30 lines plus a small JS poller. Are you on WooCommerce today?