Skip to content

Commit 9932a57

Browse files
author
WooCommerce
committed
Updates to 7.8.1
1 parent 7041a48 commit 9932a57

10 files changed

+76
-51
lines changed

changelog.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
*** WooCommerce Subscriptions Changelog ***
22

3+
2025-08-25 - version 7.8.1
4+
* Fix: Fix checkout button default label.
5+
* Fix: Fix error when WP CLI is enabled in some environments.
6+
37
2025-08-19 - version 7.8.0
48
* Add: Native support for subscriptions gifting. Gifting for WooCommerce Subscriptions extension is no longer required.
59
* Add: Enable subscriptions gifting storewide and per product.

includes/class-wc-subscriptions-plugin.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,14 @@ private function is_plugin_being_activated( string $plugin_slug ): bool {
318318
// Note that flags such as `--no-color` are filtered out of this array.
319319
$args = WP_CLI::get_runner()->arguments;
320320

321+
if ( ! is_countable( $args ) ) {
322+
return false;
323+
}
324+
321325
if (
322-
count( $args ) < 3
323-
|| $args[0] !== 'plugin'
324-
|| $args[1] !== 'activate'
326+
( count( $args ) < 3
327+
|| 'plugin' !== $args[0]
328+
|| 'activate' !== $args[1] )
325329
) {
326330
return false;
327331
}

includes/class-wcs-call-to-action-button-text-manager.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public static function add_settings( $settings ) {
3737
),
3838
array(
3939
'name' => __( 'Add to Cart Button Text', 'woocommerce-subscriptions' ),
40-
'desc' => __( 'A product displays a button with the text "Add to cart". By default, a subscription changes this to "Sign up now". You can customise the button text for subscriptions here.', 'woocommerce-subscriptions' ),
40+
'desc' => __( 'A product displays a button with the text "Add to cart". You can customise the button text for subscriptions here.', 'woocommerce-subscriptions' ),
4141
'tip' => '',
4242
'id' => WC_Subscriptions_Admin::$option_prefix . '_add_to_cart_button_text',
4343
'css' => 'min-width:150px;',
@@ -48,14 +48,14 @@ public static function add_settings( $settings ) {
4848
),
4949
array(
5050
'name' => __( 'Place Order Button Text', 'woocommerce-subscriptions' ),
51-
'desc' => __( 'Use this field to customise the text displayed on the checkout button when an order contains a subscription. Normally the checkout submission button displays "Place order". When the cart contains a subscription, this is changed to "Sign up now".', 'woocommerce-subscriptions' ),
51+
'desc' => __( 'Use this field to customise the text displayed on the checkout button when an order contains a subscription.', 'woocommerce-subscriptions' ),
5252
'tip' => '',
5353
'id' => WC_Subscriptions_Admin::$option_prefix . '_order_button_text',
5454
'css' => 'min-width:150px;',
55-
'default' => __( 'Add to cart', 'woocommerce-subscriptions' ),
55+
'default' => __( 'Place order', 'woocommerce-subscriptions' ),
5656
'type' => 'text',
5757
'desc_tip' => true,
58-
'placeholder' => __( 'Add to cart', 'woocommerce-subscriptions' ),
58+
'placeholder' => __( 'Place order', 'woocommerce-subscriptions' ),
5959
),
6060
array(
6161
'type' => 'sectionend',

includes/core/class-wc-subscriptions-checkout.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -656,13 +656,13 @@ public static function order_button_text( $button_text ) {
656656
}
657657

658658
/**
659-
* Filter the "Add to cart" button text for subscription carts.
659+
* Filter the "Place order" button text for subscription carts.
660660
*
661661
* @since 7.8.0
662-
* @param string $button_text The "Add to cart" button text.
663-
* @return string The "Add to cart" button text.
662+
* @param string $button_text The "Place order" button text.
663+
* @return string The "Place order" button text.
664664
*/
665-
return apply_filters( 'wcs_place_subscription_order_text', __( 'Add to cart', 'woocommerce-subscriptions' ) );
665+
return apply_filters( 'wcs_place_subscription_order_text', __( 'Place order', 'woocommerce-subscriptions' ) );
666666
}
667667

668668
/**

includes/gifting/class-wcsg-admin-welcome-announcement.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,11 @@ public static function enqueue_scripts() {
6767
*/
6868
public static function output_tour() {
6969
$screen = get_current_screen();
70+
// phpcs:ignore WordPress.Security.NonceVerification.Recommended
71+
$dashboard_path = isset( $_GET['path'] ) ? wc_clean( wp_unslash( $_GET['path'] ) ) : '';
7072

7173
// Only load on WooCommerce admin pages
72-
if ( ! $screen || 'woocommerce_page_wc-admin' !== $screen->id ) {
74+
if ( ! $screen || 'woocommerce_page_wc-admin' !== $screen->id || '/setup-wizard' === $dashboard_path ) {
7375
return;
7476
}
7577

includes/gifting/class-wcsg-email.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,10 @@ public static function maybe_send_recipient_order_emails( $order ) {
167167
*/
168168
public static function maybe_remove_wc_new_customer_email( $customer_id, $new_customer_data ) {
169169

170+
if ( ! WC()->cart || ! WC()->cart->cart_contents ) {
171+
return;
172+
}
173+
170174
foreach ( WC()->cart->cart_contents as $key => $item ) {
171175
if ( ! empty( $item['wcsg_gift_recipients_email'] ) ) {
172176
if ( $item['wcsg_gift_recipients_email'] == $new_customer_data['user_email'] ) { // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison
@@ -185,6 +189,10 @@ public static function maybe_remove_wc_new_customer_email( $customer_id, $new_cu
185189
*/
186190
public static function maybe_reattach_wc_new_customer_email( $customer_id, $new_customer_data ) {
187191

192+
if ( ! WC()->cart || ! WC()->cart->cart_contents ) {
193+
return;
194+
}
195+
188196
foreach ( WC()->cart->cart_contents as $key => $item ) {
189197
if ( ! empty( $item['wcsg_gift_recipients_email'] ) ) {
190198
if ( $item['wcsg_gift_recipients_email'] == $new_customer_data['user_email'] ) { // phpcs:ignore WordPress.PHP.StrictComparisons.LooseComparison
@@ -222,6 +230,10 @@ public static function generate_new_recipient_user_email( $purchaser_user_id, $r
222230
* @param bool $password_generated Whether the password has been generated for the customer.
223231
*/
224232
public static function send_new_recipient_user_email( $customer_id, $new_customer_data, $password_generated ) {
233+
if ( ! WC()->cart || ! WC()->cart->cart_contents ) {
234+
return;
235+
}
236+
225237
foreach ( WC()->cart->cart_contents as $key => $item ) {
226238
if ( isset( $item['wcsg_gift_recipients_email'] ) ) {
227239
if ( $item['wcsg_gift_recipients_email'] === $new_customer_data['user_email'] ) {

languages/woocommerce-subscriptions.pot

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
# This file is distributed under the GNU General Public License v3.0.
33
msgid ""
44
msgstr ""
5-
"Project-Id-Version: WooCommerce Subscriptions 7.8.0\n"
5+
"Project-Id-Version: WooCommerce Subscriptions 7.8.1\n"
66
"Report-Msgid-Bugs-To: https://woocommerce.com/contact-us\n"
77
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
88
"Language-Team: LANGUAGE <[email protected]>\n"
99
"MIME-Version: 1.0\n"
1010
"Content-Type: text/plain; charset=UTF-8\n"
1111
"Content-Transfer-Encoding: 8bit\n"
12-
"POT-Creation-Date: 2025-08-19T23:58:38+00:00\n"
12+
"POT-Creation-Date: 2025-08-25T23:35:15+00:00\n"
1313
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1414
"X-Generator: WP-CLI 2.11.0\n"
1515
"X-Domain: woocommerce-subscriptions\n"
@@ -1109,14 +1109,11 @@ msgid "Add to Cart Button Text"
11091109
msgstr ""
11101110

11111111
#: includes/class-wcs-call-to-action-button-text-manager.php:40
1112-
msgid "A product displays a button with the text \"Add to cart\". By default, a subscription changes this to \"Sign up now\". You can customise the button text for subscriptions here."
1112+
msgid "A product displays a button with the text \"Add to cart\". You can customise the button text for subscriptions here."
11131113
msgstr ""
11141114

11151115
#: includes/class-wcs-call-to-action-button-text-manager.php:44
11161116
#: includes/class-wcs-call-to-action-button-text-manager.php:47
1117-
#: includes/class-wcs-call-to-action-button-text-manager.php:55
1118-
#: includes/class-wcs-call-to-action-button-text-manager.php:58
1119-
#: includes/core/class-wc-subscriptions-checkout.php:665
11201117
#: includes/core/class-wc-subscriptions-product.php:1246
11211118
#: includes/core/class-wc-subscriptions-product.php:1278
11221119
msgid "Add to cart"
@@ -1127,7 +1124,13 @@ msgid "Place Order Button Text"
11271124
msgstr ""
11281125

11291126
#: includes/class-wcs-call-to-action-button-text-manager.php:51
1130-
msgid "Use this field to customise the text displayed on the checkout button when an order contains a subscription. Normally the checkout submission button displays \"Place order\". When the cart contains a subscription, this is changed to \"Sign up now\"."
1127+
msgid "Use this field to customise the text displayed on the checkout button when an order contains a subscription."
1128+
msgstr ""
1129+
1130+
#: includes/class-wcs-call-to-action-button-text-manager.php:55
1131+
#: includes/class-wcs-call-to-action-button-text-manager.php:58
1132+
#: includes/core/class-wc-subscriptions-checkout.php:665
1133+
msgid "Place order"
11311134
msgstr ""
11321135

11331136
#: includes/class-wcs-customer-suspension-manager.php:32
@@ -6348,13 +6351,13 @@ msgid "File %d"
63486351
msgstr ""
63496352

63506353
#. Translators: placeholder is a subscription ID.
6351-
#: includes/gifting/class-wcsg-email.php:390
6354+
#: includes/gifting/class-wcsg-email.php:402
63526355
msgctxt "Used in email heading before line items table, placeholder is subscription ID"
63536356
msgid "Subscription #%s"
63546357
msgstr ""
63556358

63566359
#. Translators: placeholder is an order ID.
6357-
#: includes/gifting/class-wcsg-email.php:393
6360+
#: includes/gifting/class-wcsg-email.php:405
63586361
msgctxt "Used in email heading before line items table, placeholder is order ID"
63596362
msgid "Order #%s"
63606363
msgstr ""

vendor/composer/installed.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php return array(
22
'root' => array(
33
'name' => 'woocommerce/woocommerce-subscriptions',
4-
'pretty_version' => 'dev-release/7.8.0',
5-
'version' => 'dev-release/7.8.0',
6-
'reference' => '4a23cafa810efb0cd9cf4f9210285810e98a7525',
4+
'pretty_version' => 'dev-release/7.8.1',
5+
'version' => 'dev-release/7.8.1',
6+
'reference' => '27f35a5449bcd854523318e5a189af6c53876f14',
77
'type' => 'wordpress-plugin',
88
'install_path' => __DIR__ . '/../../',
99
'aliases' => array(),
@@ -29,9 +29,9 @@
2929
'dev_requirement' => false,
3030
),
3131
'woocommerce/woocommerce-subscriptions' => array(
32-
'pretty_version' => 'dev-release/7.8.0',
33-
'version' => 'dev-release/7.8.0',
34-
'reference' => '4a23cafa810efb0cd9cf4f9210285810e98a7525',
32+
'pretty_version' => 'dev-release/7.8.1',
33+
'version' => 'dev-release/7.8.1',
34+
'reference' => '27f35a5449bcd854523318e5a189af6c53876f14',
3535
'type' => 'wordpress-plugin',
3636
'install_path' => __DIR__ . '/../../',
3737
'aliases' => array(),

vendor/composer/jetpack_autoload_classmap.php

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -479,91 +479,91 @@
479479
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-version-selector.php'
480480
),
481481
'WCSG_Admin' => array(
482-
'version' => 'dev-release/7.8.0',
482+
'version' => 'dev-release/7.8.1',
483483
'path' => $baseDir . '/includes/gifting/class-wcsg-admin.php'
484484
),
485485
'WCSG_Admin_System_Status' => array(
486-
'version' => 'dev-release/7.8.0',
486+
'version' => 'dev-release/7.8.1',
487487
'path' => $baseDir . '/includes/gifting/class-wcsg-admin-system-status.php'
488488
),
489489
'WCSG_Admin_Welcome_Announcement' => array(
490-
'version' => 'dev-release/7.8.0',
490+
'version' => 'dev-release/7.8.1',
491491
'path' => $baseDir . '/includes/gifting/class-wcsg-admin-welcome-announcement.php'
492492
),
493493
'WCSG_Cart' => array(
494-
'version' => 'dev-release/7.8.0',
494+
'version' => 'dev-release/7.8.1',
495495
'path' => $baseDir . '/includes/gifting/class-wcsg-cart.php'
496496
),
497497
'WCSG_Checkout' => array(
498-
'version' => 'dev-release/7.8.0',
498+
'version' => 'dev-release/7.8.1',
499499
'path' => $baseDir . '/includes/gifting/class-wcsg-checkout.php'
500500
),
501501
'WCSG_Download_Handler' => array(
502-
'version' => 'dev-release/7.8.0',
502+
'version' => 'dev-release/7.8.1',
503503
'path' => $baseDir . '/includes/gifting/class-wcsg-download-handler.php'
504504
),
505505
'WCSG_Email' => array(
506-
'version' => 'dev-release/7.8.0',
506+
'version' => 'dev-release/7.8.1',
507507
'path' => $baseDir . '/includes/gifting/class-wcsg-email.php'
508508
),
509509
'WCSG_Email_Completed_Renewal_Order' => array(
510-
'version' => 'dev-release/7.8.0',
510+
'version' => 'dev-release/7.8.1',
511511
'path' => $baseDir . '/includes/gifting/emails/class-wcsg-email-completed-renewal-order.php'
512512
),
513513
'WCSG_Email_Customer_New_Account' => array(
514-
'version' => 'dev-release/7.8.0',
514+
'version' => 'dev-release/7.8.1',
515515
'path' => $baseDir . '/includes/gifting/emails/class-wcsg-email-customer-new-account.php'
516516
),
517517
'WCSG_Email_Processing_Renewal_Order' => array(
518-
'version' => 'dev-release/7.8.0',
518+
'version' => 'dev-release/7.8.1',
519519
'path' => $baseDir . '/includes/gifting/emails/class-wcsg-email-processing-renewal-order.php'
520520
),
521521
'WCSG_Email_Recipient_New_Initial_Order' => array(
522-
'version' => 'dev-release/7.8.0',
522+
'version' => 'dev-release/7.8.1',
523523
'path' => $baseDir . '/includes/gifting/emails/class-wcsg-email-recipient-new-initial-order.php'
524524
),
525525
'WCSG_Memberships_Integration' => array(
526-
'version' => 'dev-release/7.8.0',
526+
'version' => 'dev-release/7.8.1',
527527
'path' => $baseDir . '/includes/gifting/class-wcsg-memberships-integration.php'
528528
),
529529
'WCSG_Privacy' => array(
530-
'version' => 'dev-release/7.8.0',
530+
'version' => 'dev-release/7.8.1',
531531
'path' => $baseDir . '/includes/gifting/privacy/class-wcsg-privacy.php'
532532
),
533533
'WCSG_Privacy_Erasers' => array(
534-
'version' => 'dev-release/7.8.0',
534+
'version' => 'dev-release/7.8.1',
535535
'path' => $baseDir . '/includes/gifting/privacy/class-wcsg-privacy-erasers.php'
536536
),
537537
'WCSG_Privacy_Exporters' => array(
538-
'version' => 'dev-release/7.8.0',
538+
'version' => 'dev-release/7.8.1',
539539
'path' => $baseDir . '/includes/gifting/privacy/class-wcsg-privacy-exporters.php'
540540
),
541541
'WCSG_Product' => array(
542-
'version' => 'dev-release/7.8.0',
542+
'version' => 'dev-release/7.8.1',
543543
'path' => $baseDir . '/includes/gifting/class-wcsg-product.php'
544544
),
545545
'WCSG_Query' => array(
546-
'version' => 'dev-release/7.8.0',
546+
'version' => 'dev-release/7.8.1',
547547
'path' => $baseDir . '/includes/gifting/class-wcsg-query.php'
548548
),
549549
'WCSG_Recipient_Addresses' => array(
550-
'version' => 'dev-release/7.8.0',
550+
'version' => 'dev-release/7.8.1',
551551
'path' => $baseDir . '/includes/gifting/class-wcsg-recipient-addresses.php'
552552
),
553553
'WCSG_Recipient_Details' => array(
554-
'version' => 'dev-release/7.8.0',
554+
'version' => 'dev-release/7.8.1',
555555
'path' => $baseDir . '/includes/gifting/class-wcsg-recipient-details.php'
556556
),
557557
'WCSG_Recipient_Management' => array(
558-
'version' => 'dev-release/7.8.0',
558+
'version' => 'dev-release/7.8.1',
559559
'path' => $baseDir . '/includes/gifting/class-wcsg-recipient-management.php'
560560
),
561561
'WCSG_Template_Loader' => array(
562-
'version' => 'dev-release/7.8.0',
562+
'version' => 'dev-release/7.8.1',
563563
'path' => $baseDir . '/includes/gifting/class-wcsg-template-loader.php'
564564
),
565565
'WCS_Gifting' => array(
566-
'version' => 'dev-release/7.8.0',
566+
'version' => 'dev-release/7.8.1',
567567
'path' => $baseDir . '/includes/gifting/class-wcs-gifting.php'
568568
),
569569
);

woocommerce-subscriptions.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Description: Sell products and services with recurring payments in your WooCommerce Store.
66
* Author: WooCommerce
77
* Author URI: https://woocommerce.com/
8-
* Version: 7.8.0
8+
* Version: 7.8.1
99
* Requires Plugins: woocommerce
1010
*
1111
* WC requires at least: 9.8.5
@@ -74,7 +74,7 @@ class WC_Subscriptions {
7474
public static $plugin_file = __FILE__;
7575

7676
/** @var string */
77-
public static $version = '7.8.0'; // WRCS: DEFINED_VERSION.
77+
public static $version = '7.8.1'; // WRCS: DEFINED_VERSION.
7878

7979
/** @var string */
8080
public static $wc_minimum_supported_version = '7.7';

0 commit comments

Comments
 (0)