coinbase / coinbase-commerce-woocommerce

Accept Bitcoin on your WooCommerce-powered website.
https://commerce.coinbase.com/integrate/woocommerce
Apache License 2.0
57 stars 40 forks source link

Plugin will expire orders that are processing #14

Closed pascalroget closed 5 years ago

pascalroget commented 5 years ago

How to reproduce:

-> Attempt to pay via Coinbase -> Go back and pay via another payment method -> Order transitions to "Processing" -> After the given delay, plugin will expire the order and set it to "Cancelled" -> Customer will not receive goods/services that were paid for

pascalroget commented 5 years ago

One proposed way of fixing the issue:

https://github.com/coinbase/coinbase-commerce-woocommerce/pull/15

justinpobrien commented 5 years ago

Apologies for delay here. We've merged the PR and tested that the fix works as intended. Thanks for your help!

Daviid-P commented 3 years ago

This should be done by checking the payment gateway.

$gateway = wc_get_payment_gateway_by_order($order);
if ($gateway && $gateway - > method_title != 'Coinbase') {
    continue;
}