mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
Merge pull request #2340 from woocommerce/PCP-3256-remove-fastlane-from-pay-for-order-endpoint
AXO: Disable Fastlane for Order Pay endpoint (3256)
This commit is contained in:
commit
d42dc94caa
1 changed files with 16 additions and 1 deletions
|
@ -74,6 +74,10 @@ class AxoModule implements ModuleInterface {
|
|||
return $methods;
|
||||
}
|
||||
|
||||
if ( $this->is_excluded_endpoint() ) {
|
||||
return $methods;
|
||||
}
|
||||
|
||||
$methods[] = $gateway;
|
||||
return $methods;
|
||||
},
|
||||
|
@ -328,7 +332,8 @@ class AxoModule implements ModuleInterface {
|
|||
|
||||
return ! is_user_logged_in()
|
||||
&& CartCheckoutDetector::has_classic_checkout()
|
||||
&& $is_axo_enabled;
|
||||
&& $is_axo_enabled
|
||||
&& ! $this->is_excluded_endpoint();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -373,4 +378,14 @@ class AxoModule implements ModuleInterface {
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Condition to evaluate if the current endpoint is excluded.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function is_excluded_endpoint(): bool {
|
||||
// Exclude the Order Pay endpoint.
|
||||
return is_wc_endpoint_url( 'order-pay' );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue