diff --git a/includes/class-wc-payments-onboarding-service.php b/includes/class-wc-payments-onboarding-service.php index 74955940560..5e7801b0d90 100644 --- a/includes/class-wc-payments-onboarding-service.php +++ b/includes/class-wc-payments-onboarding-service.php @@ -1048,6 +1048,7 @@ public function update_enabled_payment_methods_ids( $gateway, $capabilities = [] ) ); + // Update the gateway option. $gateway->update_option( 'upe_enabled_payment_method_ids', $enabled_payment_methods ); foreach ( $enabled_payment_methods as $payment_method_id ) { @@ -1073,10 +1074,13 @@ public function update_enabled_payment_methods_ids( $gateway, $capabilities = [] /** * Excludes placeholder payment methods and removes duplicates. * + * WooPay and Apple Pay & Google Pay are considered placeholder payment methods and are excluded. + * * @param array $payment_methods Array of payment methods to process. * @return array Filtered array of unique payment methods. */ private function exclude_placeholder_payment_methods( array $payment_methods ): array { + // Placeholder payment methods. $excluded_methods = [ 'woopay', 'apple_google' ]; return array_filter(