Skip to content

Commit

Permalink
Hide duplicate payment method warnings when Stripe gateway is disabled (
Browse files Browse the repository at this point in the history
  • Loading branch information
mdmoore authored Nov 4, 2024
1 parent e42103b commit 3d745b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Significance: patch
Type: fix
Comment: Small change affecting Stripe Gateway settings notices


8 changes: 1 addition & 7 deletions includes/class-duplicates-detection-service.php
Original file line number Diff line number Diff line change
Expand Up @@ -136,18 +136,12 @@ private function search_for_payment_request_buttons() {
];

foreach ( $this->get_registered_gateways() as $gateway ) {
// Stripe gateway can enable PRBs while being disabled as well, hence no need to check for enabled status.
if ( 'stripe' === $gateway->id && 'yes' === $gateway->get_option( 'payment_request' ) ) {
$this->gateways_qualified_by_duplicates_detector[ $prb_payment_method ][] = $gateway->id;
continue;
}

if ( 'yes' === $gateway->enabled ) {
foreach ( $keywords as $keyword ) {
if ( strpos( $gateway->id, $keyword ) !== false ) {
$this->gateways_qualified_by_duplicates_detector[ $prb_payment_method ][] = $gateway->id;
break;
} elseif ( 'yes' === $gateway->get_option( 'payment_request' ) && 'woocommerce_payments' === $gateway->id ) {
} elseif ( 'yes' === $gateway->get_option( 'payment_request' ) ) {
$this->gateways_qualified_by_duplicates_detector[ $prb_payment_method ][] = $gateway->id;
break;
} elseif ( 'yes' === $gateway->get_option( 'express_checkout_enabled' ) ) {
Expand Down

0 comments on commit 3d745b1

Please sign in to comment.