Skip to content

Commit

Permalink
Merge pull request #82 from p-maguire/master
Browse files Browse the repository at this point in the history
SP-894 Clear Cart after Invoice creation
  • Loading branch information
bobbrodie committed Mar 19, 2024
2 parents 8c876e3 + 8f7193f commit 2bcf0e4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions BitPayLib/class-bitpayinvoicecreate.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ public function execute(): void {

$bitpay_invoice = $this->client_factory->create()->createInvoice( $bitpay_invoice, Facade::POS, false );

WC()->cart->empty_cart();

$this->bitpay_logger->execute( $bitpay_invoice->toArray(), 'NEW BITPAY INVOICE', true );

$invoice_id = $bitpay_invoice->getId();
Expand Down

0 comments on commit 2bcf0e4

Please sign in to comment.