Skip to content

Commit

Permalink
Updates to 6.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
WooCommerce committed Sep 5, 2024
1 parent ca6f178 commit 072c76a
Show file tree
Hide file tree
Showing 13 changed files with 60 additions and 47 deletions.
4 changes: 4 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
*** WooCommerce Subscriptions Changelog ***

2024-09-05 - version 6.6.2
* Fix: Prevent errors during checkout when a customer is switching their subscription product and does not require payment.
* Dev: Update subscriptions-core to 7.4.3.

2024-08-27 - version 6.6.1
* Fix: Resolved an issue where simple product prices were incorrectly set to $0 when purchasing subscriptions and simple products with a coupon in WC 9.2.
* Dev: Update subscriptions-core to 7.4.2.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ public function get_chart_legend() {
$scheduled_ends[ $key ] = date( 'Y-m-d', strtotime( $scheduled_ends[ $key ] ) );
}

if ( ! isset( $billing_intervals[ $key ] ) || ! isset( $billing_periods[ $key ] ) || ! in_array( $billing_periods[ $key ], array_keys( wcs_get_subscription_period_strings() ), true ) ) {
continue;
}

// Keep calculating all the new payments until we hit the end date of the search
do {

Expand All @@ -69,7 +73,9 @@ public function get_chart_legend() {
$this->order_ids_recurring_totals[ $update_key ]->recurring_total += $subscription_totals[ $key ];
}
}
} while ( $next_payment_timestamp <= $this->end_date && isset( $scheduled_ends[ $key ] ) && ( 0 == $scheduled_ends[ $key ] || $next_payment_timestamp < strtotime( $scheduled_ends[ $key ] ) ) );
} while ( $next_payment_timestamp > 0 && $next_payment_timestamp <= $this->end_date
&& isset( $key, $scheduled_ends[ $key ] )
&& ( 0 == $scheduled_ends[ $key ] || $next_payment_timestamp < strtotime( $scheduled_ends[ $key ] ) ) );
}
}

Expand Down
30 changes: 15 additions & 15 deletions languages/woocommerce-subscriptions.pot
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
# This file is distributed under the same license as the WooCommerce Subscriptions plugin.
msgid ""
msgstr ""
"Project-Id-Version: WooCommerce Subscriptions 6.6.1\n"
"Project-Id-Version: WooCommerce Subscriptions 6.6.2\n"
"Report-Msgid-Bugs-To: https://woocommerce.com/contact-us\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2024-08-27T01:02:31+00:00\n"
"POT-Creation-Date: 2024-09-05T03:31:47+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.9.0\n"
"X-Domain: woocommerce-subscriptions\n"
Expand Down Expand Up @@ -464,7 +464,7 @@ msgstr ""

#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:781
#: includes/admin/reports/class-wcs-report-subscription-payment-retry.php:195
#: includes/admin/reports/class-wcs-report-upcoming-recurring-revenue.php:216
#: includes/admin/reports/class-wcs-report-upcoming-recurring-revenue.php:222
#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/views/html-related-orders-table.php:20
#: vendor/woocommerce/subscriptions-core/templates/myaccount/related-orders.php:23
#: vendor/woocommerce/subscriptions-core/templates/myaccount/related-orders.php:48
Expand All @@ -473,7 +473,7 @@ msgstr ""

#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:785
#: includes/admin/reports/class-wcs-report-subscription-payment-retry.php:199
#: includes/admin/reports/class-wcs-report-upcoming-recurring-revenue.php:220
#: includes/admin/reports/class-wcs-report-upcoming-recurring-revenue.php:226
msgid "Export CSV"
msgstr ""

Expand Down Expand Up @@ -532,7 +532,7 @@ msgstr ""

#. translators: %s: renewal count.
#: includes/admin/reports/class-wcs-report-subscription-payment-retry.php:121
#: includes/admin/reports/class-wcs-report-upcoming-recurring-revenue.php:98
#: includes/admin/reports/class-wcs-report-upcoming-recurring-revenue.php:104
msgid "%s renewal orders"
msgstr ""

Expand Down Expand Up @@ -584,44 +584,44 @@ msgid "Recovered Renewal Revenue"
msgstr ""

#. translators: %s: formatted amount.
#: includes/admin/reports/class-wcs-report-upcoming-recurring-revenue.php:91
#: includes/admin/reports/class-wcs-report-upcoming-recurring-revenue.php:97
msgid "%s renewal income in this period"
msgstr ""

#: includes/admin/reports/class-wcs-report-upcoming-recurring-revenue.php:92
#: includes/admin/reports/class-wcs-report-upcoming-recurring-revenue.php:98
msgid "The sum of all the upcoming renewal orders, including items, fees, tax and shipping, for currently active subscriptions."
msgstr ""

#: includes/admin/reports/class-wcs-report-upcoming-recurring-revenue.php:99
#: includes/admin/reports/class-wcs-report-upcoming-recurring-revenue.php:105
msgid "The number of upcoming renewal orders, for currently active subscriptions."
msgstr ""

#. translators: %s: formatted amount.
#: includes/admin/reports/class-wcs-report-upcoming-recurring-revenue.php:105
#: includes/admin/reports/class-wcs-report-upcoming-recurring-revenue.php:111
msgid "%s average renewal amount"
msgstr ""

#: includes/admin/reports/class-wcs-report-upcoming-recurring-revenue.php:186
#: includes/admin/reports/class-wcs-report-upcoming-recurring-revenue.php:192
msgid "Next 12 Months"
msgstr ""

#: includes/admin/reports/class-wcs-report-upcoming-recurring-revenue.php:187
#: includes/admin/reports/class-wcs-report-upcoming-recurring-revenue.php:193
msgid "Next 30 Days"
msgstr ""

#: includes/admin/reports/class-wcs-report-upcoming-recurring-revenue.php:188
#: includes/admin/reports/class-wcs-report-upcoming-recurring-revenue.php:194
msgid "Next Month"
msgstr ""

#: includes/admin/reports/class-wcs-report-upcoming-recurring-revenue.php:189
#: includes/admin/reports/class-wcs-report-upcoming-recurring-revenue.php:195
msgid "Next 7 Days"
msgstr ""

#: includes/admin/reports/class-wcs-report-upcoming-recurring-revenue.php:254
#: includes/admin/reports/class-wcs-report-upcoming-recurring-revenue.php:260
msgid "Renewals count"
msgstr ""

#: includes/admin/reports/class-wcs-report-upcoming-recurring-revenue.php:263
#: includes/admin/reports/class-wcs-report-upcoming-recurring-revenue.php:269
msgid "Renewals amount"
msgstr ""

Expand Down
2 changes: 1 addition & 1 deletion vendor/autoload.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@

require_once __DIR__ . '/composer/autoload_real.php';

return ComposerAutoloaderInitd13119b632d3cc9554ea23819396f4c1::getLoader();
return ComposerAutoloaderInit7e691db14332db79e94ffb5244979d5e::getLoader();
8 changes: 4 additions & 4 deletions vendor/composer/autoload_real.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// autoload_real.php @generated by Composer

class ComposerAutoloaderInitd13119b632d3cc9554ea23819396f4c1
class ComposerAutoloaderInit7e691db14332db79e94ffb5244979d5e
{
private static $loader;

Expand All @@ -24,12 +24,12 @@ public static function getLoader()

require __DIR__ . '/platform_check.php';

spl_autoload_register(array('ComposerAutoloaderInitd13119b632d3cc9554ea23819396f4c1', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInit7e691db14332db79e94ffb5244979d5e', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInitd13119b632d3cc9554ea23819396f4c1', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInit7e691db14332db79e94ffb5244979d5e', 'loadClassLoader'));

require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitd13119b632d3cc9554ea23819396f4c1::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInit7e691db14332db79e94ffb5244979d5e::getInitializer($loader));

$loader->register(true);

Expand Down
8 changes: 4 additions & 4 deletions vendor/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Composer\Autoload;

class ComposerStaticInitd13119b632d3cc9554ea23819396f4c1
class ComposerStaticInit7e691db14332db79e94ffb5244979d5e
{
public static $prefixLengthsPsr4 = array (
'C' =>
Expand Down Expand Up @@ -129,9 +129,9 @@ class ComposerStaticInitd13119b632d3cc9554ea23819396f4c1
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitd13119b632d3cc9554ea23819396f4c1::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitd13119b632d3cc9554ea23819396f4c1::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitd13119b632d3cc9554ea23819396f4c1::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInit7e691db14332db79e94ffb5244979d5e::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInit7e691db14332db79e94ffb5244979d5e::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInit7e691db14332db79e94ffb5244979d5e::$classMap;

}, null, ClassLoader::class);
}
Expand Down
14 changes: 7 additions & 7 deletions vendor/composer/installed.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,17 +156,17 @@
},
{
"name": "woocommerce/subscriptions-core",
"version": "7.4.2",
"version_normalized": "7.4.2.0",
"version": "7.4.3",
"version_normalized": "7.4.3.0",
"source": {
"type": "git",
"url": "https://github.com/Automattic/woocommerce-subscriptions-core.git",
"reference": "f42488f6e31d078759dc917056f2ab34f2790e43"
"reference": "eba9c58a2fd2a65e55c533f24cd20af2084a8265"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Automattic/woocommerce-subscriptions-core/zipball/f42488f6e31d078759dc917056f2ab34f2790e43",
"reference": "f42488f6e31d078759dc917056f2ab34f2790e43",
"url": "https://api.github.com/repos/Automattic/woocommerce-subscriptions-core/zipball/eba9c58a2fd2a65e55c533f24cd20af2084a8265",
"reference": "eba9c58a2fd2a65e55c533f24cd20af2084a8265",
"shasum": ""
},
"require": {
Expand All @@ -179,7 +179,7 @@
"woocommerce/woocommerce-sniffs": "0.1.0",
"yoast/phpunit-polyfills": "1.1.0"
},
"time": "2024-08-27T00:36:09+00:00",
"time": "2024-09-05T02:55:11+00:00",
"type": "wordpress-plugin",
"extra": {
"phpcodesniffer-search-depth": 2
Expand Down Expand Up @@ -209,7 +209,7 @@
"description": "Sell products and services with recurring payments in your WooCommerce Store.",
"homepage": "https://github.com/Automattic/woocommerce-subscriptions-core",
"support": {
"source": "https://github.com/Automattic/woocommerce-subscriptions-core/tree/7.4.2",
"source": "https://github.com/Automattic/woocommerce-subscriptions-core/tree/7.4.3",
"issues": "https://github.com/Automattic/woocommerce-subscriptions-core/issues"
},
"install-path": "../woocommerce/subscriptions-core"
Expand Down
18 changes: 9 additions & 9 deletions vendor/composer/installed.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php return array(
'root' => array(
'name' => 'woocommerce/woocommerce-subscriptions',
'pretty_version' => 'dev-release/6.6.1',
'version' => 'dev-release/6.6.1',
'reference' => '2c2bd10595b327e840fc5611433725df20bae33a',
'pretty_version' => 'dev-release/6.6.2',
'version' => 'dev-release/6.6.2',
'reference' => 'dfdcf5705059ca03ecc9c5b2c21910f8c932b082',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down Expand Up @@ -32,18 +32,18 @@
),
),
'woocommerce/subscriptions-core' => array(
'pretty_version' => '7.4.2',
'version' => '7.4.2.0',
'reference' => 'f42488f6e31d078759dc917056f2ab34f2790e43',
'pretty_version' => '7.4.3',
'version' => '7.4.3.0',
'reference' => 'eba9c58a2fd2a65e55c533f24cd20af2084a8265',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../woocommerce/subscriptions-core',
'aliases' => array(),
'dev_requirement' => false,
),
'woocommerce/woocommerce-subscriptions' => array(
'pretty_version' => 'dev-release/6.6.1',
'version' => 'dev-release/6.6.1',
'reference' => '2c2bd10595b327e840fc5611433725df20bae33a',
'pretty_version' => 'dev-release/6.6.2',
'version' => 'dev-release/6.6.2',
'reference' => 'dfdcf5705059ca03ecc9c5b2c21910f8c932b082',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
Expand Down
5 changes: 4 additions & 1 deletion vendor/woocommerce/subscriptions-core/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
*** WooCommerce Subscriptions Core Changelog ***

= 7.4.3 - 2024-09-05 =
* Fix - Prevent errors during checkout when a customer is switching their subscription product and does not require payment.

= 7.4.2 - 2024-08-27 =
* Fix - Resolved an issue where simple product prices were incorrectly set to $0 when purchasing subscriptions and simple products with a coupon in WC 9.2.

Expand All @@ -10,12 +13,12 @@
* Dev - Introduce new parameter to WC_Subscription::get_last_order() to enable filtering out orders with specific statuses.
* Update - Schedule subscription-related events with a priority of 1 to allow for earlier execution within the Action Scheduler.
* Fix - Ensure admin notices are displayed after performing bulk actions on subscriptions when HPOS is enabled.
* Fix - Resolved an error when purchasing subscription products on the block checkout with a limited recurring coupon.

= 7.3.0 - 2024-07-16 =
* Fix - Label improvements on subscription and order page templates.
* Fix - Fixed an issue with subscriptions containing multiple renewal orders to mark a random item as processing, instead of the last order.
* Fix - Prevent errors from invalid subscription objects during customer payment method updates.
* Fix - Resolved an error when purchasing subscription products on the block checkout with a limited recurring coupon.

= 7.2.0 - 2024-06-13 =
* Fix - label improvement on my subscription page template.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class WC_Subscriptions_Core_Plugin {
* The version of subscriptions-core library.
* @var string
*/
protected $library_version = '7.4.2'; // WRCS: DEFINED_VERSION.
protected $library_version = '7.4.3'; // WRCS: DEFINED_VERSION.

/**
* The subscription scheduler instance.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ public static function order_needs_payment( $needs_payment, $order, $valid_order
}

// Check if there's a subscription attached to this order that will require a payment method.
foreach ( wcs_get_subscriptions_for_order( $order ) as $subscription ) {
foreach ( wcs_get_subscriptions_for_order( $order, [ 'order_type' => 'parent' ] ) as $subscription ) {
$has_next_payment = false;
$contains_expiring_limited_coupon = false;
$contains_free_trial = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
* Author: Automattic
* Author URI: https://woocommerce.com/
* Requires WP: 5.6
* Version: 7.4.2
* Version: 7.4.3
*/
4 changes: 2 additions & 2 deletions woocommerce-subscriptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Description: Sell products and services with recurring payments in your WooCommerce Store.
* Author: WooCommerce
* Author URI: https://woocommerce.com/
* Version: 6.6.1
* Version: 6.6.2
* Requires Plugins: woocommerce
*
* WC requires at least: 8.7.1
Expand Down Expand Up @@ -78,7 +78,7 @@ class WC_Subscriptions {
public static $plugin_file = __FILE__;

/** @var string */
public static $version = '6.6.1'; // WRCS: DEFINED_VERSION.
public static $version = '6.6.2'; // WRCS: DEFINED_VERSION.

/** @var string */
public static $wc_minimum_supported_version = '7.7';
Expand Down

0 comments on commit 072c76a

Please sign in to comment.