Skip to content

Commit

Permalink
Add block comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mordeth committed Dec 20, 2024
1 parent 4d823ac commit 76a280d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions includes/class-wc-payments-onboarding-service.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand All @@ -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(
Expand Down

0 comments on commit 76a280d

Please sign in to comment.