🎨 Make condition easier to read

This commit is contained in:
Philipp Stracker 2025-03-12 11:48:15 +01:00
parent 80a99c75d3
commit 1938f6b6ed
No known key found for this signature in database

View file

@ -58,11 +58,13 @@ class DisabledFundingSources {
? $this->settings->get( 'disable_funding' )
: array();
$is_dcc_enabled = $this->settings->has( 'dcc_enabled' ) && $this->settings->get( 'dcc_enabled' );
$is_dcc_enabled = $this->settings->has( 'dcc_enabled' ) && $this->settings->get( 'dcc_enabled' );
$is_checkout = is_checkout();
$is_block_context = in_array( $context, array( 'checkout-block', 'cart-block' ), true );
if (
! is_checkout()
|| ( $is_dcc_enabled && in_array( $context, array( 'checkout-block', 'cart-block' ), true ) )
! $is_checkout
|| ( $is_dcc_enabled && $is_block_context )
) {
$disable_funding[] = 'card';
}