Skip to content

Commit

Permalink
chore(release): merge in release v5.10.6
Browse files Browse the repository at this point in the history
  • Loading branch information
matticbot committed Jan 9, 2025
2 parents c639af7 + f8290a7 commit 0ed8bd8
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 8 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [5.10.6](https://github.com/Automattic/newspack-plugin/compare/v5.10.5...v5.10.6) (2025-01-09)


### Bug Fixes

* **esp-sync:** get inactive subscriptions with failed or pending orders ([#3658](https://github.com/Automattic/newspack-plugin/issues/3658)) ([cca29d3](https://github.com/Automattic/newspack-plugin/commit/cca29d31d4b489a0c23fcb1dfbc50ae10e4bdc85))

## [5.10.5](https://github.com/Automattic/newspack-plugin/compare/v5.10.4...v5.10.5) (2025-01-07)


Expand Down
15 changes: 12 additions & 3 deletions includes/reader-activation/sync/class-woocommerce.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,17 @@ function( $acc, $subscription_id ) {
$subscription = \wcs_get_subscription( $subscription_id );
if ( $subscription->has_status( WooCommerce_Connection::FORMER_SUBSCRIBER_STATUSES ) ) {

// Only subscriptions that had a completed order are considered.
if ( ! empty( $subscription->get_date( 'last_order_date_completed' ) ) ) {
// Only subscriptions that have at least one completed order are considered.
$related_orders = $subscription->get_related_orders();
$completed_order = false;
foreach ( $related_orders as $order_id ) {
$order = \wc_get_order( $order_id );
if ( $order->has_status( 'completed' ) ) {
$completed_order = $order_id;
break;
}
}
if ( ! empty( $completed_order ) ) {
$acc[] = $subscription_id;
}
}
Expand Down Expand Up @@ -257,7 +266,7 @@ private static function get_order_metadata( $order, $payment_page_url = false )
}

// If the subscription has moved to a cancelled or expired status.
if ( $current_subscription->has_status( [ 'cancelled', 'expired' ] ) ) {
if ( $current_subscription->has_status( [ 'cancelled', 'expired', 'on-hold' ] ) ) {
$donor_status = 'Ex-' . $donor_status;
}
$metadata['membership_status'] = $donor_status;
Expand Down
4 changes: 2 additions & 2 deletions newspack.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* Plugin Name: Newspack
* Description: An advanced open-source publishing and revenue-generating platform for news organizations.
* Version: 5.10.5
* Version: 5.10.6
* Author: Automattic
* Author URI: https://newspack.com/
* License: GPL2
Expand All @@ -14,7 +14,7 @@

defined( 'ABSPATH' ) || exit;

define( 'NEWSPACK_PLUGIN_VERSION', '5.10.5' );
define( 'NEWSPACK_PLUGIN_VERSION', '5.10.6' );

// Define NEWSPACK_PLUGIN_FILE.
if ( ! defined( 'NEWSPACK_PLUGIN_FILE' ) ) {
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": "newspack",
"version": "5.10.5",
"version": "5.10.6",
"description": "The Newspack plugin. https://newspack.com",
"bugs": {
"url": "https://github.com/Automattic/newspack-plugin/issues"
Expand Down

0 comments on commit 0ed8bd8

Please sign in to comment.