mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Merge pull request #3293 from woocommerce/PCP-4428-fastlane-gateway-visible-on-pay-for-order-page
Fastlane gateway visible on Pay for Order page (4428)
This commit is contained in:
commit
f5461a1eb2
2 changed files with 21 additions and 1 deletions
|
@ -347,6 +347,26 @@ class AxoModule implements ServiceModule, ExtendingModule, ExecutableModule {
|
|||
}
|
||||
);
|
||||
|
||||
// Remove Fastlane on the Pay for Order page.
|
||||
add_filter(
|
||||
'woocommerce_available_payment_gateways',
|
||||
/**
|
||||
* Param types removed to avoid third-party issues.
|
||||
*
|
||||
* @psalm-suppress MissingClosureParamType
|
||||
*/
|
||||
static function ( $methods ) {
|
||||
if ( ! is_array( $methods ) || ! is_wc_endpoint_url( 'order-pay' ) ) {
|
||||
return $methods;
|
||||
}
|
||||
|
||||
// Remove Fastlane if present.
|
||||
unset( $methods[ AxoGateway::ID ] );
|
||||
|
||||
return $methods;
|
||||
}
|
||||
);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue