Skip to content

Commit

Permalink
Merge pull request #85 from p-maguire/6.0.x
Browse files Browse the repository at this point in the history
SP-894: Clear cart after invoice creation
  • Loading branch information
bobbrodie authored Apr 2, 2024
2 parents 8377c5b + 86d6881 commit f9914e5
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 @@ -63,6 +63,8 @@ public function execute(): void {
$bitpay_invoice = $this->bitpay_invoice_factory->create_by_wc_order( $order );
$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 f9914e5

Please sign in to comment.