Updates to 6.9.0

This commit is contained in:
WooCommerce
2024-11-27 10:17:15 +00:00
parent 8b0433022a
commit 8c0d9ae33c
17 changed files with 118 additions and 289 deletions

View File

@@ -1,210 +0,0 @@
#!/usr/bin/env bash
if [ $# -lt 3 ] && [ -z $WCPAY_DIR ]; then
echo "usage: $0 <db-name> <db-user> <db-pass> [db-host] [wp-version] [wc-version] [skip-database-creation]"
exit 1
fi
DB_NAME=${1-wcpay_tests}
DB_USER=${2-root}
DB_PASS=${3-$MYSQL_ROOT_PASSWORD}
DB_HOST=${4-$WORDPRESS_DB_HOST}
WP_VERSION=${5-latest}
WC_VERSION=${6-latest}
SKIP_DB_CREATE=${7-false}
TMPDIR=${TMPDIR-/tmp}
TMPDIR=$(echo $TMPDIR | sed -e "s/\/$//")
WP_TESTS_DIR=${WP_TESTS_DIR-$TMPDIR/wordpress-tests-lib}
WP_CORE_DIR=${WP_CORE_DIR-$TMPDIR/wordpress/}
download() {
if [ `which curl` ]; then
curl -s "$1" > "$2";
elif [ `which wget` ]; then
wget -nv -O "$2" "$1"
fi
}
wp() {
WORKING_DIR="$PWD"
cd "$WP_CORE_DIR"
if [ ! -f $TMPDIR/wp-cli.phar ]; then
download https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar "$TMPDIR/wp-cli.phar"
fi
php "$TMPDIR/wp-cli.phar" $@
cd "$WORKING_DIR"
}
get_db_connection_flags() {
# parse DB_HOST for port or socket references
local DB_HOST_PARTS=(${DB_HOST//\:/ })
local DB_HOSTNAME=${DB_HOST_PARTS[0]};
local DB_SOCK_OR_PORT=${DB_HOST_PARTS[1]};
local EXTRA_FLAGS=""
if ! [ -z $DB_HOSTNAME ] ; then
if [ $(echo $DB_SOCK_OR_PORT | grep -e '^[0-9]\{1,\}$') ]; then
EXTRA_FLAGS=" --host=$DB_HOSTNAME --port=$DB_SOCK_OR_PORT --protocol=tcp"
elif ! [ -z $DB_SOCK_OR_PORT ] ; then
EXTRA_FLAGS=" --socket=$DB_SOCK_OR_PORT"
elif ! [ -z $DB_HOSTNAME ] ; then
EXTRA_FLAGS=" --host=$DB_HOSTNAME --protocol=tcp"
fi
fi
echo "--user=$DB_USER --password=$DB_PASS $EXTRA_FLAGS";
}
wait_db() {
local MYSQLADMIN_FLAGS=$(get_db_connection_flags)
local WAITS=0
set +e
mysqladmin status $MYSQLADMIN_FLAGS > /dev/null
while [[ $? -ne 0 ]]; do
((WAITS++))
if [ $WAITS -ge 6 ]; then
echo "Maximum database wait time exceeded"
exit 1
fi;
echo "Waiting until the database is available..."
sleep 5s
mysqladmin status $MYSQLADMIN_FLAGS > /dev/null
done
set -e
}
if [[ $WP_VERSION =~ ^[0-9]+\.[0-9]+\-(beta|RC)[0-9]+$ ]]; then
WP_BRANCH=${WP_VERSION%\-*}
WP_TESTS_TAG="branches/$WP_BRANCH"
elif [[ $WP_VERSION =~ ^[0-9]+\.[0-9]+$ ]]; then
WP_TESTS_TAG="branches/$WP_VERSION"
elif [[ $WP_VERSION =~ [0-9]+\.[0-9]+\.[0-9]+ ]]; then
if [[ $WP_VERSION =~ [0-9]+\.[0-9]+\.[0] ]]; then
# version x.x.0 means the first release of the major version, so strip off the .0 and download version x.x
WP_TESTS_TAG="tags/${WP_VERSION%??}"
else
WP_TESTS_TAG="tags/$WP_VERSION"
fi
elif [[ $WP_VERSION == 'nightly' || $WP_VERSION == 'trunk' ]]; then
WP_TESTS_TAG="trunk"
else
# http serves a single offer, whereas https serves multiple. we only want one
download http://api.wordpress.org/core/version-check/1.7/ /tmp/wp-latest.json
grep '[0-9]+\.[0-9]+(\.[0-9]+)?' /tmp/wp-latest.json
LATEST_VERSION=$(grep -o '"version":"[^"]*' /tmp/wp-latest.json | sed 's/"version":"//')
if [[ -z "$LATEST_VERSION" ]]; then
echo "Latest WordPress version could not be found"
exit 1
fi
WP_TESTS_TAG="tags/$LATEST_VERSION"
fi
set -e
install_wp() {
if [ -d $WP_CORE_DIR ]; then
return;
fi
mkdir -p $WP_CORE_DIR
wp core download --version=$WP_VERSION
download https://raw.github.com/markoheijnen/wp-mysqli/master/db.php $WP_CORE_DIR/wp-content/db.php
}
configure_wp() {
WP_SITE_URL="http://local.wordpress.test"
wait_db
if [[ ! -f "$WP_CORE_DIR/wp-config.php" ]]; then
wp core config --dbname=$DB_NAME --dbuser=$DB_USER --dbpass=$DB_PASS --dbhost=$DB_HOST --dbprefix=wptests_
fi
wp core install --url="$WP_SITE_URL" --title="Example" --admin_user=admin --admin_password=password --admin_email=info@example.com --skip-email
}
install_test_suite() {
# portable in-place argument for both GNU sed and Mac OSX sed
if [[ $(uname -s) == 'Darwin' ]]; then
local ioption='-i.bak'
else
local ioption='-i'
fi
# set up testing suite if it doesn't yet exist
if [ ! -d $WP_TESTS_DIR ]; then
# set up testing suite
mkdir -p $WP_TESTS_DIR
svn co --quiet https://develop.svn.wordpress.org/${WP_TESTS_TAG}/tests/phpunit/includes/ $WP_TESTS_DIR/includes
svn co --quiet https://develop.svn.wordpress.org/${WP_TESTS_TAG}/tests/phpunit/data/ $WP_TESTS_DIR/data
fi
if [ ! -f wp-tests-config.php ]; then
download https://develop.svn.wordpress.org/${WP_TESTS_TAG}/wp-tests-config-sample.php "$WP_TESTS_DIR"/wp-tests-config.php
# remove all forward slashes in the end
WP_CORE_DIR=$(echo $WP_CORE_DIR | sed "s:/\+$::")
sed $ioption "s:dirname( __FILE__ ) . '/src/':'$WP_CORE_DIR/':" "$WP_TESTS_DIR"/wp-tests-config.php
sed $ioption "s/youremptytestdbnamehere/$DB_NAME/" "$WP_TESTS_DIR"/wp-tests-config.php
sed $ioption "s/yourusernamehere/$DB_USER/" "$WP_TESTS_DIR"/wp-tests-config.php
sed $ioption "s/yourpasswordhere/$DB_PASS/" "$WP_TESTS_DIR"/wp-tests-config.php
sed $ioption "s|localhost|${DB_HOST}|" "$WP_TESTS_DIR"/wp-tests-config.php
sed $ioption "s/example.org/woocommerce.com/" "$WP_TESTS_DIR"/wp-tests-config.php
sed $ioption "s/admin@example.org/tests@woocommerce.com/" "$WP_TESTS_DIR"/wp-tests-config.php
fi
}
install_db() {
if [ ${SKIP_DB_CREATE} = "true" ]; then
return 0
fi
wait_db
local MYSQLADMIN_FLAGS=$(get_db_connection_flags)
# drop database if exists
set +e
mysqladmin drop --force $DB_NAME $MYSQLADMIN_FLAGS &> /dev/null
set -e
# create database
mysqladmin create $DB_NAME $MYSQLADMIN_FLAGS
}
install_legacy_rest_api() {
wp plugin install https://downloads.wordpress.org/plugin/woocommerce-legacy-rest-api.1.0.4.zip --activate
}
install_woocommerce() {
WC_INSTALL_EXTRA=''
INSTALLED_WC_VERSION=$(wp plugin get woocommerce --field=version)
if [[ $WC_VERSION == 'beta' ]]; then
# Get the latest non-trunk version number from the .org repo. This will usually be the latest release, beta, or rc.
WC_VERSION=$(curl https://api.wordpress.org/plugins/info/1.0/woocommerce.json | jq -r '.versions | with_entries(select(.key|match("beta";"i"))) | keys[-1]' --sort-keys)
fi
if [[ -n $INSTALLED_WC_VERSION ]] && [[ $WC_VERSION == 'latest' ]]; then
# WooCommerce is already installed, we just must update it to the latest stable version
wp plugin update woocommerce
wp plugin activate woocommerce
else
if [[ $INSTALLED_WC_VERSION != $WC_VERSION ]]; then
# WooCommerce is installed but it's the wrong version, overwrite the installed version
WC_INSTALL_EXTRA+=" --force"
fi
if [[ $WC_VERSION != 'latest' ]] && [[ $WC_VERSION != 'beta' ]]; then
WC_INSTALL_EXTRA+=" --version=$WC_VERSION"
fi
wp plugin install woocommerce --activate$WC_INSTALL_EXTRA
fi
}
install_wp
install_db
configure_wp
install_test_suite
install_legacy_rest_api
install_woocommerce

View File

@@ -1,5 +1,9 @@
*** WooCommerce Subscriptions Changelog ***
2024-11-27 - version 6.9.1
* Fix: Resolved compatibility issues with WordPress 6.7 caused by translating strings too early.
* Dev: Update subscriptions-core to 7.7.2
2024-11-14 - version 6.9.0
* Add: New Customer Notification feature - sends reminder emails for upcoming subscription renewals, trials ending, and subscription expirations.
* Fix: Prevent adding products to the cart if a subscription renewal is already present.

View File

@@ -19,6 +19,19 @@ class WCS_Retry_Post_Store extends WCS_Retry_Store {
* @return null
*/
public function init() {
if ( did_action( 'init' ) ) {
$this->register_payment_retry_post();
} else {
add_action( 'init', [ $this, 'register_payment_retry_post' ] );
}
}
/**
* Registers the custom payment_retry post type.
*
* @return void
*/
public function register_payment_retry_post() {
register_post_type(
self::$post_type,
array(

View File

@@ -2,20 +2,20 @@
# This file is distributed under the same license as the WooCommerce Subscriptions plugin.
msgid ""
msgstr ""
"Project-Id-Version: WooCommerce Subscriptions 6.9.0\n"
"Project-Id-Version: WooCommerce Subscriptions 6.9.1\n"
"Report-Msgid-Bugs-To: https://woocommerce.com/contact-us\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"POT-Creation-Date: 2024-11-14T02:05:39+00:00\n"
"POT-Creation-Date: 2024-11-27T02:14:55+00:00\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"X-Generator: WP-CLI 2.11.0\n"
"X-Domain: woocommerce-subscriptions\n"
#. Plugin Name of the plugin
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:40
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:49
msgid "WooCommerce Subscriptions"
msgstr ""
@@ -1595,60 +1595,60 @@ msgstr ""
msgid "Payment retry attempted on renewal order with multiple related subscriptions with no payment method in common."
msgstr ""
#: includes/payment-retry/data-stores/class-wcs-retry-post-store.php:25
#: includes/payment-retry/data-stores/class-wcs-retry-post-store.php:38
msgid "Payment retry posts store details about the automatic retry of failed renewal payments."
msgstr ""
#: includes/payment-retry/data-stores/class-wcs-retry-post-store.php:35
#: includes/payment-retry/data-stores/class-wcs-retry-post-store.php:48
msgctxt "Post type name"
msgid "Renewal Payment Retries"
msgstr ""
#: includes/payment-retry/data-stores/class-wcs-retry-post-store.php:36
#: includes/payment-retry/data-stores/class-wcs-retry-post-store.php:49
msgid "Renewal Payment Retry"
msgstr ""
#: includes/payment-retry/data-stores/class-wcs-retry-post-store.php:37
#: includes/payment-retry/data-stores/class-wcs-retry-post-store.php:50
msgctxt "Admin menu name"
msgid "Renewal Payment Retries"
msgstr ""
#: includes/payment-retry/data-stores/class-wcs-retry-post-store.php:38
#: includes/payment-retry/data-stores/class-wcs-retry-post-store.php:51
msgid "Add"
msgstr ""
#: includes/payment-retry/data-stores/class-wcs-retry-post-store.php:39
#: includes/payment-retry/data-stores/class-wcs-retry-post-store.php:52
msgid "Add New Retry"
msgstr ""
#: includes/payment-retry/data-stores/class-wcs-retry-post-store.php:40
#: includes/payment-retry/data-stores/class-wcs-retry-post-store.php:53
#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:156
#: vendor/woocommerce/subscriptions-core/includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php:254
msgid "Edit"
msgstr ""
#: includes/payment-retry/data-stores/class-wcs-retry-post-store.php:41
#: includes/payment-retry/data-stores/class-wcs-retry-post-store.php:54
msgid "Edit Retry"
msgstr ""
#: includes/payment-retry/data-stores/class-wcs-retry-post-store.php:42
#: includes/payment-retry/data-stores/class-wcs-retry-post-store.php:55
msgid "New Retry"
msgstr ""
#: includes/payment-retry/data-stores/class-wcs-retry-post-store.php:43
#: includes/payment-retry/data-stores/class-wcs-retry-post-store.php:44
#: includes/payment-retry/data-stores/class-wcs-retry-post-store.php:56
#: includes/payment-retry/data-stores/class-wcs-retry-post-store.php:57
msgid "View Retry"
msgstr ""
#: includes/payment-retry/data-stores/class-wcs-retry-post-store.php:45
#: includes/payment-retry/data-stores/class-wcs-retry-post-store.php:58
msgid "Search Renewal Payment Retries"
msgstr ""
#: includes/payment-retry/data-stores/class-wcs-retry-post-store.php:46
#: includes/payment-retry/data-stores/class-wcs-retry-post-store.php:59
msgid "No retries found"
msgstr ""
#: includes/payment-retry/data-stores/class-wcs-retry-post-store.php:47
#: includes/payment-retry/data-stores/class-wcs-retry-post-store.php:60
msgid "No retries found in trash"
msgstr ""
@@ -3678,7 +3678,7 @@ msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-email-notifications.php:284
#: vendor/woocommerce/subscriptions-core/includes/emails/class-wcs-email-customer-notification.php:60
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:272
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:281
msgid "N/A"
msgstr ""
@@ -4653,19 +4653,19 @@ msgstr ""
msgid "That subscription can not be changed to %s. Please contact us if you need assistance."
msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-customer-store-cached-cpt.php:80
#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-customer-store-cached-cpt.php:87
msgid "Generate Customer Subscription Cache"
msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-customer-store-cached-cpt.php:80
#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-customer-store-cached-cpt.php:87
msgid "This will generate the persistent cache for linking users with subscriptions. The caches will be generated overtime in the background (via Action Scheduler)."
msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-customer-store-cached-cpt.php:81
#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-customer-store-cached-cpt.php:88
msgid "Delete Customer Subscription Cache"
msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-customer-store-cached-cpt.php:81
#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-customer-store-cached-cpt.php:88
msgid "This will clear the persistent cache of all of subscriptions stored against users in your store. Expect slower performance of checkout, renewal and other subscription related functions after taking this action. The caches will be regenerated overtime as queries to find a given user's subscriptions are run."
msgstr ""
@@ -4689,19 +4689,19 @@ msgstr ""
msgid "Something went wrong when trying to restore subscription %d from the trash. It could not be restored."
msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-related-order-store-cached-cpt.php:108
#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-related-order-store-cached-cpt.php:115
msgid "Generate Related Order Cache"
msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-related-order-store-cached-cpt.php:108
#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-related-order-store-cached-cpt.php:115
msgid "This will generate the persistent cache of all renewal, switch, resubscribe and other order types for all subscriptions in your store. The caches will be generated overtime in the background (via Action Scheduler)."
msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-related-order-store-cached-cpt.php:109
#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-related-order-store-cached-cpt.php:116
msgid "Delete Related Order Cache"
msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-related-order-store-cached-cpt.php:109
#: vendor/woocommerce/subscriptions-core/includes/data-stores/class-wcs-related-order-store-cached-cpt.php:116
msgid "This will clear the persistent cache of all renewal, switch, resubscribe and other order types for all subscriptions in your store. Expect slower performance of checkout, renewal and other subscription related functions after taking this action. The caches will be regenerated overtime as related order queries are run."
msgstr ""
@@ -5522,76 +5522,76 @@ msgstr ""
msgid "Email Address"
msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:43
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:44
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:52
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:53
msgid "Subscriptions Data"
msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:94
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:103
msgid "By using WooCommerce Subscriptions, you may be storing personal data and depending on which third-party payment processors youre using to take subscription payments, you may be sharing personal data with external sources."
msgstr ""
#. translators: placeholders are opening and closing link tags, linking to additional privacy policy documentation.
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:96
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:105
msgid "What we collect and store"
msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:97
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:106
msgid "For the purposes of processing recurring subscription payments, we store the customer's name, billing address, shipping address, email address, phone number and credit card/payment details."
msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:98
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:107
msgid "What we share with others"
msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:99
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:108
msgid "What personal information your store shares with external sources depends on which third-party payment processor plugins you are using to collect subscription payments. We recommend that you consult with their privacy policies to inform this section of your privacy policy."
msgstr ""
#. translators: placeholders are opening and closing link tags, linking to additional privacy policy documentation.
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:101
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:110
msgid "If you are using PayPal Standard or PayPal Reference transactions please see the %1$sPayPal Privacy Policy%2$s for more details."
msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:114
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:362
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:123
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:371
msgid "Cancel and remove personal data"
msgstr ""
#. translators: %d: number of subscriptions affected.
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:212
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:221
msgid "Removed personal data from %d subscription."
msgid_plural "Removed personal data from %d subscriptions."
msgstr[0] ""
msgstr[1] ""
#. translators: placeholders are opening and closing tags.
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:231
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:240
msgid "%1$sNote:%2$s Orders which are related to subscriptions will not be included in the orders affected by these settings."
msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:251
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:260
msgid "account erasure request"
msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:257
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:266
msgid "Remove personal data from subscriptions"
msgstr ""
#. Translators: %s URL to erasure request screen.
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:259
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:268
msgid "When handling an %s, should personal data within subscriptions be retained or removed?"
msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:268
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:277
msgid "Retain ended subscriptions"
msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:269
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:278
msgid "Retain ended subscriptions and their related orders for a specified duration before anonymizing the personal data within them."
msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:313
#: vendor/woocommerce/subscriptions-core/includes/privacy/class-wcs-privacy.php:322
msgid "Customers with a subscription are excluded from this setting."
msgstr ""

2
vendor/autoload.php vendored
View File

@@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
require_once __DIR__ . '/composer/autoload_real.php';
return ComposerAutoloaderInitf715afa45653daac47d4c3d21522dae0::getLoader();
return ComposerAutoloaderInitf69ce3861bce49b808df374cef4fccba::getLoader();

View File

@@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
class ComposerAutoloaderInitf715afa45653daac47d4c3d21522dae0
class ComposerAutoloaderInitf69ce3861bce49b808df374cef4fccba
{
private static $loader;
@@ -24,12 +24,12 @@ class ComposerAutoloaderInitf715afa45653daac47d4c3d21522dae0
require __DIR__ . '/platform_check.php';
spl_autoload_register(array('ComposerAutoloaderInitf715afa45653daac47d4c3d21522dae0', 'loadClassLoader'), true, true);
spl_autoload_register(array('ComposerAutoloaderInitf69ce3861bce49b808df374cef4fccba', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
spl_autoload_unregister(array('ComposerAutoloaderInitf715afa45653daac47d4c3d21522dae0', 'loadClassLoader'));
spl_autoload_unregister(array('ComposerAutoloaderInitf69ce3861bce49b808df374cef4fccba', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
call_user_func(\Composer\Autoload\ComposerStaticInitf715afa45653daac47d4c3d21522dae0::getInitializer($loader));
call_user_func(\Composer\Autoload\ComposerStaticInitf69ce3861bce49b808df374cef4fccba::getInitializer($loader));
$loader->register(true);

View File

@@ -4,7 +4,7 @@
namespace Composer\Autoload;
class ComposerStaticInitf715afa45653daac47d4c3d21522dae0
class ComposerStaticInitf69ce3861bce49b808df374cef4fccba
{
public static $prefixLengthsPsr4 = array (
'C' =>
@@ -129,9 +129,9 @@ class ComposerStaticInitf715afa45653daac47d4c3d21522dae0
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
$loader->prefixLengthsPsr4 = ComposerStaticInitf715afa45653daac47d4c3d21522dae0::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitf715afa45653daac47d4c3d21522dae0::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitf715afa45653daac47d4c3d21522dae0::$classMap;
$loader->prefixLengthsPsr4 = ComposerStaticInitf69ce3861bce49b808df374cef4fccba::$prefixLengthsPsr4;
$loader->prefixDirsPsr4 = ComposerStaticInitf69ce3861bce49b808df374cef4fccba::$prefixDirsPsr4;
$loader->classMap = ComposerStaticInitf69ce3861bce49b808df374cef4fccba::$classMap;
}, null, ClassLoader::class);
}

View File

@@ -156,17 +156,17 @@
},
{
"name": "woocommerce/subscriptions-core",
"version": "7.7.1",
"version_normalized": "7.7.1.0",
"version": "7.7.2",
"version_normalized": "7.7.2.0",
"source": {
"type": "git",
"url": "https://github.com/Automattic/woocommerce-subscriptions-core.git",
"reference": "07bf070a5b2c9716bb20280055c4f3f07d83faed"
"reference": "f4bce1c1368e0e547922df7580ad578b0c9beea2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/Automattic/woocommerce-subscriptions-core/zipball/07bf070a5b2c9716bb20280055c4f3f07d83faed",
"reference": "07bf070a5b2c9716bb20280055c4f3f07d83faed",
"url": "https://api.github.com/repos/Automattic/woocommerce-subscriptions-core/zipball/f4bce1c1368e0e547922df7580ad578b0c9beea2",
"reference": "f4bce1c1368e0e547922df7580ad578b0c9beea2",
"shasum": ""
},
"require": {
@@ -179,7 +179,7 @@
"woocommerce/woocommerce-sniffs": "0.1.0",
"yoast/phpunit-polyfills": "1.1.0"
},
"time": "2024-11-13T23:26:20+00:00",
"time": "2024-11-27T00:02:10+00:00",
"type": "wordpress-plugin",
"extra": {
"phpcodesniffer-search-depth": 2
@@ -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.7.1",
"source": "https://github.com/Automattic/woocommerce-subscriptions-core/tree/7.7.2",
"issues": "https://github.com/Automattic/woocommerce-subscriptions-core/issues"
},
"install-path": "../woocommerce/subscriptions-core"

View File

@@ -1,9 +1,9 @@
<?php return array(
'root' => array(
'name' => 'woocommerce/woocommerce-subscriptions',
'pretty_version' => 'dev-release/6.9.0',
'version' => 'dev-release/6.9.0',
'reference' => 'a8ffc66efa71aa0598db1c342818a4cdccfc85cb',
'pretty_version' => 'dev-release/6.9.1',
'version' => 'dev-release/6.9.1',
'reference' => 'c2bc23e1cc88e5c38bc2cc63365cca6a2a7dd741',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -32,18 +32,18 @@
),
),
'woocommerce/subscriptions-core' => array(
'pretty_version' => '7.7.1',
'version' => '7.7.1.0',
'reference' => '07bf070a5b2c9716bb20280055c4f3f07d83faed',
'pretty_version' => '7.7.2',
'version' => '7.7.2.0',
'reference' => 'f4bce1c1368e0e547922df7580ad578b0c9beea2',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../woocommerce/subscriptions-core',
'aliases' => array(),
'dev_requirement' => false,
),
'woocommerce/woocommerce-subscriptions' => array(
'pretty_version' => 'dev-release/6.9.0',
'version' => 'dev-release/6.9.0',
'reference' => 'a8ffc66efa71aa0598db1c342818a4cdccfc85cb',
'pretty_version' => 'dev-release/6.9.1',
'version' => 'dev-release/6.9.1',
'reference' => 'c2bc23e1cc88e5c38bc2cc63365cca6a2a7dd741',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),

View File

@@ -1,5 +1,8 @@
*** WooCommerce Subscriptions Core Changelog ***
= 7.7.2 - 2024-11-26 =
* Fix - Prevents notices being displayed on WordPress 6.7 due to loading translations too early.
= 7.7.1 - 2024-11-13 =
* Fix - Only show the individual subscription information in customer notification emails, not all subscriptions purchased in the initial order.
* Fix - Resolved issues with Customer Notification emails not being sent due to unsupported emoji used in the default email subject.

View File

@@ -16,7 +16,7 @@ class WC_Subscriptions_Core_Plugin {
* The version of subscriptions-core library.
* @var string
*/
protected $library_version = '7.7.1'; // WRCS: DEFINED_VERSION.
protected $library_version = '7.7.2'; // WRCS: DEFINED_VERSION.
/**
* The subscription scheduler instance.

View File

@@ -70,13 +70,20 @@ class WCS_Customer_Store_Cached_CPT extends WCS_Customer_Store_CPT implements WC
$this->object_data_cache_manager->init();
add_action( 'init', array( $this, 'register_debug_tools' ) );
// When a user is first added, make sure the subscription cache is empty because it can not have any data yet, and we want to avoid running the query needlessly
add_filter( 'user_register', array( $this, 'set_empty_cache' ) );
// When the post for a subscription is change, make sure the corresponding cache is updated
add_action( 'wcs_update_post_meta_caches', array( $this, 'maybe_update_for_post_meta_change' ), 10, 5 );
add_action( 'wcs_delete_all_post_meta_caches', array( $this, 'maybe_delete_all_for_post_meta_change' ), 10, 1 );
}
/**
* Register debug tools for managing the cache.
*/
public function register_debug_tools() {
WCS_Debug_Tool_Factory::add_cache_tool( 'generator', __( 'Generate Customer Subscription Cache', 'woocommerce-subscriptions' ), __( 'This will generate the persistent cache for linking users with subscriptions. The caches will be generated overtime in the background (via Action Scheduler).', 'woocommerce-subscriptions' ), self::instance() );
WCS_Debug_Tool_Factory::add_cache_tool( 'eraser', __( 'Delete Customer Subscription Cache', 'woocommerce-subscriptions' ), __( 'This will clear the persistent cache of all of subscriptions stored against users in your store. Expect slower performance of checkout, renewal and other subscription related functions after taking this action. The caches will be regenerated overtime as queries to find a given user\'s subscriptions are run.', 'woocommerce-subscriptions' ), self::instance() );
}

View File

@@ -92,6 +92,8 @@ class WCS_Related_Order_Store_Cached_CPT extends WCS_Related_Order_Store_CPT imp
$this->object_data_cache_manager->init();
add_action( 'init', array( $this, 'register_debug_tools' ) );
// When a subscription is being read from the database, don't load cached related order meta data into subscriptions.
add_filter( 'wcs_subscription_data_store_props_to_ignore', array( $this, 'add_related_order_cache_props' ), 10, 2 );
@@ -104,7 +106,12 @@ class WCS_Related_Order_Store_Cached_CPT extends WCS_Related_Order_Store_CPT imp
// When copying meta from a subscription to a renewal order, don't copy cache related order meta keys.
add_filter( 'wc_subscriptions_renewal_order_data', array( $this, 'remove_related_order_cache_keys' ), 10, 1 );
}
/**
* Register debug tools for managing the cache.
*/
public function register_debug_tools() {
WCS_Debug_Tool_Factory::add_cache_tool( 'generator', __( 'Generate Related Order Cache', 'woocommerce-subscriptions' ), __( 'This will generate the persistent cache of all renewal, switch, resubscribe and other order types for all subscriptions in your store. The caches will be generated overtime in the background (via Action Scheduler).', 'woocommerce-subscriptions' ), self::instance() );
WCS_Debug_Tool_Factory::add_cache_tool( 'eraser', __( 'Delete Related Order Cache', 'woocommerce-subscriptions' ), __( 'This will clear the persistent cache of all renewal, switch, resubscribe and other order types for all subscriptions in your store. Expect slower performance of checkout, renewal and other subscription related functions after taking this action. The caches will be regenerated overtime as related order queries are run.', 'woocommerce-subscriptions' ), self::instance() );
}

View File

@@ -37,7 +37,16 @@ class WCS_Privacy extends WC_Abstract_Privacy {
self::$background_process = new WCS_Privacy_Background_Updater();
}
parent::__construct( __( 'WooCommerce Subscriptions', 'woocommerce-subscriptions' ) );
parent::__construct();
add_action( 'init', array( $this, 'register_erasers_exporters' ) );
}
/**
* Register erasers and exporters.
*/
public function register_erasers_exporters() {
$this->name = __( 'WooCommerce Subscriptions', 'woocommerce-subscriptions' );
// Add our exporters and erasers.
$this->add_exporter( 'woocommerce-subscriptions-data', __( 'Subscriptions Data', 'woocommerce-subscriptions' ), array( 'WCS_Privacy_Exporters', 'subscription_data_exporter' ) );

View File

@@ -603,11 +603,7 @@ function wcs_is_wc_feature_enabled( $feature_name ) {
* @return bool
*/
function wcs_is_custom_order_tables_usage_enabled() {
if ( ! class_exists( '\Automattic\WooCommerce\Utilities\OrderUtil' ) || ! wcs_is_wc_feature_enabled( 'custom_order_tables' ) ) {
return false;
}
return \Automattic\WooCommerce\Utilities\OrderUtil::custom_orders_table_usage_is_enabled();
return class_exists( '\Automattic\WooCommerce\Utilities\OrderUtil' ) && \Automattic\WooCommerce\Utilities\OrderUtil::custom_orders_table_usage_is_enabled();
}
/**

View File

@@ -6,5 +6,5 @@
* Author: Automattic
* Author URI: https://woocommerce.com/
* Requires WP: 5.6
* Version: 7.7.1
* Version: 7.7.2
*/

View File

@@ -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.9.0
* Version: 6.9.1
* Requires Plugins: woocommerce
*
* WC requires at least: 8.7.1
@@ -78,7 +78,7 @@ class WC_Subscriptions {
public static $plugin_file = __FILE__;
/** @var string */
public static $version = '6.9.0'; // WRCS: DEFINED_VERSION.
public static $version = '6.9.1'; // WRCS: DEFINED_VERSION.
/** @var string */
public static $wc_minimum_supported_version = '7.7';