mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
check if payments are available in purchase unit
This commit is contained in:
parent
8d1ed9ab24
commit
f7dde306fa
1 changed files with 5 additions and 1 deletions
|
@ -73,7 +73,11 @@ class RefundProcessor {
|
|||
return false;
|
||||
}
|
||||
|
||||
$captures = $purchase_units[0]->payments()->captures();
|
||||
$payments = $purchase_units[0]->payments();
|
||||
if ( ! $payments ) {
|
||||
return false;
|
||||
}
|
||||
$captures = $payments->captures();
|
||||
if ( ! $captures ) {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue