Skip to content
Merged
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
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
*** Changelog ***

= 10.0.0 - xxxx-xx-xx =
* Update - Disable Payment Request Buttons and ensure Express Checkout is used when express checkout buttons are enabled
* Dev - Expands the Stripe Order Helper class to handle source ID, refund ID, intent ID, and setup intent ID metas
* Update - Removing the `wc_stripe_is_upe_checkout_enabled` filter, as Legacy Checkout is no longer supported
* Dev - Upgrades `jest` to version 29.7.0, `@wordpress/scripts` to 26.19.0, and adds `axios`(version 1.12.2) to the JavaScript development dependencies
Expand Down
16 changes: 13 additions & 3 deletions includes/class-wc-stripe-feature-flags.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,18 @@

class WC_Stripe_Feature_Flags {
const UPE_CHECKOUT_FEATURE_ATTRIBUTE_NAME = 'upe_checkout_experience_enabled';
const ECE_FEATURE_FLAG_NAME = '_wcstripe_feature_ece';
const AMAZON_PAY_FEATURE_FLAG_NAME = '_wcstripe_feature_amazon_pay';

/**
* Feature flag for Stripe ECE (Express Checkout Element).
* This feature flag controls whether the new Express Checkout Element (ECE) or the legacy Payment Request Button (PRB) is used to render express checkout buttons.
*
* @var string
*
* @deprecated This feature flag will be removed in version 10.1.0. ECE will be permanently enabled.
*/
const ECE_FEATURE_FLAG_NAME = '_wcstripe_feature_ece';

/**
* Feature flag for Optimized Checkout (OC).
*
Expand All @@ -25,7 +34,6 @@ class WC_Stripe_Feature_Flags {
*/
protected static $feature_flags = [
'_wcstripe_feature_upe' => 'yes',
self::ECE_FEATURE_FLAG_NAME => 'yes',
self::AMAZON_PAY_FEATURE_FLAG_NAME => 'no',
self::OC_FEATURE_FLAG_NAME => 'no',
];
Expand Down Expand Up @@ -65,9 +73,11 @@ public static function is_amazon_pay_available() {
* Express checkout buttons are rendered with either ECE or PRB depending on this feature flag.
*
* @return bool
*
* @deprecated 10.0.0 ECE is always enabled. This method will be removed in a future release.
*/
public static function is_stripe_ece_enabled() {
return 'yes' === self::get_option_with_default( self::ECE_FEATURE_FLAG_NAME );
return true;
}

/**
Expand Down
14 changes: 0 additions & 14 deletions includes/connect/class-wc-stripe-connect.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,6 @@ private function save_stripe_keys( $result, $type = 'connect', $mode = 'live' )
unset( $options['account_id'] );
unset( $options['test_account_id'] );

// Enable ECE for new connections.
$this->enable_ece_in_new_accounts();

WC_Stripe_Database_Cache::delete( WC_Stripe_API::INVALID_API_KEY_ERROR_COUNT_CACHE_KEY );
WC_Stripe_Helper::update_main_stripe_settings( $options );

Expand Down Expand Up @@ -232,17 +229,6 @@ private function get_upe_checkout_experience_enabled() {
return 'yes';
}

/**
* Enable Stripe express checkout element for new connections.
*/
private function enable_ece_in_new_accounts() {
$existing_stripe_settings = WC_Stripe_Helper::get_stripe_settings();

if ( empty( $existing_stripe_settings ) ) {
update_option( WC_Stripe_Feature_Flags::ECE_FEATURE_FLAG_NAME, 'yes' );
}
}

/**
* Gets default Stripe settings
*/
Expand Down
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ If you get stuck, you can ask for help in the [Plugin Forum](https://wordpress.o
== Changelog ==

= 10.0.0 - xxxx-xx-xx =
* Update - Disable Payment Request Buttons and ensure Express Checkout is used when express checkout buttons are enabled
* Dev - Expands the Stripe Order Helper class to handle source ID, refund ID, intent ID, and setup intent ID metas
* Update - Removing the `wc_stripe_is_upe_checkout_enabled` filter, as Legacy Checkout is no longer supported
* Dev - Upgrades `jest` to version 29.7.0, `@wordpress/scripts` to 26.19.0, and adds `axios`(version 1.12.2) to the JavaScript development dependencies
Expand Down
Loading