Skip to content

Commit

Permalink
Merge branch 'develop' into chore/remove-unused-strings-file
Browse files Browse the repository at this point in the history
  • Loading branch information
brettshumaker authored Feb 21, 2025
2 parents 32cc077 + e101a39 commit 0709983
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 12 deletions.
3 changes: 3 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
*** WooPayments Changelog ***

= 8.9.2 - 2025-02-21 =
* Fix - Fixed WooPay opt-in race condition

= 8.9.1 - 2025-02-07 =
* Fix - Ensures that the tokenised cart for ECE implementation is disabled by default.

Expand Down
4 changes: 4 additions & 0 deletions changelog/fix-10379-woo-logo-size-test-drive-onboarding
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

Update the size of Woo logo on the test drive onboarding page.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: fix

Prevent fatal errors when subscription is deactivated due outdated version.
7 changes: 3 additions & 4 deletions client/connect-account-page/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,9 @@

img.logo {
position: absolute;
height: 40px;
width: 40px;
top: 18px;
left: 36px;
width: 64px;
top: 24px;
left: 24px;
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ public function is_payment_recurring( $order_id ) {
* @return bool Indicates whether the save payment method checkbox should be displayed or not.
*/
public function display_save_payment_method_checkbox( $display ) {
if ( ! class_exists( 'WC_Subscriptions_Cart' ) ) {
return false;
}
if ( WC_Subscriptions_Cart::cart_contains_subscription() || $this->is_changing_payment_method_for_subscription() ) {
return false;
}
Expand All @@ -83,7 +86,7 @@ public function display_save_payment_method_checkbox( $display ) {
* @return bool
*/
public function is_subscription_item_in_cart() {
if ( $this->is_subscriptions_enabled() ) {
if ( class_exists( 'WC_Subscriptions_Cart' ) && $this->is_subscriptions_enabled() ) {
return WC_Subscriptions_Cart::cart_contains_subscription() || $this->cart_contains_renewal();
}
return false;
Expand Down
8 changes: 6 additions & 2 deletions includes/subscriptions/class-wc-payments-product-service.php
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ public function archive_price( string $wcpay_price_id, $test_mode = null ) {
* @param int $product_id ID of the product that's being saved.
*/
public function limit_subscription_product_intervals( $product_id ) {
if ( $this->is_subscriptions_plugin_active() ) {
if ( $this->is_subscriptions_plugin_active() || ! class_exists( 'WC_Subscriptions_Product' ) ) {
return;
}

Expand Down Expand Up @@ -500,7 +500,7 @@ public function limit_subscription_product_intervals( $product_id ) {
* @param int $index Variation index in the incoming array.
*/
public function limit_subscription_variation_intervals( $product_id, $index ) {
if ( $this->is_subscriptions_plugin_active() ) {
if ( $this->is_subscriptions_plugin_active() || ! class_exists( 'WC_Subscriptions_Product' ) ) {
return;
}

Expand Down Expand Up @@ -793,6 +793,10 @@ public function get_wcpay_price_id( WC_Product $product, $test_mode = null ): st
wc_deprecated_function( __FUNCTION__, '3.3.0' );
$price_id = $product->get_meta( self::get_wcpay_price_id_option( $test_mode ), true );

if ( ! class_exists( 'WC_Subscriptions_Product' ) ) {
return $price_id;
}

// If the subscription product doesn't have a WC Pay price ID, create one now.
if ( empty( $price_id ) && WC_Subscriptions_Product::is_subscription( $product ) ) {
$is_current_environment = null === $test_mode || WC_Payments::mode()->is_test() === $test_mode;
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "woocommerce-payments",
"version": "8.9.1",
"version": "8.9.2",
"main": "webpack.config.js",
"author": "Automattic",
"license": "GPL-3.0-or-later",
Expand Down
6 changes: 5 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tags: woocommerce payments, apple pay, credit card, google pay, payment, payment
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.3
Stable tag: 8.9.1
Stable tag: 8.9.2
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -87,6 +87,10 @@ You can read our Terms of Service and other policies [here](https://woocommerce.

== Changelog ==

= 8.9.2 - 2025-02-21 =
* Fix - Fixed WooPay opt-in race condition


= 8.9.1 - 2025-02-07 =
* Fix - Ensures that the tokenised cart for ECE implementation is disabled by default.

Expand Down
2 changes: 1 addition & 1 deletion woocommerce-payments.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
* WC tested up to: 9.6.0
* Requires at least: 6.0
* Requires PHP: 7.3
* Version: 8.9.1
* Version: 8.9.2
* Requires Plugins: woocommerce
*
* @package WooCommerce\Payments
Expand Down

0 comments on commit 0709983

Please sign in to comment.