Skip to content

Commit

Permalink
Avoid duplicates detection notice on new stores (#10357)
Browse files Browse the repository at this point in the history
Co-authored-by: Guilherme Pressutto <[email protected]>
  • Loading branch information
timur27 and gpressutto5 authored Feb 13, 2025
1 parent dcdc45f commit 6d62c07
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions changelog/fix-prbs-gateway-scope-for-duplicates-detection
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: minor
Type: fix

Avoid duplicated payment methods detection notice on new stores.
2 changes: 1 addition & 1 deletion includes/class-duplicates-detection-service.php
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ private function search_for_payment_request_buttons() {
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' ) ) {
} elseif ( 'yes' === $gateway->get_option( 'payment_request' ) && in_array( $gateway->id, [ 'woocommerce_payments', 'stripe' ], true ) ) {
$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 6d62c07

Please sign in to comment.