Skip to content

Remove BLIK feature flag #4197

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 10 additions & 15 deletions client/payment-methods-map.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ const isAcssEnabled = window.wc_stripe_settings_params?.is_acss_enabled === '1';
const isBacsEnabled = window.wc_stripe_settings_params?.is_bacs_enabled === '1';
const isBecsDebitEnabled =
window.wc_stripe_settings_params?.is_becs_debit_enabled === '1';
const isBlikEnabled = window.wc_stripe_settings_params?.is_blik_enabled === '1';

const paymentMethodsMap = {
card: {
Expand Down Expand Up @@ -269,6 +268,16 @@ const paymentMethodsMap = {
currencies: [ 'USD' ],
capability: 'cashapp_payments',
},
blik: {
id: PAYMENT_METHOD_BLIK,
label: 'BLIK',
description: __(
'BLIK enables customers in Poland to pay directly via online payouts from their bank account.',
'woocommerce-gateway-stripe'
),
Icon: icons.blik,
currencies: [ 'PLN' ],
},
};

// Enable ACH according to feature flag value.
Expand Down Expand Up @@ -327,18 +336,4 @@ if ( isBecsDebitEnabled ) {
};
}

// Enable BLIK according to feature flag value.
if ( isBlikEnabled ) {
paymentMethodsMap.blik = {
id: PAYMENT_METHOD_BLIK,
label: 'BLIK',
description: __(
'BLIK enables customers in Poland to pay directly via online payouts from their bank account.',
'woocommerce-gateway-stripe'
),
Icon: icons.blik,
currencies: [ 'PLN' ],
};
}

export default paymentMethodsMap;
1 change: 0 additions & 1 deletion includes/admin/class-wc-stripe-settings-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ public function admin_scripts( $hook_suffix ) {
'is_ach_enabled' => WC_Stripe_Feature_Flags::is_ach_lpm_enabled(),
'is_acss_enabled' => WC_Stripe_Feature_Flags::is_acss_lpm_enabled(),
'is_bacs_enabled' => WC_Stripe_Feature_Flags::is_bacs_lpm_enabled(),
'is_blik_enabled' => WC_Stripe_Feature_Flags::is_blik_lpm_enabled(),
'is_becs_debit_enabled' => WC_Stripe_Feature_Flags::is_becs_debit_lpm_enabled(),
'stripe_oauth_url' => $oauth_url,
'stripe_test_oauth_url' => $test_oauth_url,
Expand Down
12 changes: 0 additions & 12 deletions includes/class-wc-stripe-feature-flags.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ class WC_Stripe_Feature_Flags {
const LPM_ACH_FEATURE_FLAG_NAME = '_wcstripe_feature_lpm_ach';
const LPM_ACSS_FEATURE_FLAG_NAME = '_wcstripe_feature_lpm_acss';
const LPM_BACS_FEATURE_FLAG_NAME = '_wcstripe_feature_lpm_bacs';
const LPM_BLIK_FEATURE_FLAG_NAME = '_wcstripe_feature_lpm_blik';
const LPM_BECS_DEBIT_FEATURE_FLAG_NAME = '_wcstripe_feature_lpm_becs_debit';

/**
Expand All @@ -29,7 +28,6 @@ class WC_Stripe_Feature_Flags {
self::LPM_ACSS_FEATURE_FLAG_NAME => 'yes',
self::LPM_BACS_FEATURE_FLAG_NAME => 'yes',
self::LPM_BECS_DEBIT_FEATURE_FLAG_NAME => 'yes',
self::LPM_BLIK_FEATURE_FLAG_NAME => 'yes',
];

/**
Expand Down Expand Up @@ -92,16 +90,6 @@ public static function is_bacs_lpm_enabled(): bool {
return 'yes' === self::get_option_with_default( self::LPM_BACS_FEATURE_FLAG_NAME );
}

/**
* Checks whether BLIK LPM (Local Payment Method) feature flag is enabled.
* BLIK LPM is a feature that allows merchants to enable/disable the BLIK payment method.
*
* @return bool
*/
public static function is_blik_lpm_enabled(): bool {
return 'yes' === self::get_option_with_default( self::LPM_BLIK_FEATURE_FLAG_NAME );
}

/**
* Checks whether BECS Debit LPM (Local Payment Method) feature flag is enabled.
* https://docs.stripe.com/payments/au-becs-debit.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,11 +198,6 @@ public function __construct() {
continue;
}

// Show BLIK only if feature is enabled.
if ( WC_Stripe_UPE_Payment_Method_BLIK::class === $payment_method_class && ! WC_Stripe_Feature_Flags::is_blik_lpm_enabled() ) {
continue;
}

/** Show Sofort if it's already enabled. Hide from the new merchants and keep it for the old ones who are already using this gateway, until we remove it completely.
* Stripe is deprecating Sofort https://support.stripe.com/questions/sofort-is-being-deprecated-as-a-standalone-payment-method.
*/
Expand Down Expand Up @@ -490,9 +485,6 @@ public function javascript_params() {
// ACSS LPM Feature flag.
$stripe_params['is_acss_enabled'] = WC_Stripe_Feature_Flags::is_acss_lpm_enabled();

// BLIK LPM Feature flag.
$stripe_params['is_blik_enabled'] = WC_Stripe_Feature_Flags::is_blik_lpm_enabled();

// BECS Debit LPM Feature flag.
$stripe_params['is_becs_debit_enabled'] = WC_Stripe_Feature_Flags::is_becs_debit_lpm_enabled();

Expand Down
Loading