Skip to content

Commit

Permalink
Hide PRBs if cards are disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
annemirasol committed Nov 6, 2024
1 parent 2023092 commit d0ae550
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions includes/class-wc-stripe-blocks-support.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,11 @@ private function should_show_payment_request_button() {
return false;
}

$available_gateways = WC()->payment_gateways->get_available_payment_gateways();
if ( ! isset( $available_gateways['stripe'] ) ) {
return false;
}

// Don't show if PRBs are supposed to be hidden on the cart page.
if (
has_block( 'woocommerce/cart' )
Expand Down

0 comments on commit d0ae550

Please sign in to comment.