mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Fix conflicts
This commit is contained in:
commit
5de360c869
3 changed files with 12 additions and 9 deletions
|
@ -171,9 +171,9 @@ class OrderProcessor {
|
|||
$this->add_paypal_meta( $wc_order, $order, $this->environment );
|
||||
|
||||
$error_message = null;
|
||||
if ( $this->order_helper->contains_physical_goods( $order ) && ! $this->order_is_approved( $order ) ) {
|
||||
if ( $this->order_helper->contains_physical_goods( $order ) && ! $this->order_is_ready_for_process( $order ) ) {
|
||||
$error_message = __(
|
||||
'The payment has not been approved yet.',
|
||||
'The payment is not ready for processing yet.',
|
||||
'woocommerce-paypal-payments'
|
||||
);
|
||||
}
|
||||
|
@ -280,15 +280,15 @@ class OrderProcessor {
|
|||
}
|
||||
|
||||
/**
|
||||
* Whether a given order is approved.
|
||||
* Whether a given order is ready for processing.
|
||||
*
|
||||
* @param Order $order The order.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function order_is_approved( Order $order ): bool {
|
||||
private function order_is_ready_for_process( Order $order ): bool {
|
||||
|
||||
if ( $order->status()->is( OrderStatus::APPROVED ) ) {
|
||||
if ( $order->status()->is( OrderStatus::APPROVED ) || $order->status()->is( OrderStatus::CREATED ) ) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -296,7 +296,7 @@ class OrderProcessor {
|
|||
return false;
|
||||
}
|
||||
|
||||
$is_approved = in_array(
|
||||
return in_array(
|
||||
$this->threed_secure->proceed_with_order( $order ),
|
||||
array(
|
||||
ThreeDSecure::NO_DECISION,
|
||||
|
@ -304,6 +304,5 @@ class OrderProcessor {
|
|||
),
|
||||
true
|
||||
);
|
||||
return $is_approved;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue