mirror of
https://github.com/pronamic/woocommerce-subscriptions.git
synced 2025-10-07 18:14:03 +00:00
Updates to 6.3.1
This commit is contained in:
@@ -1,5 +1,8 @@
|
|||||||
*** WooCommerce Subscriptions Changelog ***
|
*** WooCommerce Subscriptions Changelog ***
|
||||||
|
|
||||||
|
2024-05-24 - version 6.3.2
|
||||||
|
* Fix: Prevent overriding line item totals provided in request data when creating Orders via the REST API.
|
||||||
|
|
||||||
2024-05-09 - version 6.3.1
|
2024-05-09 - version 6.3.1
|
||||||
* Fix: Resolved an issue that caused "WC_DateTime could not be converted to int" warnings to occur on non-hpos sites while editing a subscription.
|
* Fix: Resolved an issue that caused "WC_DateTime could not be converted to int" warnings to occur on non-hpos sites while editing a subscription.
|
||||||
|
|
||||||
|
@@ -84,18 +84,29 @@ class WCS_API {
|
|||||||
*
|
*
|
||||||
* @since 6.3.0
|
* @since 6.3.0
|
||||||
*
|
*
|
||||||
* @param WC_Order_Item $item Order item object.
|
* @param WC_Order_Item $item Order item object.
|
||||||
|
* @param array $item_request_data Data posted to the API about the order item.
|
||||||
*/
|
*/
|
||||||
public static function add_sign_up_fee_to_order_item( $item ) {
|
public static function add_sign_up_fee_to_order_item( $item, $item_request_data = array() ) {
|
||||||
if ( 'line_item' !== $item->get_type() || ! self::is_orders_api_request() ) {
|
if ( 'line_item' !== $item->get_type() || ! self::is_orders_api_request() ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$product = $item->get_product();
|
// If the request includes an item subtotal or total, we don't want to override the provided total.
|
||||||
|
if ( isset( $item_request_data['subtotal'] ) || isset( $item_request_data['total'] ) ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$product = $item->get_product();
|
||||||
|
|
||||||
|
if ( ! WC_Subscriptions_Product::is_subscription( $product ) ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$sign_up_fee = WC_Subscriptions_Product::get_sign_up_fee( $product );
|
$sign_up_fee = WC_Subscriptions_Product::get_sign_up_fee( $product );
|
||||||
$sign_up_fee = is_numeric( $sign_up_fee ) ? (float) $sign_up_fee : 0;
|
$sign_up_fee = is_numeric( $sign_up_fee ) ? (float) $sign_up_fee : 0;
|
||||||
|
|
||||||
if ( 0 !== $sign_up_fee ) {
|
if ( 0 < $sign_up_fee ) {
|
||||||
// Recalculate the totals as in `prepare_line_items`, but including the sign up fee in the price.
|
// Recalculate the totals as in `prepare_line_items`, but including the sign up fee in the price.
|
||||||
$trial_length = WC_Subscriptions_Product::get_trial_length( $product );
|
$trial_length = WC_Subscriptions_Product::get_trial_length( $product );
|
||||||
|
|
||||||
|
@@ -2,14 +2,14 @@
|
|||||||
# This file is distributed under the same license as the WooCommerce Subscriptions plugin.
|
# This file is distributed under the same license as the WooCommerce Subscriptions plugin.
|
||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: WooCommerce Subscriptions 6.3.1\n"
|
"Project-Id-Version: WooCommerce Subscriptions 6.3.2\n"
|
||||||
"Report-Msgid-Bugs-To: https://woocommerce.com/contact-us\n"
|
"Report-Msgid-Bugs-To: https://woocommerce.com/contact-us\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
"MIME-Version: 1.0\n"
|
"MIME-Version: 1.0\n"
|
||||||
"Content-Type: text/plain; charset=UTF-8\n"
|
"Content-Type: text/plain; charset=UTF-8\n"
|
||||||
"Content-Transfer-Encoding: 8bit\n"
|
"Content-Transfer-Encoding: 8bit\n"
|
||||||
"POT-Creation-Date: 2024-05-09T07:38:54+00:00\n"
|
"POT-Creation-Date: 2024-05-24T04:44:48+00:00\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"X-Generator: WP-CLI 2.10.0\n"
|
"X-Generator: WP-CLI 2.10.0\n"
|
||||||
"X-Domain: woocommerce-subscriptions\n"
|
"X-Domain: woocommerce-subscriptions\n"
|
||||||
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
@@ -4,4 +4,4 @@
|
|||||||
|
|
||||||
require_once __DIR__ . '/composer/autoload_real.php';
|
require_once __DIR__ . '/composer/autoload_real.php';
|
||||||
|
|
||||||
return ComposerAutoloaderInit8fb769e2bbbe11bb0307f5ba9e6722ef::getLoader();
|
return ComposerAutoloaderInit2a572b7cb1c49650721c1f7426949a4c::getLoader();
|
||||||
|
8
vendor/composer/autoload_real.php
vendored
8
vendor/composer/autoload_real.php
vendored
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
// autoload_real.php @generated by Composer
|
// autoload_real.php @generated by Composer
|
||||||
|
|
||||||
class ComposerAutoloaderInit8fb769e2bbbe11bb0307f5ba9e6722ef
|
class ComposerAutoloaderInit2a572b7cb1c49650721c1f7426949a4c
|
||||||
{
|
{
|
||||||
private static $loader;
|
private static $loader;
|
||||||
|
|
||||||
@@ -24,12 +24,12 @@ class ComposerAutoloaderInit8fb769e2bbbe11bb0307f5ba9e6722ef
|
|||||||
|
|
||||||
require __DIR__ . '/platform_check.php';
|
require __DIR__ . '/platform_check.php';
|
||||||
|
|
||||||
spl_autoload_register(array('ComposerAutoloaderInit8fb769e2bbbe11bb0307f5ba9e6722ef', 'loadClassLoader'), true, true);
|
spl_autoload_register(array('ComposerAutoloaderInit2a572b7cb1c49650721c1f7426949a4c', 'loadClassLoader'), true, true);
|
||||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
|
||||||
spl_autoload_unregister(array('ComposerAutoloaderInit8fb769e2bbbe11bb0307f5ba9e6722ef', 'loadClassLoader'));
|
spl_autoload_unregister(array('ComposerAutoloaderInit2a572b7cb1c49650721c1f7426949a4c', 'loadClassLoader'));
|
||||||
|
|
||||||
require __DIR__ . '/autoload_static.php';
|
require __DIR__ . '/autoload_static.php';
|
||||||
\Composer\Autoload\ComposerStaticInit8fb769e2bbbe11bb0307f5ba9e6722ef::getInitializer($loader)();
|
\Composer\Autoload\ComposerStaticInit2a572b7cb1c49650721c1f7426949a4c::getInitializer($loader)();
|
||||||
|
|
||||||
$loader->register(true);
|
$loader->register(true);
|
||||||
|
|
||||||
|
8
vendor/composer/autoload_static.php
vendored
8
vendor/composer/autoload_static.php
vendored
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
namespace Composer\Autoload;
|
namespace Composer\Autoload;
|
||||||
|
|
||||||
class ComposerStaticInit8fb769e2bbbe11bb0307f5ba9e6722ef
|
class ComposerStaticInit2a572b7cb1c49650721c1f7426949a4c
|
||||||
{
|
{
|
||||||
public static $prefixLengthsPsr4 = array (
|
public static $prefixLengthsPsr4 = array (
|
||||||
'C' =>
|
'C' =>
|
||||||
@@ -129,9 +129,9 @@ class ComposerStaticInit8fb769e2bbbe11bb0307f5ba9e6722ef
|
|||||||
public static function getInitializer(ClassLoader $loader)
|
public static function getInitializer(ClassLoader $loader)
|
||||||
{
|
{
|
||||||
return \Closure::bind(function () use ($loader) {
|
return \Closure::bind(function () use ($loader) {
|
||||||
$loader->prefixLengthsPsr4 = ComposerStaticInit8fb769e2bbbe11bb0307f5ba9e6722ef::$prefixLengthsPsr4;
|
$loader->prefixLengthsPsr4 = ComposerStaticInit2a572b7cb1c49650721c1f7426949a4c::$prefixLengthsPsr4;
|
||||||
$loader->prefixDirsPsr4 = ComposerStaticInit8fb769e2bbbe11bb0307f5ba9e6722ef::$prefixDirsPsr4;
|
$loader->prefixDirsPsr4 = ComposerStaticInit2a572b7cb1c49650721c1f7426949a4c::$prefixDirsPsr4;
|
||||||
$loader->classMap = ComposerStaticInit8fb769e2bbbe11bb0307f5ba9e6722ef::$classMap;
|
$loader->classMap = ComposerStaticInit2a572b7cb1c49650721c1f7426949a4c::$classMap;
|
||||||
|
|
||||||
}, null, ClassLoader::class);
|
}, null, ClassLoader::class);
|
||||||
}
|
}
|
||||||
|
12
vendor/composer/installed.php
vendored
12
vendor/composer/installed.php
vendored
@@ -1,11 +1,11 @@
|
|||||||
<?php return array(
|
<?php return array(
|
||||||
'root' => array(
|
'root' => array(
|
||||||
'pretty_version' => 'dev-release/6.3.1',
|
'pretty_version' => 'dev-release/6.3.2',
|
||||||
'version' => 'dev-release/6.3.1',
|
'version' => 'dev-release/6.3.2',
|
||||||
'type' => 'wordpress-plugin',
|
'type' => 'wordpress-plugin',
|
||||||
'install_path' => __DIR__ . '/../../',
|
'install_path' => __DIR__ . '/../../',
|
||||||
'aliases' => array(),
|
'aliases' => array(),
|
||||||
'reference' => 'b5a7272b9b055ce77d66fde677421f816ed0e83d',
|
'reference' => '1d9382ce5301ebe8df492ad898947a5d4534b5b1',
|
||||||
'name' => 'woocommerce/woocommerce-subscriptions',
|
'name' => 'woocommerce/woocommerce-subscriptions',
|
||||||
'dev' => false,
|
'dev' => false,
|
||||||
),
|
),
|
||||||
@@ -41,12 +41,12 @@
|
|||||||
'dev_requirement' => false,
|
'dev_requirement' => false,
|
||||||
),
|
),
|
||||||
'woocommerce/woocommerce-subscriptions' => array(
|
'woocommerce/woocommerce-subscriptions' => array(
|
||||||
'pretty_version' => 'dev-release/6.3.1',
|
'pretty_version' => 'dev-release/6.3.2',
|
||||||
'version' => 'dev-release/6.3.1',
|
'version' => 'dev-release/6.3.2',
|
||||||
'type' => 'wordpress-plugin',
|
'type' => 'wordpress-plugin',
|
||||||
'install_path' => __DIR__ . '/../../',
|
'install_path' => __DIR__ . '/../../',
|
||||||
'aliases' => array(),
|
'aliases' => array(),
|
||||||
'reference' => 'b5a7272b9b055ce77d66fde677421f816ed0e83d',
|
'reference' => '1d9382ce5301ebe8df492ad898947a5d4534b5b1',
|
||||||
'dev_requirement' => false,
|
'dev_requirement' => false,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* Description: Sell products and services with recurring payments in your WooCommerce Store.
|
* Description: Sell products and services with recurring payments in your WooCommerce Store.
|
||||||
* Author: WooCommerce
|
* Author: WooCommerce
|
||||||
* Author URI: https://woocommerce.com/
|
* Author URI: https://woocommerce.com/
|
||||||
* Version: 6.3.1
|
* Version: 6.3.2
|
||||||
* Requires Plugins: woocommerce
|
* Requires Plugins: woocommerce
|
||||||
*
|
*
|
||||||
* WC requires at least: 7.9.0
|
* WC requires at least: 7.9.0
|
||||||
@@ -78,7 +78,7 @@ class WC_Subscriptions {
|
|||||||
public static $plugin_file = __FILE__;
|
public static $plugin_file = __FILE__;
|
||||||
|
|
||||||
/** @var string */
|
/** @var string */
|
||||||
public static $version = '6.3.1'; // WRCS: DEFINED_VERSION.
|
public static $version = '6.3.2'; // WRCS: DEFINED_VERSION.
|
||||||
|
|
||||||
/** @var string */
|
/** @var string */
|
||||||
public static $wc_minimum_supported_version = '7.7';
|
public static $wc_minimum_supported_version = '7.7';
|
||||||
|
Reference in New Issue
Block a user