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
Expand Up @@ -5,6 +5,7 @@
* Fix - Ensure Amazon Pay, Apple Pay, and Google Pay display settings are managed correctly
* Dev - Add logging with DNS resolution diagnostics for URL validation issues when calling Stripe API
* Fix - Allow payment methods to be disabled when they are not available
* Dev - Fixes some incorrect subscriptions support implementations for payment methods

= 10.1.0 - 2025-11-11 =
* Dev - Remove unused `shouldShowPaymentRequestButton` parameter and calculations from backend
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ public function __construct() {
$this->supported_currencies = [ WC_Stripe_Currency_Code::UNITED_STATES_DOLLAR ];
$this->supported_countries = [ 'US' ];
$this->supports[] = 'tokenization';
$this->supports[] = 'subscriptions';

// Check if subscriptions are enabled and add support for them.
$this->maybe_init_subscriptions();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ public function __construct() {
);
$this->supports_deferred_intent = false;
$this->supports[] = 'tokenization';
$this->supports[] = 'subscriptions';

// Check if subscriptions are enabled and add support for them.
$this->maybe_init_subscriptions();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* Bancontact Payment Method class extending UPE base class
*/
class WC_Stripe_UPE_Payment_Method_Bancontact extends WC_Stripe_UPE_Payment_Method {
use WC_Stripe_Subscriptions_Trait;

const STRIPE_ID = WC_Stripe_Payment_Methods::BANCONTACT;

Expand All @@ -28,9 +29,10 @@ public function __construct() {
'woocommerce-gateway-stripe'
);
if ( $is_sepa_tokens_for_bancontact_enabled ) {
$this->supports[] = 'subscriptions';
$this->supports[] = 'tokenization';
$this->supports[] = 'multiple_subscriptions';

// Check if subscriptions are enabled and add support for them.
$this->maybe_init_subscriptions();
}

// Add support for pre-orders.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ public function __construct() {
$this->supported_currencies = [ WC_Stripe_Currency_Code::AUSTRALIAN_DOLLAR ];
$this->supported_countries = [ 'AU' ];
$this->supports[] = 'tokenization';
$this->supports[] = 'subscriptions';

// Check if subscriptions are enabled and add support for them.
$this->maybe_init_subscriptions();

// Add support for pre-orders.
$this->maybe_init_pre_orders();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
* Credit card Payment Method class extending UPE base class
*/
class WC_Stripe_UPE_Payment_Method_CC extends WC_Stripe_UPE_Payment_Method {
use WC_Stripe_Subscriptions_Trait;

const STRIPE_ID = WC_Stripe_Payment_Methods::CARD;

Expand All @@ -25,12 +26,14 @@ public function __construct() {
$this->title = __( 'Credit / Debit Card', 'woocommerce-gateway-stripe' );
$this->is_reusable = true;
$this->label = __( 'Credit / Debit Card', 'woocommerce-gateway-stripe' );
$this->supports[] = 'subscriptions';
$this->supports[] = 'tokenization';
$this->description = __(
'Let your customers pay with major credit and debit cards without leaving your store.',
'woocommerce-gateway-stripe'
);

// Check if subscriptions are enabled and add support for them.
$this->maybe_init_subscriptions();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* The iDEAL Payment Method class extending UPE base class
*/
class WC_Stripe_UPE_Payment_Method_Ideal extends WC_Stripe_UPE_Payment_Method {
use WC_Stripe_Subscriptions_Trait;

const STRIPE_ID = WC_Stripe_Payment_Methods::IDEAL;

Expand All @@ -28,9 +29,10 @@ public function __construct() {
'woocommerce-gateway-stripe'
);
if ( $is_sepa_tokens_for_ideal_enabled ) {
$this->supports[] = 'subscriptions';
$this->supports[] = 'multiple_subscriptions';
$this->supports[] = 'tokenization';

// Check if subscriptions are enabled and add support for them.
$this->maybe_init_subscriptions();
}

// Add support for pre-orders.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,14 @@ class WC_Stripe_UPE_Payment_Method_Klarna extends WC_Stripe_UPE_Payment_Method {
const STRIPE_ID = WC_Stripe_Payment_Methods::KLARNA;

/**
* Constructor for giropay payment method
* Constructor for Klarna payment method
*/
public function __construct() {
parent::__construct();
$this->stripe_id = self::STRIPE_ID;
$this->title = __( 'Klarna', 'woocommerce-gateway-stripe' );
$this->is_reusable = true;
$this->supports[] = 'subscriptions';
$this->supports[] = 'tokenization';
$this->supports[] = 'multiple_subscriptions';
$this->supported_currencies = [
WC_Stripe_Currency_Code::AUSTRALIAN_DOLLAR,
WC_Stripe_Currency_Code::CANADIAN_DOLLAR,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

if ( ! defined( 'ABSPATH' ) ) {
exit;
}
Expand All @@ -9,6 +10,7 @@
* This class represents the Stripe UPE payment method for the Optimized Checkout (OC) flow.
*/
class WC_Stripe_UPE_Payment_Method_OC extends WC_Stripe_UPE_Payment_Method {
use WC_Stripe_Subscriptions_Trait;

const STRIPE_ID = WC_Stripe_Payment_Methods::OC;

Expand All @@ -25,8 +27,10 @@ public function __construct() {
$this->stripe_id = self::STRIPE_ID;
$this->title = 'Stripe';
$this->is_reusable = true;
$this->supports[] = 'subscriptions';
$this->supports[] = 'tokenization';

// Check if subscriptions are enabled and add support for them.
$this->maybe_init_subscriptions();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* Sofort Payment Method class extending UPE base class
*/
class WC_Stripe_UPE_Payment_Method_Sofort extends WC_Stripe_UPE_Payment_Method {
use WC_Stripe_Subscriptions_Trait;

const STRIPE_ID = WC_Stripe_Payment_Methods::SOFORT;

Expand All @@ -22,15 +23,16 @@ public function __construct() {
$this->is_reusable = true;
$this->supported_currencies = [ WC_Stripe_Currency_Code::EURO ];
$this->label = __( 'Sofort', 'woocommerce-gateway-stripe' );
$this->supports[] = 'subscriptions';
$this->supports[] = 'tokenization';
$this->supports[] = 'multiple_subscriptions';
$this->description = __(
'Accept secure bank transfers from Austria, Belgium, Germany, Italy, Netherlands, and Spain.',
'woocommerce-gateway-stripe'
);

// Add support for pre-orders.
$this->maybe_init_pre_orders();

// Init subscription so it can process subscription payments.
$this->maybe_init_subscriptions();
}
}
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -115,5 +115,6 @@ If you get stuck, you can ask for help in the [Plugin Forum](https://wordpress.o
* Fix - Ensure Amazon Pay, Apple Pay, and Google Pay display settings are managed correctly
* Dev - Add logging with DNS resolution diagnostics for URL validation issues when calling Stripe API
* Fix - Allow payment methods to be disabled when they are not available
* Dev - Fixes some incorrect subscriptions support implementations for payment methods

[See changelog for full details across versions](https://raw.githubusercontent.com/woocommerce/woocommerce-gateway-stripe/trunk/changelog.txt).
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

use WC_Stripe_Payment_Methods;
use WC_Stripe_UPE_Payment_Method_OC;
use WooCommerce\Stripe\Tests\Helpers\OC_Test_Helper;
use WP_UnitTestCase;

/**
Expand Down
Loading