diff --git a/.nvmrc b/.nvmrc
new file mode 100644
index 0000000..a3597ec
--- /dev/null
+++ b/.nvmrc
@@ -0,0 +1 @@
+20.11
diff --git a/changelog.txt b/changelog.txt
index b4deca2..641bb8d 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,5 +1,24 @@
*** WooCommerce Subscriptions Changelog ***
+2025-02-13 - version 7.2.1
+* Fix: Revert a change released in 7.2.0 which triggered the "woocommerce_cart_item_name" filter with the wrong number of parameters.
+* Dev: Update subscriptions-core to 8.0.1.
+
+2025-02-13 - version 7.2.0
+* Fix: In the system status report, show correct icon in the Cache Update Failures section when the total failures is 0.
+* Fix: Recommend WooPayments when there is no available payment gateway.
+* Fix: Safeguards added to the Subscriptions Totals template used in the My Account area, to guard against fatal errors that could arise in unusual conditions.
+* Fix: Correctly load product names with HTML on the cart and checkout shipping rates.
+* Fix: Improve our admin notice handling to ensure notices are displayed to the intended admin user.
+* Fix: Improve protections around the pending renewal order-creation process, to prevent uncaught exceptions and other errors from breaking the subscription editor.
+* Fix: Prevent unnecessary subscription object lookups on non-subscription admin pages when global $post is set.
+* Fix: After enabling the Customer Notification feature or changing the reminder timing setting, ensure notifications are correctly scheduled for all subscriptions with pending cancellation status.
+* Update: Improve performance of displaying recurring coupon limits in the admin coupon list table by optimizing coupon object retrieval.
+* Update: Display the subscription items table in all customer notification emails.
+* Update: Subscription notes for unsent customer notification emails now only occurs if WCS_DEBUG is enabled.
+* Dev: Introduces a new `woocommerce_subscription_valid_customer_notification_types` filter to modify which notification types are scheduled in Action Scheduler.
+* Dev: Update subscriptions-core to 8.0.0.
+
2025-01-10 - version 7.1.0
* Add: Compatibility with WooCommerce's new preview email feature introduced in 9.6.
* Fix: Prevents PHP fatal error when wcs_can_user_renew_early() is called with a non-existent subscription ID.
diff --git a/includes/admin/reports/class-wcs-report-cache-manager.php b/includes/admin/reports/class-wcs-report-cache-manager.php
index 79b763f..6d52bdc 100644
--- a/includes/admin/reports/class-wcs-report-cache-manager.php
+++ b/includes/admin/reports/class-wcs-report-cache-manager.php
@@ -321,7 +321,7 @@ class WCS_Report_Cache_Manager {
'label' => 'Cache Update Failures',
/* translators: %d refers to the number of times we have detected cache update failures */
'note' => sprintf( _n( '%d failures', '%d failure', $failures, 'woocommerce-subscriptions' ), $failures ),
- 'success' => 0 === $failures,
+ 'success' => 0 === (int)$failures,
),
);
diff --git a/includes/admin/reports/class-wcs-report-subscription-events-by-date.php b/includes/admin/reports/class-wcs-report-subscription-events-by-date.php
index 1d26e30..c6f14f1 100644
--- a/includes/admin/reports/class-wcs-report-subscription-events-by-date.php
+++ b/includes/admin/reports/class-wcs-report-subscription-events-by-date.php
@@ -473,7 +473,8 @@ class WCS_Report_Subscription_Events_By_Date extends WC_Admin_Report {
// Remove this class from the list of classes WC updates on shutdown. Introduced in WC 3.7
if ( ! wcs_is_woocommerce_pre( '3.7' ) ) {
- unset( WC_Admin_Report::$transients_to_update[ strtolower( get_class( $this ) ) ] );
+ $class_name = strtolower( get_class( $this ) );
+ unset( WC_Admin_Report::$transients_to_update[ $class_name ] );
}
}
}
diff --git a/includes/class-wcs-limited-recurring-coupon-manager.php b/includes/class-wcs-limited-recurring-coupon-manager.php
index eca80a1..58c3ae6 100644
--- a/includes/class-wcs-limited-recurring-coupon-manager.php
+++ b/includes/class-wcs-limited-recurring-coupon-manager.php
@@ -77,28 +77,33 @@ class WCS_Limited_Recurring_Coupon_Manager {
* Get the number of renewals for a limited coupon.
*
* @since 4.0.0
- * @param string $code The coupon code.
+ * @param string|WC_Coupon $coupon The coupon or coupon code.
* @return false|int False for non-recurring coupons, or the limit number for recurring coupons.
* A value of 0 is for unlimited usage.
*/
- public static function get_coupon_limit( $code ) {
- if ( wcs_is_woocommerce_pre( '3.2' ) ) {
+ public static function get_coupon_limit( $coupon ) {
+ // If we have a coupon code, attempt to get the coupon object.
+ if ( is_string( $coupon ) ) {
+ $coupon = new WC_Coupon( $coupon );
+ }
+
+ if ( ! $coupon instanceof WC_Coupon ) {
return false;
}
- // Retrieve the coupon data.
- $coupon = new WC_Coupon( $code );
$coupon_type = $coupon->get_discount_type();
// If we have a virtual coupon, attempt to get the original coupon.
if ( WC_Subscriptions_Coupon::is_renewal_cart_coupon( $coupon_type ) ) {
- $coupon = WC_Subscriptions_Coupon::map_virtual_coupon( $code );
+ $coupon = WC_Subscriptions_Coupon::map_virtual_coupon( $coupon->get_code() );
$coupon_type = $coupon->get_discount_type();
}
- $limited = $coupon->get_meta( self::$coupons_renewals );
+ if ( ! WC_Subscriptions_Coupon::is_recurring_coupon( $coupon_type ) ) {
+ return false;
+ }
- return WC_Subscriptions_Coupon::is_recurring_coupon( $coupon_type ) ? intval( $limited ) : false;
+ return intval( $coupon->get_meta( self::$coupons_renewals ) );
}
/**
@@ -266,11 +271,16 @@ class WCS_Limited_Recurring_Coupon_Manager {
* @param int $id The coupon ID.
*/
public static function add_limit_to_list_table( $column_name, $id ) {
+ global $the_coupon;
+
if ( 'usage' !== $column_name ) {
return;
}
- $limit = self::get_coupon_limit( wc_get_coupon_code_by_id( $id ) );
+ // Confirm the global coupon object is the one we're looking for, otherwise fetch it.
+ $coupon = empty( $the_coupon ) || $the_coupon->get_id() !== $id ? new WC_Coupon( $id ) : $the_coupon;
+ $limit = self::get_coupon_limit( $coupon );
+
if ( false === $limit ) {
return;
}
diff --git a/languages/woocommerce-subscriptions.pot b/languages/woocommerce-subscriptions.pot
index c3c125b..a68deae 100644
--- a/languages/woocommerce-subscriptions.pot
+++ b/languages/woocommerce-subscriptions.pot
@@ -2,14 +2,14 @@
# This file is distributed under the same license as the WooCommerce Subscriptions plugin.
msgid ""
msgstr ""
-"Project-Id-Version: WooCommerce Subscriptions 7.1.0\n"
+"Project-Id-Version: WooCommerce Subscriptions 7.2.1\n"
"Report-Msgid-Bugs-To: https://woocommerce.com/contact-us\n"
"Last-Translator: FULL NAME \n"
"Language-Team: LANGUAGE \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"POT-Creation-Date: 2025-01-10T00:50:30+00:00\n"
+"POT-Creation-Date: 2025-02-13T11:09:03+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"
@@ -48,7 +48,7 @@ msgid "Subscription reports are incompatible with the %1$sWooCommerce data stora
msgstr ""
#: includes/admin/class-wcs-admin-reports.php:81
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:922
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:923
#: includes/api/class-wc-rest-subscriptions-settings.php:29
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1028
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1180
@@ -321,148 +321,148 @@ msgid "subscriptions"
msgstr ""
#. translators: %s: formatted total amount.
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:493
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:494
msgid "%s signup revenue in this period"
msgstr ""
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:494
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:495
msgid "The sum of all subscription parent orders, including other items, fees, tax and shipping."
msgstr ""
#. translators: %s: formatted total amount.
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:501
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:502
msgid "%s renewal revenue in this period"
msgstr ""
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:502
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:503
msgid "The sum of all renewal orders including tax and shipping."
msgstr ""
#. translators: %s: formatted total amount.
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:509
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:510
msgid "%s resubscribe revenue in this period"
msgstr ""
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:510
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:511
msgid "The sum of all resubscribe orders including tax and shipping."
msgstr ""
#. translators: %s: formatted total amount.
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:517
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:518
msgid "%s switch revenue in this period"
msgstr ""
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:518
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:519
msgid "The sum of all switch orders including tax and shipping."
msgstr ""
#. translators: 2: link opening tag, 1: subscription count and closing tag.
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:526
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:527
msgid "%2$s %1$s new subscriptions"
msgstr ""
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:540
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:541
msgid "The number of subscriptions created during this period, either by being manually created, imported or a customer placing an order. This includes orders pending payment."
msgstr ""
#. translators: 2: link opening tag, 1: subscription count and closing tag.
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:548
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:549
msgid "%2$s %1$s subscription signups"
msgstr ""
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:562
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:563
msgid "The number of subscriptions purchased in parent orders created during this period. This represents the new subscriptions created by customers placing an order via checkout."
msgstr ""
#. translators: 2: link opening tag, 1: subscription count and closing tag.
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:570
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:571
msgid "%2$s %1$s subscription resubscribes"
msgstr ""
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:584
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:585
msgid "The number of resubscribe orders processed during this period."
msgstr ""
#. translators: 2: link opening tag, 1: subscription count and closing tag.
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:592
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:593
msgid "%2$s %1$s subscription renewals"
msgstr ""
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:606
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:607
msgid "The number of renewal orders processed during this period."
msgstr ""
#. translators: 2: link opening tag, 1: subscription count and closing tag.
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:614
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:615
msgid "%2$s %1$s subscription switches"
msgstr ""
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:628
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:629
msgid "The number of subscriptions upgraded, downgraded or cross-graded during this period."
msgstr ""
#. translators: 2: link opening tag, 1: subscription count and closing tag.
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:636
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:637
msgid "%2$s %1$s subscription cancellations"
msgstr ""
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:650
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:651
msgid "The number of subscriptions cancelled by the customer or store manager during this period. The pre-paid term may not yet have ended during this period."
msgstr ""
#. translators: 2: link opening tag, 1: subscription count and closing tag.
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:658
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:659
msgid "%2$s %1$s ended subscriptions"
msgstr ""
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:672
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:673
msgid "The number of subscriptions which have either expired or reached the end of the prepaid term if it was previously cancelled."
msgstr ""
#. translators: 2: link opening tag, 1: subscription count and closing tag.
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:683
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:684
msgid "%2$s %1$s current subscriptions"
msgstr ""
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:698
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:699
msgid "The number of subscriptions during this period with an end date in the future and a status other than pending."
msgstr ""
#. translators: %s: subscription net gain (with percentage).
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:715
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:716
msgid "%s net subscription gain"
msgstr ""
#. translators: %s: subscription net loss (with percentage).
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:718
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:719
msgid "%s net subscription loss"
msgstr ""
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:723
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:724
msgid "Change in subscriptions between the start and end of the period."
msgstr ""
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:737
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:738
#: includes/admin/reports/class-wcs-report-subscription-payment-retry.php:159
msgid "Year"
msgstr ""
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:738
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:739
#: includes/admin/reports/class-wcs-report-subscription-payment-retry.php:160
msgid "Last Month"
msgstr ""
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:739
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:740
#: includes/admin/reports/class-wcs-report-subscription-payment-retry.php:161
msgid "This Month"
msgstr ""
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:740
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:741
#: includes/admin/reports/class-wcs-report-subscription-payment-retry.php:162
msgid "Last 7 Days"
msgstr ""
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:781
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:782
#: includes/admin/reports/class-wcs-report-subscription-payment-retry.php:195
#: 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
@@ -471,53 +471,53 @@ msgstr ""
msgid "Date"
msgstr ""
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:785
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:786
#: includes/admin/reports/class-wcs-report-subscription-payment-retry.php:199
#: includes/admin/reports/class-wcs-report-upcoming-recurring-revenue.php:226
msgid "Export CSV"
msgstr ""
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:844
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:845
msgid "Switched subscriptions"
msgstr ""
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:860
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:861
msgid "New Subscriptions"
msgstr ""
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:876
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:877
msgid "Subscriptions signups"
msgstr ""
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:891
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:892
msgid "Number of resubscribes"
msgstr ""
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:906
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:907
msgid "Number of renewals"
msgstr ""
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:938
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:939
msgid "Subscriptions Ended"
msgstr ""
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:954
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:955
msgid "Cancellations"
msgstr ""
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:969
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:970
msgid "Signup Totals"
msgstr ""
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:989
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:990
msgid "Resubscribe Totals"
msgstr ""
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:1009
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:1010
msgid "Renewal Totals"
msgstr ""
-#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:1029
+#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:1030
msgid "Switch Totals"
msgstr ""
@@ -1168,24 +1168,24 @@ msgid "Coupon will be limited to the given number of payments. It will then be a
msgstr ""
#. translators: %1$s is the coupon code, %2$d is the number of payment usages
-#: includes/class-wcs-limited-recurring-coupon-manager.php:247
+#: includes/class-wcs-limited-recurring-coupon-manager.php:252
msgid "Limited use coupon \"%1$s\" removed from subscription. It has been used %2$d time."
msgid_plural "Limited use coupon \"%1$s\" removed from subscription. It has been used %2$d times."
msgstr[0] ""
msgstr[1] ""
#. translators: %d refers to the number of payments the coupon can be used for.
-#: includes/class-wcs-limited-recurring-coupon-manager.php:282
+#: includes/class-wcs-limited-recurring-coupon-manager.php:292
msgid "Active for %d payment"
msgid_plural "Active for %d payments"
msgstr[0] ""
msgstr[1] ""
-#: includes/class-wcs-limited-recurring-coupon-manager.php:286
+#: includes/class-wcs-limited-recurring-coupon-manager.php:296
msgid "Active for unlimited payments"
msgstr ""
-#: includes/class-wcs-limited-recurring-coupon-manager.php:378
+#: includes/class-wcs-limited-recurring-coupon-manager.php:388
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-coupon.php:1148
msgid "Sorry, it seems there are no available payment methods which support the recurring coupon you are using. Please contact us if you require assistance or wish to make alternate arrangements."
msgstr ""
@@ -2285,7 +2285,7 @@ msgstr ""
#. translators: $1-2: opening and closing tags of a link that takes to Woo marketplace / Stripe product page
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1896
-msgid "No payment gateways capable of processing automatic subscription payments are enabled. If you would like to process automatic payments, we recommend the %1$sfree Stripe extension%2$s."
+msgid "No payment gateways capable of processing automatic subscription payments are enabled. If you would like to process automatic payments, we recommend %1$sWooPayments%2$s."
msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php:1903
@@ -2329,86 +2329,104 @@ msgstr ""
msgid "Related Orders"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:166
+#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:174
msgid "Please enter a start date in the past."
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:167
+#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:175
msgid "Please enter a date at least 2 minutes into the future."
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:167
+#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:175
msgid "Please enter a date at least one hour into the future."
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:168
+#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:176
msgid "Please enter a date after the trial end."
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:169
-#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:170
+#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:177
+#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:178
msgid "Please enter a date after the start date."
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:171
+#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:179
msgid "Please enter a date before the next payment."
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:172
+#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:180
msgid "Please enter a date after the next payment."
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:173
+#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:181
msgid ""
"Are you sure you want to process a renewal?\n"
"\n"
"This will charge the customer and email them the renewal order (if emails are enabled)."
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:189
+#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:197
msgid ""
"Are you sure you want to retry payment for this renewal order?\n"
"\n"
"This will attempt to charge the customer and send renewal order emails (if emails are enabled)."
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:220
+#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:228
msgid "Process renewal"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:224
+#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:232
msgid "Create pending renewal order"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:226
+#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:234
msgid "Create pending parent order"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:230
+#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:238
msgid "Retry Renewal Payment"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:243
+#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:251
msgid "Process renewal order action requested by admin."
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:254
+#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:261
msgid "Create pending renewal order requested by admin action."
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:296
+#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:267
+msgid "Pending renewal order was not created, as it was not possible to update the subscription status."
+msgstr ""
+
+#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:279
+msgid "Creation of the pending renewal order failed."
+msgstr ""
+
+#. Translators: %1$s opening link tag, %2$s closing link tag.
+#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:300
+msgid "A pending %1$srenewal order%2$s was successfully created!"
+msgstr ""
+
+#. Translators: %1$s opening link tag, %2$s closing link tag.
+#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:312
+msgid "A %1$spending renewal order%2$s was successfully created, but there was a problem setting the payment method. Please review the order."
+msgstr ""
+
+#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:348
msgid "Create pending parent order requested by admin action."
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:327
+#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:379
msgid "Retry renewal payment action requested by admin."
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:423
+#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:475
msgid "This order contains line items with prices above the current product price. To override the product's live price when the customer pays for this order, lock in the manual price increases."
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:427
+#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php:479
msgid "Lock manual price increases"
msgstr ""
@@ -2571,7 +2589,7 @@ msgstr[1] ""
#. translators: placeholder is the display name of a payment gateway a subscription was paid by
#. translators: %s: payment method.
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:652
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2168
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2217
msgid "Via %s"
msgstr ""
@@ -2639,7 +2657,7 @@ msgid "None"
msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-post-types.php:1174
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2150
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2199
#: vendor/woocommerce/subscriptions-core/includes/class-wcs-change-payment-method-admin.php:170
msgid "Manual Renewal"
msgstr ""
@@ -2794,7 +2812,7 @@ msgid "Edit Subscription"
msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/admin/debug-tools/class-wcs-notifications-debug-tool-processor.php:274
-#: vendor/woocommerce/subscriptions-core/includes/class-wcs-notifications-batch-processor.php:253
+#: vendor/woocommerce/subscriptions-core/includes/class-wcs-notifications-batch-processor.php:254
msgid "Background process for updating subscription notifications already started, nothing done."
msgstr ""
@@ -2803,7 +2821,7 @@ msgid "Background process for updating subscription notifications started"
msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/admin/debug-tools/class-wcs-notifications-debug-tool-processor.php:290
-#: vendor/woocommerce/subscriptions-core/includes/class-wcs-notifications-batch-processor.php:268
+#: vendor/woocommerce/subscriptions-core/includes/class-wcs-notifications-batch-processor.php:269
msgid "Background process for updating subscription notifications not started, nothing done."
msgstr ""
@@ -3122,75 +3140,75 @@ msgstr ""
#. translators: %d: subscription ID.
#. translators: %d: order ID.
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1457
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2591
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2640
msgid "Subscription #%d: "
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1871
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1920
msgid "Payment status marked complete."
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1913
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1962
msgid "Payment failed."
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1918
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:1967
msgid "Subscription Cancelled: maximum number of failed payments reached."
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2032
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2081
msgid "The \"all\" value for $order_type parameter is deprecated. It was a misnomer, as it did not return resubscribe orders. It was also inconsistent with order type values accepted by wcs_get_subscription_orders(). Use array( \"parent\", \"renewal\", \"switch\" ) to maintain previous behaviour, or \"any\" to receive all order types, including switch and resubscribe."
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2247
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2296
#: vendor/woocommerce/subscriptions-core/wcs-functions.php:853
msgid "Payment method meta must be an array."
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2483
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2532
msgid "Invalid format. First parameter needs to be an array."
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2487
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2536
msgid "Invalid data. First parameter was empty when passed to update_dates()."
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2494
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2543
msgid "Invalid data. First parameter has a date that is not in the registered date types."
msgstr ""
#. translators: placeholder is date type (e.g. "end", "next_payment"...)
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2521
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2570
msgctxt "appears in an error message if date is wrong format"
msgid "Invalid %s date. The date must be of the format: \"Y-m-d H:i:s\"."
msgstr ""
#. translators: %s: date type (e.g. "end").
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2559
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2608
msgid "The %s date must occur after the cancellation date."
msgstr ""
#. translators: %s: date type (e.g. "end").
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2565
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2614
msgid "The %s date must occur after the last payment date."
msgstr ""
#. translators: %s: date type (e.g. "end").
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2570
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2619
msgid "The %s date must occur after the next payment date."
msgstr ""
#. translators: %s: date type (e.g. "end").
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2576
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2625
msgid "The %s date must occur after the trial end date."
msgstr ""
#. translators: %s: date type (e.g. "next_payment").
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2581
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2630
msgid "The %s date must occur after the start date."
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2611
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php:2660
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-checkout.php:348
msgid "Backordered"
msgstr ""
@@ -4033,53 +4051,53 @@ msgid "Payment completed on order after subscription was cancelled."
msgstr ""
#. translators: $1: opening link tag, $2: order number, $3: closing link tag
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:1111
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:1112
msgid "Subscription cancelled for refunded order %1$s#%2$s%3$s."
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2407
-msgctxt "An order type"
-msgid "Original"
-msgstr ""
-
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2408
msgctxt "An order type"
-msgid "Subscription Parent"
+msgid "Original"
msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2409
msgctxt "An order type"
-msgid "Subscription Renewal"
+msgid "Subscription Parent"
msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2410
msgctxt "An order type"
-msgid "Subscription Resubscribe"
+msgid "Subscription Renewal"
msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2411
msgctxt "An order type"
-msgid "Subscription Switch"
+msgid "Subscription Resubscribe"
msgstr ""
#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2412
msgctxt "An order type"
+msgid "Subscription Switch"
+msgstr ""
+
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2413
+msgctxt "An order type"
msgid "Non-subscription"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2421
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2422
msgid "All orders types"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2448
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2449
msgid "Renewal Order"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2450
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2451
msgid "Resubscribe Order"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2452
+#: vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php:2453
msgid "Parent Order"
msgstr ""
@@ -4474,11 +4492,11 @@ msgstr ""
msgid "That payment method cannot be deleted because it is linked to an automatic subscription. Please choose a %1$sdefault%2$s payment method%3$s, before trying again."
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wcs-notifications-batch-processor.php:257
+#: vendor/woocommerce/subscriptions-core/includes/class-wcs-notifications-batch-processor.php:258
msgid "Background process for updating subscription notifications started."
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/class-wcs-notifications-batch-processor.php:272
+#: vendor/woocommerce/subscriptions-core/includes/class-wcs-notifications-batch-processor.php:273
msgid "Background process for updating subscription notifications stopped."
msgstr ""
@@ -5029,24 +5047,24 @@ msgstr ""
msgid "Thank you for choosing {site_title}!"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/emails/class-wcs-email-customer-notification.php:273
+#: vendor/woocommerce/subscriptions-core/includes/emails/class-wcs-email-customer-notification.php:271
msgid "Reminder emails disabled."
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/emails/class-wcs-email-customer-notification.php:276
-msgid "Not a production site"
+#: vendor/woocommerce/subscriptions-core/includes/emails/class-wcs-email-customer-notification.php:277
+msgid "Not a production site, or notifications have been globally disabled"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/emails/class-wcs-email-customer-notification.php:280
+#: vendor/woocommerce/subscriptions-core/includes/emails/class-wcs-email-customer-notification.php:281
msgid "Recipient not found"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/emails/class-wcs-email-customer-notification.php:284
+#: vendor/woocommerce/subscriptions-core/includes/emails/class-wcs-email-customer-notification.php:285
msgid "Subscription billing cycle too short"
msgstr ""
#. translators: %1$s: email title, %2$s: list of reasons why email was skipped.
-#: vendor/woocommerce/subscriptions-core/includes/emails/class-wcs-email-customer-notification.php:290
+#: vendor/woocommerce/subscriptions-core/includes/emails/class-wcs-email-customer-notification.php:304
msgid "Skipped sending \"%1$s\": %2$s"
msgstr ""
@@ -5585,56 +5603,56 @@ msgstr ""
msgid "Customers with a subscription are excluded from this setting."
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:184
+#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:189
msgid "A database upgrade is required to use Subscriptions. Upgrades from the previously installed version is no longer supported. You will need to install an older version of WooCommerce Subscriptions or WooCommerce Payments to proceed with the upgrade before you can use a newer version."
msgstr ""
#. translators: 1-2: opening/closing tags, 3: active version of Subscriptions, 4: current version of Subscriptions, 5-6: opening/closing tags linked to ticket form, 7-8: opening/closing tags linked to documentation.
-#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:246
+#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:251
msgid "%1$sWarning!%2$s It appears that you have downgraded %1$sWooCommerce Subscriptions%2$s from %3$s to %4$s. Downgrading the plugin in this way may cause issues. Please update to %3$s or higher, or %5$sopen a new support ticket%6$s for further assistance. %7$sLearn more »%8$s"
msgstr ""
#. translators: placeholder is a list of version numbers (e.g. "1.3 & 1.4 & 1.5")
-#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:385
+#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:390
msgid "Database updated to version %s"
msgstr ""
#. translators: placeholder is number of upgraded subscriptions
-#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:393
+#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:398
msgctxt "used in the subscriptions upgrader"
msgid "Marked %s subscription products as \"sold individually\"."
msgstr ""
#. translators: 1$: number of action scheduler hooks upgraded, 2$: "{execution_time}", will be replaced on front end with actual time
-#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:402
+#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:407
msgid "Migrated %1$s subscription related hooks to the new scheduler (in %2$s seconds)."
msgstr ""
#. translators: 1$: number of subscriptions upgraded, 2$: "{execution_time}", will be replaced on front end with actual time it took
-#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:414
+#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:419
msgid "Migrated %1$s subscriptions to the new structure (in %2$s seconds)."
msgstr ""
#. translators: placeholder is "{time_left}", will be replaced on front end with actual time
-#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:417
-#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:463
+#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:422
+#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:468
msgctxt "Message that gets sent to front end."
msgid "Estimated time left (minutes:seconds): %s"
msgstr ""
#. translators: 1$: error message, 2$: opening link tag, 3$: closing link tag, 4$: break tag
-#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:427
+#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:432
msgid "Unable to upgrade subscriptions.%4$sError: %1$s%4$sPlease refresh the page and try again. If problem persists, %2$scontact support%3$s."
msgstr ""
#. translators: placeholder is the number of subscriptions repaired
-#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:442
+#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:447
msgctxt "Repair message that gets sent to front end."
msgid "Repaired %d subscriptions with incorrect dates, line tax data or missing customer notes."
msgstr ""
#. translators: placeholder is number of subscriptions that were checked and did not need repairs. There's a space at the beginning!
-#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:448
+#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:453
msgctxt "Repair message that gets sent to front end."
msgid " %d other subscription was checked and did not need any repairs."
msgid_plural "%d other subscriptions were checked and did not need any repairs."
@@ -5642,33 +5660,33 @@ msgstr[0] ""
msgstr[1] ""
#. translators: placeholder is "{execution_time}", which will be replaced on front end with actual time
-#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:452
+#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:457
msgctxt "Repair message that gets sent to front end."
msgid "(in %s seconds)"
msgstr ""
#. translators: $1: "Repaired x subs with incorrect dates...", $2: "X others were checked and no repair needed", $3: "(in X seconds)". Ordering for RTL languages.
-#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:455
+#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:460
msgctxt "The assembled repair message that gets sent to front end."
msgid "%1$s%2$s %3$s"
msgstr ""
#. translators: 1$: error message, 2$: opening link tag, 3$: closing link tag, 4$: break tag
-#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:474
+#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:479
msgctxt "Error message that gets sent to front end when upgrading Subscriptions"
msgid "Unable to repair subscriptions.%4$sError: %1$s%4$sPlease refresh the page and try again. If problem persists, %2$scontact support%3$s."
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:681
+#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:686
msgid "Welcome to WooCommerce Subscriptions 2.1"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:681
+#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:686
msgid "About WooCommerce Subscriptions"
msgstr ""
#. translators: 1-2: opening/closing tags, 3-4: opening/closing tags linked to ticket form.
-#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:915
+#: vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php:920
msgid "%1$sWarning!%2$s We discovered an issue in %1$sWooCommerce Subscriptions 2.3.0 - 2.3.2%2$s that may cause your subscription renewal order and customer subscription caches to contain invalid data. For information about how to update the cached data, please %3$sopen a new support ticket%4$s."
msgstr ""
@@ -6798,23 +6816,12 @@ msgstr ""
msgid "Your subscription will automatically renew in %1$s — that’s %2$s."
msgstr ""
-#: vendor/woocommerce/subscriptions-core/templates/emails/customer-notification-auto-renewal.php:51
-#: vendor/woocommerce/subscriptions-core/templates/emails/customer-notification-auto-trial-ending.php:65
-#: vendor/woocommerce/subscriptions-core/templates/emails/customer-notification-expiring-subscription.php:51
-#: vendor/woocommerce/subscriptions-core/templates/emails/customer-notification-manual-renewal.php:92
-#: vendor/woocommerce/subscriptions-core/templates/emails/plain/customer-notification-auto-renewal.php:40
-#: vendor/woocommerce/subscriptions-core/templates/emails/plain/customer-notification-auto-trial-ending.php:46
-#: vendor/woocommerce/subscriptions-core/templates/emails/plain/customer-notification-expiring-subscription.php:40
-#: vendor/woocommerce/subscriptions-core/templates/emails/plain/customer-notification-manual-renewal.php:61
-msgid "Here are the details:"
-msgstr ""
-
#. translators: %s: link to subscription detail in the customer's dashboard.
-#: vendor/woocommerce/subscriptions-core/templates/emails/customer-notification-auto-renewal.php:67
+#: vendor/woocommerce/subscriptions-core/templates/emails/customer-notification-auto-renewal.php:73
msgid "You can manage this subscription from your %s"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/templates/emails/customer-notification-auto-renewal.php:68
+#: vendor/woocommerce/subscriptions-core/templates/emails/customer-notification-auto-renewal.php:74
#: vendor/woocommerce/subscriptions-core/templates/emails/customer-notification-auto-trial-ending.php:56
msgid "account dashboard"
msgstr ""
@@ -6991,7 +6998,7 @@ msgstr ""
msgid "Your subscription will automatically renew in %1$s — that’s %2$s."
msgstr ""
-#: vendor/woocommerce/subscriptions-core/templates/emails/plain/customer-notification-auto-renewal.php:45
+#: vendor/woocommerce/subscriptions-core/templates/emails/plain/customer-notification-auto-renewal.php:46
msgid "You can manage this subscription from your account dashboard: "
msgstr ""
@@ -7061,77 +7068,79 @@ msgstr ""
msgid "Date Suspended: %s"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php:20
-#: vendor/woocommerce/subscriptions-core/templates/emails/subscription-info.php:21
+#: vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php:19
+#: vendor/woocommerce/subscriptions-core/templates/emails/subscription-info.php:20
msgid "Subscription information"
msgstr ""
#. translators: placeholder is subscription's number
-#: vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php:25
+#: vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php:24
msgctxt "in plain emails for subscription information"
msgid "Subscription: %s"
msgstr ""
#. translators: placeholder is either view or edit url for the subscription
-#: vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php:27
+#: vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php:26
msgctxt "in plain emails for subscription information"
msgid "View subscription: %s"
msgstr ""
#. translators: placeholder is localised start date
-#: vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php:29
+#: vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php:28
msgctxt "in plain emails for subscription information"
msgid "Start date: %s"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php:31
+#: vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php:30
msgctxt "Used as end date for an indefinite subscription"
msgid "When Cancelled"
msgstr ""
#. translators: placeholder is localised end date, or "when cancelled"
-#: vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php:33
+#: vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php:32
msgctxt "in plain emails for subscription information"
msgid "End date: %s"
msgstr ""
#. translators: placeholder is the formatted order total for the subscription
-#: vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php:35
+#: vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php:34
msgctxt "in plain emails for subscription information"
msgid "Recurring price: %s"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php:38
-#: vendor/woocommerce/subscriptions-core/templates/emails/subscription-info.php:42
+#. Translators: placeholder is the next payment date.
+#: vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php:37
+#: vendor/woocommerce/subscriptions-core/templates/emails/subscription-info.php:43
msgid "Next payment: %s"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php:54
+#: vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php:53
msgid "This subscription is set to renew automatically using your payment method on file. You can manage or cancel this subscription from your my account page. %s"
msgid_plural "These subscriptions are set to renew automatically using your payment method on file. You can manage or cancel your subscriptions from your my account page. %s"
msgstr[0] ""
msgstr[1] ""
-#: vendor/woocommerce/subscriptions-core/templates/emails/subscription-info.php:25
+#: vendor/woocommerce/subscriptions-core/templates/emails/subscription-info.php:24
msgctxt "subscription ID table heading"
msgid "ID"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/templates/emails/subscription-info.php:26
+#: vendor/woocommerce/subscriptions-core/templates/emails/subscription-info.php:25
msgctxt "table heading"
msgid "Start date"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/templates/emails/subscription-info.php:27
+#: vendor/woocommerce/subscriptions-core/templates/emails/subscription-info.php:26
msgctxt "table heading"
msgid "End date"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/templates/emails/subscription-info.php:28
+#: vendor/woocommerce/subscriptions-core/templates/emails/subscription-info.php:27
msgctxt "table heading"
msgid "Recurring total"
msgstr ""
+#. Translators: placeholder is the subscription number.
#: vendor/woocommerce/subscriptions-core/templates/emails/subscription-info.php:35
msgctxt "subscription number in email table. (eg: #106)"
msgid "#%s"
@@ -7142,7 +7151,8 @@ msgctxt "Used as end date for an indefinite subscription"
msgid "When cancelled"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/templates/emails/subscription-info.php:63
+#. Translators: Placeholders are opening and closing My Account link tags.
+#: vendor/woocommerce/subscriptions-core/templates/emails/subscription-info.php:64
msgid "This subscription is set to renew automatically using your payment method on file. You can manage or cancel this subscription from your %1$smy account page%2$s."
msgid_plural "These subscriptions are set to renew automatically using your payment method on file. You can manage or cancel your subscriptions from your %1$smy account page%2$s."
msgstr[0] ""
@@ -7287,7 +7297,7 @@ msgctxt "date on subscription updates list. Will be localized"
msgid "l jS \\o\\f F Y, h:ia"
msgstr ""
-#: vendor/woocommerce/subscriptions-core/templates/myaccount/subscription-totals-table.php:34
+#: vendor/woocommerce/subscriptions-core/templates/myaccount/subscription-totals-table.php:46
msgid "Are you sure you want to remove this item from your subscription?"
msgstr ""
diff --git a/vendor/autoload.php b/vendor/autoload.php
index 074bb04..04da0da 100644
--- a/vendor/autoload.php
+++ b/vendor/autoload.php
@@ -22,4 +22,4 @@ if (PHP_VERSION_ID < 50600) {
require_once __DIR__ . '/composer/autoload_real.php';
-return ComposerAutoloaderInit1a0806ecf77df05bfe8e09cca6dc9f00::getLoader();
+return ComposerAutoloaderInit0c80b12786c5f329cae617490ce0ac6d::getLoader();
diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php
index a27be98..ae18eea 100644
--- a/vendor/composer/autoload_classmap.php
+++ b/vendor/composer/autoload_classmap.php
@@ -8,13 +8,14 @@ $baseDir = dirname($vendorDir);
return array(
'Composer\\InstalledVersions' => $vendorDir . '/composer/InstalledVersions.php',
'Composer\\Installers\\AglInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AglInstaller.php',
- 'Composer\\Installers\\AimeosInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AimeosInstaller.php',
+ 'Composer\\Installers\\AkauntingInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AkauntingInstaller.php',
'Composer\\Installers\\AnnotateCmsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php',
'Composer\\Installers\\AsgardInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AsgardInstaller.php',
'Composer\\Installers\\AttogramInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/AttogramInstaller.php',
'Composer\\Installers\\BaseInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BaseInstaller.php',
'Composer\\Installers\\BitrixInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BitrixInstaller.php',
'Composer\\Installers\\BonefishInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BonefishInstaller.php',
+ 'Composer\\Installers\\BotbleInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/BotbleInstaller.php',
'Composer\\Installers\\CakePHPInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CakePHPInstaller.php',
'Composer\\Installers\\ChefInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ChefInstaller.php',
'Composer\\Installers\\CiviCrmInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CiviCrmInstaller.php',
@@ -22,7 +23,7 @@ return array(
'Composer\\Installers\\CockpitInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CockpitInstaller.php',
'Composer\\Installers\\CodeIgniterInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php',
'Composer\\Installers\\Concrete5Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Concrete5Installer.php',
- 'Composer\\Installers\\CraftInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CraftInstaller.php',
+ 'Composer\\Installers\\ConcreteCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ConcreteCMSInstaller.php',
'Composer\\Installers\\CroogoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/CroogoInstaller.php',
'Composer\\Installers\\DecibelInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DecibelInstaller.php',
'Composer\\Installers\\DframeInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/DframeInstaller.php',
@@ -33,6 +34,7 @@ return array(
'Composer\\Installers\\EliasisInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/EliasisInstaller.php',
'Composer\\Installers\\ExpressionEngineInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php',
'Composer\\Installers\\EzPlatformInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/EzPlatformInstaller.php',
+ 'Composer\\Installers\\ForkCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ForkCMSInstaller.php',
'Composer\\Installers\\FuelInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/FuelInstaller.php',
'Composer\\Installers\\FuelphpInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/FuelphpInstaller.php',
'Composer\\Installers\\GravInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/GravInstaller.php',
@@ -40,9 +42,7 @@ return array(
'Composer\\Installers\\ImageCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ImageCMSInstaller.php',
'Composer\\Installers\\Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Installer.php',
'Composer\\Installers\\ItopInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/ItopInstaller.php',
- 'Composer\\Installers\\JoomlaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/JoomlaInstaller.php',
'Composer\\Installers\\KanboardInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KanboardInstaller.php',
- 'Composer\\Installers\\KirbyInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KirbyInstaller.php',
'Composer\\Installers\\KnownInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KnownInstaller.php',
'Composer\\Installers\\KodiCMSInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KodiCMSInstaller.php',
'Composer\\Installers\\KohanaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/KohanaInstaller.php',
@@ -56,6 +56,7 @@ return array(
'Composer\\Installers\\MajimaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MajimaInstaller.php',
'Composer\\Installers\\MakoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MakoInstaller.php',
'Composer\\Installers\\MantisBTInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MantisBTInstaller.php',
+ 'Composer\\Installers\\MatomoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MatomoInstaller.php',
'Composer\\Installers\\MauticInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MauticInstaller.php',
'Composer\\Installers\\MayaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MayaInstaller.php',
'Composer\\Installers\\MediaWikiInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/MediaWikiInstaller.php',
@@ -71,7 +72,6 @@ return array(
'Composer\\Installers\\PantheonInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PantheonInstaller.php',
'Composer\\Installers\\PhiftyInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PhiftyInstaller.php',
'Composer\\Installers\\PhpBBInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PhpBBInstaller.php',
- 'Composer\\Installers\\PimcoreInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PimcoreInstaller.php',
'Composer\\Installers\\PiwikInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PiwikInstaller.php',
'Composer\\Installers\\PlentymarketsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php',
'Composer\\Installers\\Plugin' => $vendorDir . '/composer/installers/src/Composer/Installers/Plugin.php',
@@ -92,9 +92,6 @@ return array(
'Composer\\Installers\\StarbugInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/StarbugInstaller.php',
'Composer\\Installers\\SyDESInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SyDESInstaller.php',
'Composer\\Installers\\SyliusInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/SyliusInstaller.php',
- 'Composer\\Installers\\Symfony1Installer' => $vendorDir . '/composer/installers/src/Composer/Installers/Symfony1Installer.php',
- 'Composer\\Installers\\TYPO3CmsInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php',
- 'Composer\\Installers\\TYPO3FlowInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php',
'Composer\\Installers\\TaoInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TaoInstaller.php',
'Composer\\Installers\\TastyIgniterInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TastyIgniterInstaller.php',
'Composer\\Installers\\TheliaInstaller' => $vendorDir . '/composer/installers/src/Composer/Installers/TheliaInstaller.php',
diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php
index d4935ab..c9da981 100644
--- a/vendor/composer/autoload_real.php
+++ b/vendor/composer/autoload_real.php
@@ -2,7 +2,7 @@
// autoload_real.php @generated by Composer
-class ComposerAutoloaderInit1a0806ecf77df05bfe8e09cca6dc9f00
+class ComposerAutoloaderInit0c80b12786c5f329cae617490ce0ac6d
{
private static $loader;
@@ -24,12 +24,12 @@ class ComposerAutoloaderInit1a0806ecf77df05bfe8e09cca6dc9f00
require __DIR__ . '/platform_check.php';
- spl_autoload_register(array('ComposerAutoloaderInit1a0806ecf77df05bfe8e09cca6dc9f00', 'loadClassLoader'), true, true);
+ spl_autoload_register(array('ComposerAutoloaderInit0c80b12786c5f329cae617490ce0ac6d', 'loadClassLoader'), true, true);
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(__DIR__));
- spl_autoload_unregister(array('ComposerAutoloaderInit1a0806ecf77df05bfe8e09cca6dc9f00', 'loadClassLoader'));
+ spl_autoload_unregister(array('ComposerAutoloaderInit0c80b12786c5f329cae617490ce0ac6d', 'loadClassLoader'));
require __DIR__ . '/autoload_static.php';
- call_user_func(\Composer\Autoload\ComposerStaticInit1a0806ecf77df05bfe8e09cca6dc9f00::getInitializer($loader));
+ call_user_func(\Composer\Autoload\ComposerStaticInit0c80b12786c5f329cae617490ce0ac6d::getInitializer($loader));
$loader->register(true);
diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php
index 30da454..53d0947 100644
--- a/vendor/composer/autoload_static.php
+++ b/vendor/composer/autoload_static.php
@@ -4,7 +4,7 @@
namespace Composer\Autoload;
-class ComposerStaticInit1a0806ecf77df05bfe8e09cca6dc9f00
+class ComposerStaticInit0c80b12786c5f329cae617490ce0ac6d
{
public static $prefixLengthsPsr4 = array (
'C' =>
@@ -23,13 +23,14 @@ class ComposerStaticInit1a0806ecf77df05bfe8e09cca6dc9f00
public static $classMap = array (
'Composer\\InstalledVersions' => __DIR__ . '/..' . '/composer/InstalledVersions.php',
'Composer\\Installers\\AglInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AglInstaller.php',
- 'Composer\\Installers\\AimeosInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AimeosInstaller.php',
+ 'Composer\\Installers\\AkauntingInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AkauntingInstaller.php',
'Composer\\Installers\\AnnotateCmsInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php',
'Composer\\Installers\\AsgardInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AsgardInstaller.php',
'Composer\\Installers\\AttogramInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/AttogramInstaller.php',
'Composer\\Installers\\BaseInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/BaseInstaller.php',
'Composer\\Installers\\BitrixInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/BitrixInstaller.php',
'Composer\\Installers\\BonefishInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/BonefishInstaller.php',
+ 'Composer\\Installers\\BotbleInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/BotbleInstaller.php',
'Composer\\Installers\\CakePHPInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CakePHPInstaller.php',
'Composer\\Installers\\ChefInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ChefInstaller.php',
'Composer\\Installers\\CiviCrmInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CiviCrmInstaller.php',
@@ -37,7 +38,7 @@ class ComposerStaticInit1a0806ecf77df05bfe8e09cca6dc9f00
'Composer\\Installers\\CockpitInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CockpitInstaller.php',
'Composer\\Installers\\CodeIgniterInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php',
'Composer\\Installers\\Concrete5Installer' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Concrete5Installer.php',
- 'Composer\\Installers\\CraftInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CraftInstaller.php',
+ 'Composer\\Installers\\ConcreteCMSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ConcreteCMSInstaller.php',
'Composer\\Installers\\CroogoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/CroogoInstaller.php',
'Composer\\Installers\\DecibelInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DecibelInstaller.php',
'Composer\\Installers\\DframeInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/DframeInstaller.php',
@@ -48,6 +49,7 @@ class ComposerStaticInit1a0806ecf77df05bfe8e09cca6dc9f00
'Composer\\Installers\\EliasisInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/EliasisInstaller.php',
'Composer\\Installers\\ExpressionEngineInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php',
'Composer\\Installers\\EzPlatformInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/EzPlatformInstaller.php',
+ 'Composer\\Installers\\ForkCMSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ForkCMSInstaller.php',
'Composer\\Installers\\FuelInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/FuelInstaller.php',
'Composer\\Installers\\FuelphpInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/FuelphpInstaller.php',
'Composer\\Installers\\GravInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/GravInstaller.php',
@@ -55,9 +57,7 @@ class ComposerStaticInit1a0806ecf77df05bfe8e09cca6dc9f00
'Composer\\Installers\\ImageCMSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ImageCMSInstaller.php',
'Composer\\Installers\\Installer' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Installer.php',
'Composer\\Installers\\ItopInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/ItopInstaller.php',
- 'Composer\\Installers\\JoomlaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/JoomlaInstaller.php',
'Composer\\Installers\\KanboardInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KanboardInstaller.php',
- 'Composer\\Installers\\KirbyInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KirbyInstaller.php',
'Composer\\Installers\\KnownInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KnownInstaller.php',
'Composer\\Installers\\KodiCMSInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KodiCMSInstaller.php',
'Composer\\Installers\\KohanaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/KohanaInstaller.php',
@@ -71,6 +71,7 @@ class ComposerStaticInit1a0806ecf77df05bfe8e09cca6dc9f00
'Composer\\Installers\\MajimaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MajimaInstaller.php',
'Composer\\Installers\\MakoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MakoInstaller.php',
'Composer\\Installers\\MantisBTInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MantisBTInstaller.php',
+ 'Composer\\Installers\\MatomoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MatomoInstaller.php',
'Composer\\Installers\\MauticInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MauticInstaller.php',
'Composer\\Installers\\MayaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MayaInstaller.php',
'Composer\\Installers\\MediaWikiInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/MediaWikiInstaller.php',
@@ -86,7 +87,6 @@ class ComposerStaticInit1a0806ecf77df05bfe8e09cca6dc9f00
'Composer\\Installers\\PantheonInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PantheonInstaller.php',
'Composer\\Installers\\PhiftyInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PhiftyInstaller.php',
'Composer\\Installers\\PhpBBInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PhpBBInstaller.php',
- 'Composer\\Installers\\PimcoreInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PimcoreInstaller.php',
'Composer\\Installers\\PiwikInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PiwikInstaller.php',
'Composer\\Installers\\PlentymarketsInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php',
'Composer\\Installers\\Plugin' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Plugin.php',
@@ -107,9 +107,6 @@ class ComposerStaticInit1a0806ecf77df05bfe8e09cca6dc9f00
'Composer\\Installers\\StarbugInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/StarbugInstaller.php',
'Composer\\Installers\\SyDESInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SyDESInstaller.php',
'Composer\\Installers\\SyliusInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/SyliusInstaller.php',
- 'Composer\\Installers\\Symfony1Installer' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/Symfony1Installer.php',
- 'Composer\\Installers\\TYPO3CmsInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php',
- 'Composer\\Installers\\TYPO3FlowInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php',
'Composer\\Installers\\TaoInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TaoInstaller.php',
'Composer\\Installers\\TastyIgniterInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TastyIgniterInstaller.php',
'Composer\\Installers\\TheliaInstaller' => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers/TheliaInstaller.php',
@@ -129,9 +126,9 @@ class ComposerStaticInit1a0806ecf77df05bfe8e09cca6dc9f00
public static function getInitializer(ClassLoader $loader)
{
return \Closure::bind(function () use ($loader) {
- $loader->prefixLengthsPsr4 = ComposerStaticInit1a0806ecf77df05bfe8e09cca6dc9f00::$prefixLengthsPsr4;
- $loader->prefixDirsPsr4 = ComposerStaticInit1a0806ecf77df05bfe8e09cca6dc9f00::$prefixDirsPsr4;
- $loader->classMap = ComposerStaticInit1a0806ecf77df05bfe8e09cca6dc9f00::$classMap;
+ $loader->prefixLengthsPsr4 = ComposerStaticInit0c80b12786c5f329cae617490ce0ac6d::$prefixLengthsPsr4;
+ $loader->prefixDirsPsr4 = ComposerStaticInit0c80b12786c5f329cae617490ce0ac6d::$prefixDirsPsr4;
+ $loader->classMap = ComposerStaticInit0c80b12786c5f329cae617490ce0ac6d::$classMap;
}, null, ClassLoader::class);
}
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index 76783d9..ee8fff9 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -2,41 +2,39 @@
"packages": [
{
"name": "composer/installers",
- "version": "v1.12.0",
- "version_normalized": "1.12.0.0",
+ "version": "v2.3.0",
+ "version_normalized": "2.3.0.0",
"source": {
"type": "git",
"url": "https://github.com/composer/installers.git",
- "reference": "d20a64ed3c94748397ff5973488761b22f6d3f19"
+ "reference": "12fb2dfe5e16183de69e784a7b84046c43d97e8e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/composer/installers/zipball/d20a64ed3c94748397ff5973488761b22f6d3f19",
- "reference": "d20a64ed3c94748397ff5973488761b22f6d3f19",
+ "url": "https://api.github.com/repos/composer/installers/zipball/12fb2dfe5e16183de69e784a7b84046c43d97e8e",
+ "reference": "12fb2dfe5e16183de69e784a7b84046c43d97e8e",
"shasum": ""
},
"require": {
- "composer-plugin-api": "^1.0 || ^2.0"
- },
- "replace": {
- "roundcube/plugin-installer": "*",
- "shama/baton": "*"
+ "composer-plugin-api": "^1.0 || ^2.0",
+ "php": "^7.2 || ^8.0"
},
"require-dev": {
- "composer/composer": "1.6.* || ^2.0",
- "composer/semver": "^1 || ^3",
- "phpstan/phpstan": "^0.12.55",
- "phpstan/phpstan-phpunit": "^0.12.16",
- "symfony/phpunit-bridge": "^4.2 || ^5",
- "symfony/process": "^2.3"
+ "composer/composer": "^1.10.27 || ^2.7",
+ "composer/semver": "^1.7.2 || ^3.4.0",
+ "phpstan/phpstan": "^1.11",
+ "phpstan/phpstan-phpunit": "^1",
+ "symfony/phpunit-bridge": "^7.1.1",
+ "symfony/process": "^5 || ^6 || ^7"
},
- "time": "2021-09-13T08:19:44+00:00",
+ "time": "2024-06-24T20:46:46+00:00",
"type": "composer-plugin",
"extra": {
"class": "Composer\\Installers\\Plugin",
"branch-alias": {
- "dev-main": "1.x-dev"
- }
+ "dev-main": "2.x-dev"
+ },
+ "plugin-modifies-install-path": true
},
"installation-source": "dist",
"autoload": {
@@ -58,7 +56,6 @@
"description": "A multi-framework Composer library installer",
"homepage": "https://composer.github.io/installers/",
"keywords": [
- "Craft",
"Dolibarr",
"Eliasis",
"Hurad",
@@ -79,7 +76,6 @@
"Whmcs",
"WolfCMS",
"agl",
- "aimeos",
"annotatecms",
"attogram",
"bitrix",
@@ -88,6 +84,7 @@
"cockpit",
"codeigniter",
"concrete5",
+ "concreteCMS",
"croogo",
"dokuwiki",
"drupal",
@@ -98,7 +95,6 @@
"grav",
"installer",
"itop",
- "joomla",
"known",
"kohana",
"laravel",
@@ -107,6 +103,7 @@
"magento",
"majima",
"mako",
+ "matomo",
"mediawiki",
"miaoxing",
"modulework",
@@ -126,9 +123,7 @@
"silverstripe",
"sydes",
"sylius",
- "symfony",
"tastyigniter",
- "typo3",
"wordpress",
"yawik",
"zend",
@@ -136,7 +131,7 @@
],
"support": {
"issues": "https://github.com/composer/installers/issues",
- "source": "https://github.com/composer/installers/tree/v1.12.0"
+ "source": "https://github.com/composer/installers/tree/v2.3.0"
},
"funding": [
{
@@ -156,17 +151,17 @@
},
{
"name": "woocommerce/subscriptions-core",
- "version": "7.9.0",
- "version_normalized": "7.9.0.0",
+ "version": "8.0.1",
+ "version_normalized": "8.0.1.0",
"source": {
"type": "git",
"url": "https://github.com/Automattic/woocommerce-subscriptions-core.git",
- "reference": "36629b90e52bf1137fd4f7580414cea7e42ce920"
+ "reference": "554c03a5e7591c448d495ee41ee12015f65cad5a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/Automattic/woocommerce-subscriptions-core/zipball/36629b90e52bf1137fd4f7580414cea7e42ce920",
- "reference": "36629b90e52bf1137fd4f7580414cea7e42ce920",
+ "url": "https://api.github.com/repos/Automattic/woocommerce-subscriptions-core/zipball/554c03a5e7591c448d495ee41ee12015f65cad5a",
+ "reference": "554c03a5e7591c448d495ee41ee12015f65cad5a",
"shasum": ""
},
"require": {
@@ -179,7 +174,7 @@
"woocommerce/woocommerce-sniffs": "0.1.0",
"yoast/phpunit-polyfills": "1.1.0"
},
- "time": "2025-01-10T00:22:55+00:00",
+ "time": "2025-02-13T10:49:47+00:00",
"type": "wordpress-plugin",
"extra": {
"phpcodesniffer-search-depth": 2
@@ -209,7 +204,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.9.0",
+ "source": "https://github.com/Automattic/woocommerce-subscriptions-core/tree/8.0.1",
"issues": "https://github.com/Automattic/woocommerce-subscriptions-core/issues"
},
"install-path": "../woocommerce/subscriptions-core"
diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php
index b733514..b1031d0 100644
--- a/vendor/composer/installed.php
+++ b/vendor/composer/installed.php
@@ -1,9 +1,9 @@
array(
'name' => 'woocommerce/woocommerce-subscriptions',
- 'pretty_version' => 'dev-release/7.1.0',
- 'version' => 'dev-release/7.1.0',
- 'reference' => '4cd67267efc98d376b5db58714feb586f8d2be41',
+ 'pretty_version' => 'dev-release/7.2.1',
+ 'version' => 'dev-release/7.2.1',
+ 'reference' => 'c1ca6ecf1cb1adeb0725e3d5ad543424e73b041e',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
@@ -11,39 +11,27 @@
),
'versions' => array(
'composer/installers' => array(
- 'pretty_version' => 'v1.12.0',
- 'version' => '1.12.0.0',
- 'reference' => 'd20a64ed3c94748397ff5973488761b22f6d3f19',
+ 'pretty_version' => 'v2.3.0',
+ 'version' => '2.3.0.0',
+ 'reference' => '12fb2dfe5e16183de69e784a7b84046c43d97e8e',
'type' => 'composer-plugin',
'install_path' => __DIR__ . '/./installers',
'aliases' => array(),
'dev_requirement' => false,
),
- 'roundcube/plugin-installer' => array(
- 'dev_requirement' => false,
- 'replaced' => array(
- 0 => '*',
- ),
- ),
- 'shama/baton' => array(
- 'dev_requirement' => false,
- 'replaced' => array(
- 0 => '*',
- ),
- ),
'woocommerce/subscriptions-core' => array(
- 'pretty_version' => '7.9.0',
- 'version' => '7.9.0.0',
- 'reference' => '36629b90e52bf1137fd4f7580414cea7e42ce920',
+ 'pretty_version' => '8.0.1',
+ 'version' => '8.0.1.0',
+ 'reference' => '554c03a5e7591c448d495ee41ee12015f65cad5a',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../woocommerce/subscriptions-core',
'aliases' => array(),
'dev_requirement' => false,
),
'woocommerce/woocommerce-subscriptions' => array(
- 'pretty_version' => 'dev-release/7.1.0',
- 'version' => 'dev-release/7.1.0',
- 'reference' => '4cd67267efc98d376b5db58714feb586f8d2be41',
+ 'pretty_version' => 'dev-release/7.2.1',
+ 'version' => 'dev-release/7.2.1',
+ 'reference' => 'c1ca6ecf1cb1adeb0725e3d5ad543424e73b041e',
'type' => 'wordpress-plugin',
'install_path' => __DIR__ . '/../../',
'aliases' => array(),
diff --git a/vendor/composer/installers/phpstan.neon.dist b/vendor/composer/installers/phpstan.neon.dist
deleted file mode 100644
index 8e3d81e..0000000
--- a/vendor/composer/installers/phpstan.neon.dist
+++ /dev/null
@@ -1,10 +0,0 @@
-parameters:
- level: 5
- paths:
- - src
- - tests
- excludes_analyse:
- - tests/Composer/Installers/Test/PolyfillTestCase.php
-
-includes:
- - vendor/phpstan/phpstan-phpunit/extension.neon
diff --git a/vendor/composer/installers/src/Composer/Installers/AglInstaller.php b/vendor/composer/installers/src/Composer/Installers/AglInstaller.php
index 01b8a41..b0996a6 100644
--- a/vendor/composer/installers/src/Composer/Installers/AglInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/AglInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'module' => 'More/{$name}/',
);
@@ -10,12 +12,18 @@ class AglInstaller extends BaseInstaller
/**
* Format package name to CamelCase
*/
- public function inflectPackageVars($vars)
+ public function inflectPackageVars(array $vars): array
{
- $vars['name'] = preg_replace_callback('/(?:^|_|-)(.?)/', function ($matches) {
+ $name = preg_replace_callback('/(?:^|_|-)(.?)/', function ($matches) {
return strtoupper($matches[1]);
}, $vars['name']);
+ if (null === $name) {
+ throw new \RuntimeException('Failed to run preg_replace_callback: '.preg_last_error());
+ }
+
+ $vars['name'] = $name;
+
return $vars;
}
}
diff --git a/vendor/composer/installers/src/Composer/Installers/AimeosInstaller.php b/vendor/composer/installers/src/Composer/Installers/AimeosInstaller.php
deleted file mode 100644
index 79a0e95..0000000
--- a/vendor/composer/installers/src/Composer/Installers/AimeosInstaller.php
+++ /dev/null
@@ -1,9 +0,0 @@
- 'ext/{$name}/',
- );
-}
diff --git a/vendor/composer/installers/src/Composer/Installers/AkauntingInstaller.php b/vendor/composer/installers/src/Composer/Installers/AkauntingInstaller.php
new file mode 100644
index 0000000..c504c70
--- /dev/null
+++ b/vendor/composer/installers/src/Composer/Installers/AkauntingInstaller.php
@@ -0,0 +1,23 @@
+ */
+ protected $locations = array(
+ 'module' => 'modules/{$name}',
+ );
+
+ /**
+ * Format package name to CamelCase
+ */
+ public function inflectPackageVars(array $vars): array
+ {
+ $vars['name'] = strtolower($this->pregReplace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
+ $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name']));
+
+ return $vars;
+ }
+}
diff --git a/vendor/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php b/vendor/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php
index 89d7ad9..58a0f66 100644
--- a/vendor/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/AnnotateCmsInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'module' => 'addons/modules/{$name}/',
'component' => 'addons/components/{$name}/',
diff --git a/vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php b/vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php
index 22dad1b..f01b399 100644
--- a/vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/AsgardInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'module' => 'Modules/{$name}/',
'theme' => 'Themes/{$name}/'
@@ -14,9 +16,8 @@ class AsgardInstaller extends BaseInstaller
* For package type asgard-module, cut off a trailing '-plugin' if present.
*
* For package type asgard-theme, cut off a trailing '-theme' if present.
- *
*/
- public function inflectPackageVars($vars)
+ public function inflectPackageVars(array $vars): array
{
if ($vars['type'] === 'asgard-module') {
return $this->inflectPluginVars($vars);
@@ -29,18 +30,26 @@ class AsgardInstaller extends BaseInstaller
return $vars;
}
- protected function inflectPluginVars($vars)
+ /**
+ * @param array $vars
+ * @return array
+ */
+ protected function inflectPluginVars(array $vars): array
{
- $vars['name'] = preg_replace('/-module$/', '', $vars['name']);
+ $vars['name'] = $this->pregReplace('/-module$/', '', $vars['name']);
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars;
}
- protected function inflectThemeVars($vars)
+ /**
+ * @param array $vars
+ * @return array
+ */
+ protected function inflectThemeVars(array $vars): array
{
- $vars['name'] = preg_replace('/-theme$/', '', $vars['name']);
+ $vars['name'] = $this->pregReplace('/-theme$/', '', $vars['name']);
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
diff --git a/vendor/composer/installers/src/Composer/Installers/AttogramInstaller.php b/vendor/composer/installers/src/Composer/Installers/AttogramInstaller.php
index d62fd8f..bd7dd8d 100644
--- a/vendor/composer/installers/src/Composer/Installers/AttogramInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/AttogramInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'module' => 'modules/{$name}/',
);
diff --git a/vendor/composer/installers/src/Composer/Installers/BaseInstaller.php b/vendor/composer/installers/src/Composer/Installers/BaseInstaller.php
index 70dde90..663ec2a 100644
--- a/vendor/composer/installers/src/Composer/Installers/BaseInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/BaseInstaller.php
@@ -1,4 +1,5 @@
*/
protected $locations = array();
+ /** @var Composer */
protected $composer;
+ /** @var PackageInterface */
protected $package;
+ /** @var IOInterface */
protected $io;
/**
* Initializes base installer.
- *
- * @param PackageInterface $package
- * @param Composer $composer
- * @param IOInterface $io
*/
- public function __construct(PackageInterface $package = null, Composer $composer = null, IOInterface $io = null)
+ public function __construct(PackageInterface $package, Composer $composer, IOInterface $io)
{
$this->composer = $composer;
$this->package = $package;
@@ -28,12 +29,8 @@ abstract class BaseInstaller
/**
* Return the install path based on package type.
- *
- * @param PackageInterface $package
- * @param string $frameworkType
- * @return string
*/
- public function getInstallPath(PackageInterface $package, $frameworkType = '')
+ public function getInstallPath(PackageInterface $package, string $frameworkType = ''): string
{
$type = $this->package->getType();
@@ -52,18 +49,16 @@ abstract class BaseInstaller
$availableVars['name'] = $extra['installer-name'];
}
- if ($this->composer->getPackage()) {
- $extra = $this->composer->getPackage()->getExtra();
- if (!empty($extra['installer-paths'])) {
- $customPath = $this->mapCustomInstallPaths($extra['installer-paths'], $prettyName, $type, $vendor);
- if ($customPath !== false) {
- return $this->templatePath($customPath, $availableVars);
- }
+ $extra = $this->composer->getPackage()->getExtra();
+ if (!empty($extra['installer-paths'])) {
+ $customPath = $this->mapCustomInstallPaths($extra['installer-paths'], $prettyName, $type, $vendor);
+ if ($customPath !== false) {
+ return $this->templatePath($customPath, $availableVars);
}
}
$packageType = substr($type, strlen($frameworkType) + 1);
- $locations = $this->getLocations();
+ $locations = $this->getLocations($frameworkType);
if (!isset($locations[$packageType])) {
throw new \InvalidArgumentException(sprintf('Package type "%s" is not supported', $type));
}
@@ -77,7 +72,7 @@ abstract class BaseInstaller
* @param array $vars This will normally receive array{name: string, vendor: string, type: string}
* @return array
*/
- public function inflectPackageVars($vars)
+ public function inflectPackageVars(array $vars): array
{
return $vars;
}
@@ -87,7 +82,7 @@ abstract class BaseInstaller
*
* @return array map of package types => install path
*/
- public function getLocations()
+ public function getLocations(string $frameworkType)
{
return $this->locations;
}
@@ -95,11 +90,9 @@ abstract class BaseInstaller
/**
* Replace vars in a path
*
- * @param string $path
* @param array $vars
- * @return string
*/
- protected function templatePath($path, array $vars = array())
+ protected function templatePath(string $path, array $vars = array()): string
{
if (strpos($path, '{') !== false) {
extract($vars);
@@ -117,13 +110,10 @@ abstract class BaseInstaller
/**
* Search through a passed paths array for a custom install path.
*
- * @param array $paths
- * @param string $name
- * @param string $type
- * @param string $vendor = NULL
+ * @param array $paths
* @return string|false
*/
- protected function mapCustomInstallPaths(array $paths, $name, $type, $vendor = NULL)
+ protected function mapCustomInstallPaths(array $paths, string $name, string $type, ?string $vendor = null)
{
foreach ($paths as $path => $names) {
$names = (array) $names;
@@ -134,4 +124,14 @@ abstract class BaseInstaller
return false;
}
+
+ protected function pregReplace(string $pattern, string $replacement, string $subject): string
+ {
+ $result = preg_replace($pattern, $replacement, $subject);
+ if (null === $result) {
+ throw new \RuntimeException('Failed to run preg_replace with '.$pattern.': '.preg_last_error());
+ }
+
+ return $result;
+ }
}
diff --git a/vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php b/vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php
index e80cd1e..705ecb4 100644
--- a/vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/BitrixInstaller.php
@@ -9,9 +9,9 @@ use Composer\Util\Filesystem;
* - `bitrix-d7-module` — copy the module to directory `bitrix/modules/.`.
* - `bitrix-d7-component` — copy the component to directory `bitrix/components//`.
* - `bitrix-d7-template` — copy the template to directory `bitrix/templates/_`.
- *
+ *
* You can set custom path to directory with Bitrix kernel in `composer.json`:
- *
+ *
* ```json
* {
* "extra": {
@@ -25,6 +25,7 @@ use Composer\Util\Filesystem;
*/
class BitrixInstaller extends BaseInstaller
{
+ /** @var array */
protected $locations = array(
'module' => '{$bitrix_dir}/modules/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken)
'component' => '{$bitrix_dir}/components/{$name}/', // deprecated, remove on the major release (Backward compatibility will be broken)
@@ -35,15 +36,13 @@ class BitrixInstaller extends BaseInstaller
);
/**
- * @var array Storage for informations about duplicates at all the time of installation packages.
+ * @var string[] Storage for informations about duplicates at all the time of installation packages.
*/
private static $checkedDuplicates = array();
- /**
- * {@inheritdoc}
- */
- public function inflectPackageVars($vars)
+ public function inflectPackageVars(array $vars): array
{
+ /** @phpstan-ignore-next-line */
if ($this->composer->getPackage()) {
$extra = $this->composer->getPackage()->getExtra();
@@ -62,7 +61,7 @@ class BitrixInstaller extends BaseInstaller
/**
* {@inheritdoc}
*/
- protected function templatePath($path, array $vars = array())
+ protected function templatePath(string $path, array $vars = array()): string
{
$templatePath = parent::templatePath($path, $vars);
$this->checkDuplicates($templatePath, $vars);
@@ -73,10 +72,9 @@ class BitrixInstaller extends BaseInstaller
/**
* Duplicates search packages.
*
- * @param string $path
- * @param array $vars
+ * @param array $vars
*/
- protected function checkDuplicates($path, array $vars = array())
+ protected function checkDuplicates(string $path, array $vars = array()): void
{
$packageType = substr($vars['type'], strlen('bitrix') + 1);
$localDir = explode('/', $vars['bitrix_dir']);
@@ -94,8 +92,7 @@ class BitrixInstaller extends BaseInstaller
return;
}
- if ($oldPath !== $path && file_exists($oldPath) && $this->io && $this->io->isInteractive()) {
-
+ if ($oldPath !== $path && file_exists($oldPath) && $this->io->isInteractive()) {
$this->io->writeError(' Duplication of packages:');
$this->io->writeError(' Package ' . $oldPath . ' will be called instead package ' . $path . '');
diff --git a/vendor/composer/installers/src/Composer/Installers/BonefishInstaller.php b/vendor/composer/installers/src/Composer/Installers/BonefishInstaller.php
index da3aad2..ab022d9 100644
--- a/vendor/composer/installers/src/Composer/Installers/BonefishInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/BonefishInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'package' => 'Packages/{$vendor}/{$name}/'
);
diff --git a/vendor/composer/installers/src/Composer/Installers/BotbleInstaller.php b/vendor/composer/installers/src/Composer/Installers/BotbleInstaller.php
new file mode 100644
index 0000000..35e1cb8
--- /dev/null
+++ b/vendor/composer/installers/src/Composer/Installers/BotbleInstaller.php
@@ -0,0 +1,12 @@
+ */
+ protected $locations = array(
+ 'plugin' => 'platform/plugins/{$name}/',
+ 'theme' => 'platform/themes/{$name}/',
+ );
+}
diff --git a/vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php b/vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php
index 1e2ddd0..12b4ed4 100644
--- a/vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/CakePHPInstaller.php
@@ -1,4 +1,5 @@
*/
protected $locations = array(
'plugin' => 'Plugin/{$name}/',
);
@@ -13,7 +15,7 @@ class CakePHPInstaller extends BaseInstaller
/**
* Format package name to CamelCase
*/
- public function inflectPackageVars($vars)
+ public function inflectPackageVars(array $vars): array
{
if ($this->matchesCakeVersion('>=', '3.0.0')) {
return $vars;
@@ -21,7 +23,7 @@ class CakePHPInstaller extends BaseInstaller
$nameParts = explode('/', $vars['name']);
foreach ($nameParts as &$value) {
- $value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value));
+ $value = strtolower($this->pregReplace('/(?<=\\w)([A-Z])/', '_\\1', $value));
$value = str_replace(array('-', '_'), ' ', $value);
$value = str_replace(' ', '', ucwords($value));
}
@@ -33,7 +35,7 @@ class CakePHPInstaller extends BaseInstaller
/**
* Change the default plugin location when cakephp >= 3.0
*/
- public function getLocations()
+ public function getLocations(string $frameworkType): array
{
if ($this->matchesCakeVersion('>=', '3.0.0')) {
$this->locations['plugin'] = $this->composer->getConfig()->get('vendor-dir') . '/{$vendor}/{$name}/';
@@ -44,19 +46,18 @@ class CakePHPInstaller extends BaseInstaller
/**
* Check if CakePHP version matches against a version
*
- * @param string $matcher
- * @param string $version
- * @return bool
- * @phpstan-param Constraint::STR_OP_* $matcher
+ * @phpstan-param '='|'=='|'<'|'<='|'>'|'>='|'<>'|'!=' $matcher
*/
- protected function matchesCakeVersion($matcher, $version)
+ protected function matchesCakeVersion(string $matcher, string $version): bool
{
$repositoryManager = $this->composer->getRepositoryManager();
- if (! $repositoryManager) {
+ /** @phpstan-ignore-next-line */
+ if (!$repositoryManager) {
return false;
}
$repos = $repositoryManager->getLocalRepository();
+ /** @phpstan-ignore-next-line */
if (!$repos) {
return false;
}
diff --git a/vendor/composer/installers/src/Composer/Installers/ChefInstaller.php b/vendor/composer/installers/src/Composer/Installers/ChefInstaller.php
index ab2f9aa..b0d3c5f 100644
--- a/vendor/composer/installers/src/Composer/Installers/ChefInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/ChefInstaller.php
@@ -1,11 +1,12 @@
*/
protected $locations = array(
'cookbook' => 'Chef/{$vendor}/{$name}/',
'role' => 'Chef/roles/{$name}/',
);
}
-
diff --git a/vendor/composer/installers/src/Composer/Installers/CiviCrmInstaller.php b/vendor/composer/installers/src/Composer/Installers/CiviCrmInstaller.php
index 6673aea..1c52e0c 100644
--- a/vendor/composer/installers/src/Composer/Installers/CiviCrmInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/CiviCrmInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'ext' => 'ext/{$name}/'
);
diff --git a/vendor/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php b/vendor/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php
index c887815..2c943b2 100644
--- a/vendor/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/ClanCatsFrameworkInstaller.php
@@ -1,10 +1,12 @@
'CCF/orbit/{$name}/',
- 'theme' => 'CCF/app/themes/{$name}/',
- );
-}
\ No newline at end of file
+ /** @var array */
+ protected $locations = array(
+ 'ship' => 'CCF/orbit/{$name}/',
+ 'theme' => 'CCF/app/themes/{$name}/',
+ );
+}
diff --git a/vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php b/vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php
index 053f3ff..d3fcdf7 100644
--- a/vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/CockpitInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'module' => 'cockpit/modules/addons/{$name}/',
);
@@ -11,10 +13,8 @@ class CockpitInstaller extends BaseInstaller
* Format module name.
*
* Strip `module-` prefix from package name.
- *
- * {@inheritDoc}
*/
- public function inflectPackageVars($vars)
+ public function inflectPackageVars(array $vars): array
{
if ($vars['type'] == 'cockpit-module') {
return $this->inflectModuleVars($vars);
@@ -23,9 +23,13 @@ class CockpitInstaller extends BaseInstaller
return $vars;
}
- public function inflectModuleVars($vars)
+ /**
+ * @param array $vars
+ * @return array
+ */
+ public function inflectModuleVars(array $vars): array
{
- $vars['name'] = ucfirst(preg_replace('/cockpit-/i', '', $vars['name']));
+ $vars['name'] = ucfirst($this->pregReplace('/cockpit-/i', '', $vars['name']));
return $vars;
}
diff --git a/vendor/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php b/vendor/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php
index 3b4a4ec..a183e07 100644
--- a/vendor/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/CodeIgniterInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'library' => 'application/libraries/{$name}/',
'third-party' => 'application/third_party/{$name}/',
diff --git a/vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php b/vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php
index 5c01baf..2f5fecb 100644
--- a/vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php
+++ b/vendor/composer/installers/src/Composer/Installers/Concrete5Installer.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'core' => 'concrete/',
'block' => 'application/blocks/{$name}/',
diff --git a/vendor/composer/installers/src/Composer/Installers/ConcreteCMSInstaller.php b/vendor/composer/installers/src/Composer/Installers/ConcreteCMSInstaller.php
new file mode 100644
index 0000000..b6e7f00
--- /dev/null
+++ b/vendor/composer/installers/src/Composer/Installers/ConcreteCMSInstaller.php
@@ -0,0 +1,15 @@
+ */
+ protected $locations = array(
+ 'core' => 'concrete/',
+ 'block' => 'application/blocks/{$name}/',
+ 'package' => 'packages/{$name}/',
+ 'theme' => 'application/themes/{$name}/',
+ 'update' => 'updates/{$name}/',
+ );
+}
diff --git a/vendor/composer/installers/src/Composer/Installers/CraftInstaller.php b/vendor/composer/installers/src/Composer/Installers/CraftInstaller.php
deleted file mode 100644
index d37a77a..0000000
--- a/vendor/composer/installers/src/Composer/Installers/CraftInstaller.php
+++ /dev/null
@@ -1,35 +0,0 @@
- 'craft/plugins/{$name}/',
- );
-
- /**
- * Strip `craft-` prefix and/or `-plugin` suffix from package names
- *
- * @param array $vars
- *
- * @return array
- */
- final public function inflectPackageVars($vars)
- {
- return $this->inflectPluginVars($vars);
- }
-
- private function inflectPluginVars($vars)
- {
- $vars['name'] = preg_replace('/-' . self::NAME_SUFFIX . '$/i', '', $vars['name']);
- $vars['name'] = preg_replace('/^' . self::NAME_PREFIX . '-/i', '', $vars['name']);
-
- return $vars;
- }
-}
diff --git a/vendor/composer/installers/src/Composer/Installers/CroogoInstaller.php b/vendor/composer/installers/src/Composer/Installers/CroogoInstaller.php
index d94219d..31d4939 100644
--- a/vendor/composer/installers/src/Composer/Installers/CroogoInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/CroogoInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'plugin' => 'Plugin/{$name}/',
'theme' => 'View/Themed/{$name}/',
@@ -11,7 +13,7 @@ class CroogoInstaller extends BaseInstaller
/**
* Format package name to CamelCase
*/
- public function inflectPackageVars($vars)
+ public function inflectPackageVars(array $vars): array
{
$vars['name'] = strtolower(str_replace(array('-', '_'), ' ', $vars['name']));
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
diff --git a/vendor/composer/installers/src/Composer/Installers/DecibelInstaller.php b/vendor/composer/installers/src/Composer/Installers/DecibelInstaller.php
index f4837a6..88f53f7 100644
--- a/vendor/composer/installers/src/Composer/Installers/DecibelInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/DecibelInstaller.php
@@ -1,9 +1,11 @@
*/
protected $locations = array(
'app' => 'app/{$name}/',
);
diff --git a/vendor/composer/installers/src/Composer/Installers/DframeInstaller.php b/vendor/composer/installers/src/Composer/Installers/DframeInstaller.php
index 7078816..196f60e 100644
--- a/vendor/composer/installers/src/Composer/Installers/DframeInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/DframeInstaller.php
@@ -4,6 +4,7 @@ namespace Composer\Installers;
class DframeInstaller extends BaseInstaller
{
+ /** @var array */
protected $locations = array(
'module' => 'modules/{$vendor}/{$name}/',
);
diff --git a/vendor/composer/installers/src/Composer/Installers/DokuWikiInstaller.php b/vendor/composer/installers/src/Composer/Installers/DokuWikiInstaller.php
index cfd638d..aa3a2e6 100644
--- a/vendor/composer/installers/src/Composer/Installers/DokuWikiInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/DokuWikiInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'plugin' => 'lib/plugins/{$name}/',
'template' => 'lib/tpl/{$name}/',
@@ -11,15 +13,13 @@ class DokuWikiInstaller extends BaseInstaller
/**
* Format package name.
*
- * For package type dokuwiki-plugin, cut off a trailing '-plugin',
+ * For package type dokuwiki-plugin, cut off a trailing '-plugin',
* or leading dokuwiki_ if present.
- *
- * For package type dokuwiki-template, cut off a trailing '-template' if present.
*
+ * For package type dokuwiki-template, cut off a trailing '-template' if present.
*/
- public function inflectPackageVars($vars)
+ public function inflectPackageVars(array $vars): array
{
-
if ($vars['type'] === 'dokuwiki-plugin') {
return $this->inflectPluginVars($vars);
}
@@ -31,20 +31,27 @@ class DokuWikiInstaller extends BaseInstaller
return $vars;
}
- protected function inflectPluginVars($vars)
+ /**
+ * @param array $vars
+ * @return array
+ */
+ protected function inflectPluginVars(array $vars): array
{
- $vars['name'] = preg_replace('/-plugin$/', '', $vars['name']);
- $vars['name'] = preg_replace('/^dokuwiki_?-?/', '', $vars['name']);
+ $vars['name'] = $this->pregReplace('/-plugin$/', '', $vars['name']);
+ $vars['name'] = $this->pregReplace('/^dokuwiki_?-?/', '', $vars['name']);
return $vars;
}
- protected function inflectTemplateVars($vars)
+ /**
+ * @param array $vars
+ * @return array
+ */
+ protected function inflectTemplateVars(array $vars): array
{
- $vars['name'] = preg_replace('/-template$/', '', $vars['name']);
- $vars['name'] = preg_replace('/^dokuwiki_?-?/', '', $vars['name']);
+ $vars['name'] = $this->pregReplace('/-template$/', '', $vars['name']);
+ $vars['name'] = $this->pregReplace('/^dokuwiki_?-?/', '', $vars['name']);
return $vars;
}
-
}
diff --git a/vendor/composer/installers/src/Composer/Installers/DolibarrInstaller.php b/vendor/composer/installers/src/Composer/Installers/DolibarrInstaller.php
index 21f7e8e..c583619 100644
--- a/vendor/composer/installers/src/Composer/Installers/DolibarrInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/DolibarrInstaller.php
@@ -1,4 +1,5 @@
*/
protected $locations = array(
'module' => 'htdocs/custom/{$name}/',
);
diff --git a/vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php b/vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php
index 7328239..65a3a91 100644
--- a/vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/DrupalInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'core' => 'core/',
'module' => 'modules/{$name}/',
@@ -18,5 +20,6 @@ class DrupalInstaller extends BaseInstaller
'console' => 'console/{$name}/',
'console-language' => 'console/language/{$name}/',
'config' => 'config/sync/',
+ 'recipe' => 'recipes/{$name}',
);
}
diff --git a/vendor/composer/installers/src/Composer/Installers/ElggInstaller.php b/vendor/composer/installers/src/Composer/Installers/ElggInstaller.php
index c0bb609..48ef2ec 100644
--- a/vendor/composer/installers/src/Composer/Installers/ElggInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/ElggInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'plugin' => 'mod/{$name}/',
);
diff --git a/vendor/composer/installers/src/Composer/Installers/EliasisInstaller.php b/vendor/composer/installers/src/Composer/Installers/EliasisInstaller.php
index 6f3dc97..d7dd9a9 100644
--- a/vendor/composer/installers/src/Composer/Installers/EliasisInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/EliasisInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'component' => 'components/{$name}/',
'module' => 'modules/{$name}/',
diff --git a/vendor/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php b/vendor/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php
index d5321a8..fe1d468 100644
--- a/vendor/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/ExpressionEngineInstaller.php
@@ -1,29 +1,31 @@
*/
private $ee2Locations = array(
'addon' => 'system/expressionengine/third_party/{$name}/',
'theme' => 'themes/third_party/{$name}/',
);
+ /** @var array */
private $ee3Locations = array(
'addon' => 'system/user/addons/{$name}/',
'theme' => 'themes/user/{$name}/',
);
- public function getInstallPath(PackageInterface $package, $frameworkType = '')
+ public function getLocations(string $frameworkType): array
{
+ if ($frameworkType === 'ee2') {
+ $this->locations = $this->ee2Locations;
+ } else {
+ $this->locations = $this->ee3Locations;
+ }
- $version = "{$frameworkType}Locations";
- $this->locations = $this->$version;
-
- return parent::getInstallPath($package, $frameworkType);
+ return $this->locations;
}
}
diff --git a/vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php b/vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php
index f30ebcc..1f5b84e 100644
--- a/vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/EzPlatformInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'meta-assets' => 'web/assets/ezplatform/',
'assets' => 'web/assets/ezplatform/{$name}/',
diff --git a/vendor/composer/installers/src/Composer/Installers/ForkCMSInstaller.php b/vendor/composer/installers/src/Composer/Installers/ForkCMSInstaller.php
new file mode 100644
index 0000000..cf62926
--- /dev/null
+++ b/vendor/composer/installers/src/Composer/Installers/ForkCMSInstaller.php
@@ -0,0 +1,58 @@
+ */
+ protected $locations = [
+ 'module' => 'src/Modules/{$name}/',
+ 'theme' => 'src/Themes/{$name}/'
+ ];
+
+ /**
+ * Format package name.
+ *
+ * For package type fork-cms-module, cut off a trailing '-plugin' if present.
+ *
+ * For package type fork-cms-theme, cut off a trailing '-theme' if present.
+ */
+ public function inflectPackageVars(array $vars): array
+ {
+ if ($vars['type'] === 'fork-cms-module') {
+ return $this->inflectModuleVars($vars);
+ }
+
+ if ($vars['type'] === 'fork-cms-theme') {
+ return $this->inflectThemeVars($vars);
+ }
+
+ return $vars;
+ }
+
+ /**
+ * @param array $vars
+ * @return array
+ */
+ protected function inflectModuleVars(array $vars): array
+ {
+ $vars['name'] = $this->pregReplace('/^fork-cms-|-module|ForkCMS|ForkCms|Forkcms|forkcms|Module$/', '', $vars['name']);
+ $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); // replace hyphens with spaces
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name'])); // make module name camelcased
+
+ return $vars;
+ }
+
+ /**
+ * @param array $vars
+ * @return array
+ */
+ protected function inflectThemeVars(array $vars): array
+ {
+ $vars['name'] = $this->pregReplace('/^fork-cms-|-theme|ForkCMS|ForkCms|Forkcms|forkcms|Theme$/', '', $vars['name']);
+ $vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']); // replace hyphens with spaces
+ $vars['name'] = str_replace(' ', '', ucwords($vars['name'])); // make theme name camelcased
+
+ return $vars;
+ }
+}
diff --git a/vendor/composer/installers/src/Composer/Installers/FuelInstaller.php b/vendor/composer/installers/src/Composer/Installers/FuelInstaller.php
index 6eba2e3..5948572 100644
--- a/vendor/composer/installers/src/Composer/Installers/FuelInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/FuelInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'module' => 'fuel/app/modules/{$name}/',
'package' => 'fuel/packages/{$name}/',
diff --git a/vendor/composer/installers/src/Composer/Installers/FuelphpInstaller.php b/vendor/composer/installers/src/Composer/Installers/FuelphpInstaller.php
index 29d980b..b4d80ed 100644
--- a/vendor/composer/installers/src/Composer/Installers/FuelphpInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/FuelphpInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'component' => 'components/{$name}/',
);
diff --git a/vendor/composer/installers/src/Composer/Installers/GravInstaller.php b/vendor/composer/installers/src/Composer/Installers/GravInstaller.php
index dbe63e0..f5792e3 100644
--- a/vendor/composer/installers/src/Composer/Installers/GravInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/GravInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'plugin' => 'user/plugins/{$name}/',
'theme' => 'user/themes/{$name}/',
@@ -10,17 +12,14 @@ class GravInstaller extends BaseInstaller
/**
* Format package name
- *
- * @param array $vars
- *
- * @return array
*/
- public function inflectPackageVars($vars)
+ public function inflectPackageVars(array $vars): array
{
$restrictedWords = implode('|', array_keys($this->locations));
$vars['name'] = strtolower($vars['name']);
- $vars['name'] = preg_replace('/^(?:grav-)?(?:(?:'.$restrictedWords.')-)?(.*?)(?:-(?:'.$restrictedWords.'))?$/ui',
+ $vars['name'] = $this->pregReplace(
+ '/^(?:grav-)?(?:(?:'.$restrictedWords.')-)?(.*?)(?:-(?:'.$restrictedWords.'))?$/ui',
'$1',
$vars['name']
);
diff --git a/vendor/composer/installers/src/Composer/Installers/HuradInstaller.php b/vendor/composer/installers/src/Composer/Installers/HuradInstaller.php
index 8fe017f..dd76c5b 100644
--- a/vendor/composer/installers/src/Composer/Installers/HuradInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/HuradInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'plugin' => 'plugins/{$name}/',
'theme' => 'plugins/{$name}/',
@@ -11,11 +13,11 @@ class HuradInstaller extends BaseInstaller
/**
* Format package name to CamelCase
*/
- public function inflectPackageVars($vars)
+ public function inflectPackageVars(array $vars): array
{
$nameParts = explode('/', $vars['name']);
foreach ($nameParts as &$value) {
- $value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value));
+ $value = strtolower($this->pregReplace('/(?<=\\w)([A-Z])/', '_\\1', $value));
$value = str_replace(array('-', '_'), ' ', $value);
$value = str_replace(' ', '', ucwords($value));
}
diff --git a/vendor/composer/installers/src/Composer/Installers/ImageCMSInstaller.php b/vendor/composer/installers/src/Composer/Installers/ImageCMSInstaller.php
index 5e2142e..4157cec 100644
--- a/vendor/composer/installers/src/Composer/Installers/ImageCMSInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/ImageCMSInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'template' => 'templates/{$name}/',
'module' => 'application/modules/{$name}/',
diff --git a/vendor/composer/installers/src/Composer/Installers/Installer.php b/vendor/composer/installers/src/Composer/Installers/Installer.php
index 9c9c24f..862d8ae 100644
--- a/vendor/composer/installers/src/Composer/Installers/Installer.php
+++ b/vendor/composer/installers/src/Composer/Installers/Installer.php
@@ -6,6 +6,7 @@ use Composer\Composer;
use Composer\Installer\BinaryInstaller;
use Composer\Installer\LibraryInstaller;
use Composer\IO\IOInterface;
+use Composer\Package\Package;
use Composer\Package\PackageInterface;
use Composer\Repository\InstalledRepositoryInterface;
use Composer\Util\Filesystem;
@@ -13,19 +14,19 @@ use React\Promise\PromiseInterface;
class Installer extends LibraryInstaller
{
-
/**
* Package types to installer class map
*
- * @var array
+ * @var array
*/
private $supportedTypes = array(
- 'aimeos' => 'AimeosInstaller',
+ 'akaunting' => 'AkauntingInstaller',
'asgard' => 'AsgardInstaller',
'attogram' => 'AttogramInstaller',
'agl' => 'AglInstaller',
'annotatecms' => 'AnnotateCmsInstaller',
'bitrix' => 'BitrixInstaller',
+ 'botble' => 'BotbleInstaller',
'bonefish' => 'BonefishInstaller',
'cakephp' => 'CakePHPInstaller',
'chef' => 'ChefInstaller',
@@ -34,7 +35,7 @@ class Installer extends LibraryInstaller
'cockpit' => 'CockpitInstaller',
'codeigniter' => 'CodeIgniterInstaller',
'concrete5' => 'Concrete5Installer',
- 'craft' => 'CraftInstaller',
+ 'concretecms' => 'ConcreteCMSInstaller',
'croogo' => 'CroogoInstaller',
'dframe' => 'DframeInstaller',
'dokuwiki' => 'DokuWikiInstaller',
@@ -46,6 +47,7 @@ class Installer extends LibraryInstaller
'ee3' => 'ExpressionEngineInstaller',
'ee2' => 'ExpressionEngineInstaller',
'ezplatform' => 'EzPlatformInstaller',
+ 'fork' => 'ForkCMSInstaller',
'fuel' => 'FuelInstaller',
'fuelphp' => 'FuelphpInstaller',
'grav' => 'GravInstaller',
@@ -53,13 +55,11 @@ class Installer extends LibraryInstaller
'tastyigniter' => 'TastyIgniterInstaller',
'imagecms' => 'ImageCMSInstaller',
'itop' => 'ItopInstaller',
- 'joomla' => 'JoomlaInstaller',
'kanboard' => 'KanboardInstaller',
- 'kirby' => 'KirbyInstaller',
'known' => 'KnownInstaller',
'kodicms' => 'KodiCMSInstaller',
'kohana' => 'KohanaInstaller',
- 'lms' => 'LanManagementSystemInstaller',
+ 'lms' => 'LanManagementSystemInstaller',
'laravel' => 'LaravelInstaller',
'lavalite' => 'LavaLiteInstaller',
'lithium' => 'LithiumInstaller',
@@ -67,6 +67,7 @@ class Installer extends LibraryInstaller
'majima' => 'MajimaInstaller',
'mantisbt' => 'MantisBTInstaller',
'mako' => 'MakoInstaller',
+ 'matomo' => 'MatomoInstaller',
'maya' => 'MayaInstaller',
'mautic' => 'MauticInstaller',
'mediawiki' => 'MediaWikiInstaller',
@@ -82,7 +83,6 @@ class Installer extends LibraryInstaller
'osclass' => 'OsclassInstaller',
'pxcms' => 'PxcmsInstaller',
'phpbb' => 'PhpBBInstaller',
- 'pimcore' => 'PimcoreInstaller',
'piwik' => 'PiwikInstaller',
'plentymarkets'=> 'PlentymarketsInstaller',
'ppi' => 'PPIInstaller',
@@ -103,12 +103,9 @@ class Installer extends LibraryInstaller
'starbug' => 'StarbugInstaller',
'sydes' => 'SyDESInstaller',
'sylius' => 'SyliusInstaller',
- 'symfony1' => 'Symfony1Installer',
'tao' => 'TaoInstaller',
'thelia' => 'TheliaInstaller',
'tusk' => 'TuskInstaller',
- 'typo3-cms' => 'TYPO3CmsInstaller',
- 'typo3-flow' => 'TYPO3FlowInstaller',
'userfrosting' => 'UserFrostingInstaller',
'vanilla' => 'VanillaInstaller',
'whmcs' => 'WHMCSInstaller',
@@ -122,26 +119,17 @@ class Installer extends LibraryInstaller
);
/**
- * Installer constructor.
- *
* Disables installers specified in main composer extra installer-disable
* list
- *
- * @param IOInterface $io
- * @param Composer $composer
- * @param string $type
- * @param Filesystem|null $filesystem
- * @param BinaryInstaller|null $binaryInstaller
*/
public function __construct(
IOInterface $io,
Composer $composer,
- $type = 'library',
- Filesystem $filesystem = null,
- BinaryInstaller $binaryInstaller = null
+ string $type = 'library',
+ ?Filesystem $filesystem = null,
+ ?BinaryInstaller $binaryInstaller = null
) {
- parent::__construct($io, $composer, $type, $filesystem,
- $binaryInstaller);
+ parent::__construct($io, $composer, $type, $filesystem, $binaryInstaller);
$this->removeDisabledInstallers();
}
@@ -160,9 +148,17 @@ class Installer extends LibraryInstaller
}
$class = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType];
+ /**
+ * @var BaseInstaller
+ */
$installer = new $class($package, $this->composer, $this->getIO());
- return $installer->getInstallPath($package, $frameworkType);
+ $path = $installer->getInstallPath($package, $frameworkType);
+ if (!$this->filesystem->isAbsolutePath($path)) {
+ $path = getcwd() . '/' . $path;
+ }
+
+ return $path;
}
public function uninstall(InstalledRepositoryInterface $repo, PackageInterface $package)
@@ -188,6 +184,8 @@ class Installer extends LibraryInstaller
/**
* {@inheritDoc}
+ *
+ * @param string $packageType
*/
public function supports($packageType)
{
@@ -205,10 +203,9 @@ class Installer extends LibraryInstaller
/**
* Finds a supported framework type if it exists and returns it
*
- * @param string $type
* @return string|false
*/
- protected function findFrameworkType($type)
+ protected function findFrameworkType(string $type)
{
krsort($this->supportedTypes);
@@ -224,30 +221,24 @@ class Installer extends LibraryInstaller
/**
* Get the second part of the regular expression to check for support of a
* package type
- *
- * @param string $frameworkType
- * @return string
*/
- protected function getLocationPattern($frameworkType)
+ protected function getLocationPattern(string $frameworkType): string
{
- $pattern = false;
+ $pattern = null;
if (!empty($this->supportedTypes[$frameworkType])) {
$frameworkClass = 'Composer\\Installers\\' . $this->supportedTypes[$frameworkType];
/** @var BaseInstaller $framework */
- $framework = new $frameworkClass(null, $this->composer, $this->getIO());
- $locations = array_keys($framework->getLocations());
- $pattern = $locations ? '(' . implode('|', $locations) . ')' : false;
+ $framework = new $frameworkClass(new Package('dummy/pkg', '1.0.0.0', '1.0.0'), $this->composer, $this->getIO());
+ $locations = array_keys($framework->getLocations($frameworkType));
+ if ($locations) {
+ $pattern = '(' . implode('|', $locations) . ')';
+ }
}
- return $pattern ? : '(\w+)';
+ return $pattern ?: '(\w+)';
}
- /**
- * Get I/O object
- *
- * @return IOInterface
- */
- private function getIO()
+ private function getIO(): IOInterface
{
return $this->io;
}
@@ -260,10 +251,8 @@ class Installer extends LibraryInstaller
* - true, "all", and "*" - disable all installers.
* - false - enable all installers (useful with
* wikimedia/composer-merge-plugin or similar)
- *
- * @return void
*/
- protected function removeDisabledInstallers()
+ protected function removeDisabledInstallers(): void
{
$extra = $this->composer->getPackage()->getExtra();
@@ -286,12 +275,13 @@ class Installer extends LibraryInstaller
if (!empty($intersect)) {
// Disable all installers
$this->supportedTypes = array();
- } else {
- // Disable specified installers
- foreach ($disable as $key => $installer) {
- if (is_string($installer) && key_exists($installer, $this->supportedTypes)) {
- unset($this->supportedTypes[$installer]);
- }
+ return;
+ }
+
+ // Disable specified installers
+ foreach ($disable as $key => $installer) {
+ if (is_string($installer) && key_exists($installer, $this->supportedTypes)) {
+ unset($this->supportedTypes[$installer]);
}
}
}
diff --git a/vendor/composer/installers/src/Composer/Installers/ItopInstaller.php b/vendor/composer/installers/src/Composer/Installers/ItopInstaller.php
index c6c1b33..06af068 100644
--- a/vendor/composer/installers/src/Composer/Installers/ItopInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/ItopInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'extension' => 'extensions/{$name}/',
);
diff --git a/vendor/composer/installers/src/Composer/Installers/JoomlaInstaller.php b/vendor/composer/installers/src/Composer/Installers/JoomlaInstaller.php
deleted file mode 100644
index 9ee7759..0000000
--- a/vendor/composer/installers/src/Composer/Installers/JoomlaInstaller.php
+++ /dev/null
@@ -1,15 +0,0 @@
- 'components/{$name}/',
- 'module' => 'modules/{$name}/',
- 'template' => 'templates/{$name}/',
- 'plugin' => 'plugins/{$name}/',
- 'library' => 'libraries/{$name}/',
- );
-
- // TODO: Add inflector for mod_ and com_ names
-}
diff --git a/vendor/composer/installers/src/Composer/Installers/KanboardInstaller.php b/vendor/composer/installers/src/Composer/Installers/KanboardInstaller.php
index 9cb7b8c..bca954b 100644
--- a/vendor/composer/installers/src/Composer/Installers/KanboardInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/KanboardInstaller.php
@@ -1,4 +1,5 @@
*/
protected $locations = array(
'plugin' => 'plugins/{$name}/',
);
diff --git a/vendor/composer/installers/src/Composer/Installers/KirbyInstaller.php b/vendor/composer/installers/src/Composer/Installers/KirbyInstaller.php
deleted file mode 100644
index 36b2f84..0000000
--- a/vendor/composer/installers/src/Composer/Installers/KirbyInstaller.php
+++ /dev/null
@@ -1,11 +0,0 @@
- 'site/plugins/{$name}/',
- 'field' => 'site/fields/{$name}/',
- 'tag' => 'site/tags/{$name}/'
- );
-}
diff --git a/vendor/composer/installers/src/Composer/Installers/KnownInstaller.php b/vendor/composer/installers/src/Composer/Installers/KnownInstaller.php
index c5d08c5..61910a8 100644
--- a/vendor/composer/installers/src/Composer/Installers/KnownInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/KnownInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'plugin' => 'IdnoPlugins/{$name}/',
'theme' => 'Themes/{$name}/',
diff --git a/vendor/composer/installers/src/Composer/Installers/KodiCMSInstaller.php b/vendor/composer/installers/src/Composer/Installers/KodiCMSInstaller.php
index 7143e23..2505ac6 100644
--- a/vendor/composer/installers/src/Composer/Installers/KodiCMSInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/KodiCMSInstaller.php
@@ -1,10 +1,12 @@
*/
protected $locations = array(
'plugin' => 'cms/plugins/{$name}/',
'media' => 'cms/media/vendor/{$name}/'
);
-}
\ No newline at end of file
+}
diff --git a/vendor/composer/installers/src/Composer/Installers/KohanaInstaller.php b/vendor/composer/installers/src/Composer/Installers/KohanaInstaller.php
index dcd6d26..b6aa809 100644
--- a/vendor/composer/installers/src/Composer/Installers/KohanaInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/KohanaInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'module' => 'modules/{$name}/',
);
diff --git a/vendor/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php b/vendor/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php
index 903143a..7fe9d9b 100644
--- a/vendor/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/LanManagementSystemInstaller.php
@@ -5,6 +5,7 @@ namespace Composer\Installers;
class LanManagementSystemInstaller extends BaseInstaller
{
+ /** @var array */
protected $locations = array(
'plugin' => 'plugins/{$name}/',
'template' => 'templates/{$name}/',
@@ -15,13 +16,12 @@ class LanManagementSystemInstaller extends BaseInstaller
/**
* Format package name to CamelCase
*/
- public function inflectPackageVars($vars)
+ public function inflectPackageVars(array $vars): array
{
- $vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
+ $vars['name'] = strtolower($this->pregReplace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars;
}
-
}
diff --git a/vendor/composer/installers/src/Composer/Installers/LaravelInstaller.php b/vendor/composer/installers/src/Composer/Installers/LaravelInstaller.php
index be4d53a..a69dc88 100644
--- a/vendor/composer/installers/src/Composer/Installers/LaravelInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/LaravelInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'library' => 'libraries/{$name}/',
);
diff --git a/vendor/composer/installers/src/Composer/Installers/LavaLiteInstaller.php b/vendor/composer/installers/src/Composer/Installers/LavaLiteInstaller.php
index 412c0b5..e4a7c7d 100644
--- a/vendor/composer/installers/src/Composer/Installers/LavaLiteInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/LavaLiteInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'package' => 'packages/{$vendor}/{$name}/',
'theme' => 'public/themes/{$name}/',
diff --git a/vendor/composer/installers/src/Composer/Installers/LithiumInstaller.php b/vendor/composer/installers/src/Composer/Installers/LithiumInstaller.php
index 47bbd4c..b24bea2 100644
--- a/vendor/composer/installers/src/Composer/Installers/LithiumInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/LithiumInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'library' => 'libraries/{$name}/',
'source' => 'libraries/_source/{$name}/',
diff --git a/vendor/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php b/vendor/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php
index 9c2e9fb..369e8b4 100644
--- a/vendor/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/MODULEWorkInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'module' => 'modules/{$name}/',
);
diff --git a/vendor/composer/installers/src/Composer/Installers/MODXEvoInstaller.php b/vendor/composer/installers/src/Composer/Installers/MODXEvoInstaller.php
index 5a66460..062a839 100644
--- a/vendor/composer/installers/src/Composer/Installers/MODXEvoInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/MODXEvoInstaller.php
@@ -1,4 +1,5 @@
*/
protected $locations = array(
'snippet' => 'assets/snippets/{$name}/',
'plugin' => 'assets/plugins/{$name}/',
diff --git a/vendor/composer/installers/src/Composer/Installers/MagentoInstaller.php b/vendor/composer/installers/src/Composer/Installers/MagentoInstaller.php
index cf18e94..ec07cd6 100644
--- a/vendor/composer/installers/src/Composer/Installers/MagentoInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/MagentoInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'theme' => 'app/design/frontend/{$name}/',
'skin' => 'skin/frontend/default/{$name}/',
diff --git a/vendor/composer/installers/src/Composer/Installers/MajimaInstaller.php b/vendor/composer/installers/src/Composer/Installers/MajimaInstaller.php
index e463756..6fc3089 100644
--- a/vendor/composer/installers/src/Composer/Installers/MajimaInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/MajimaInstaller.php
@@ -1,4 +1,5 @@
*/
protected $locations = array(
'plugin' => 'plugins/{$name}/',
);
/**
* Transforms the names
- * @param array $vars
- * @return array
+ *
+ * @param array $vars
+ * @return array
*/
- public function inflectPackageVars($vars)
+ public function inflectPackageVars(array $vars): array
{
return $this->correctPluginName($vars);
}
/**
* Change hyphenated names to camelcase
- * @param array $vars
- * @return array
+ *
+ * @param array $vars
+ * @return array
*/
- private function correctPluginName($vars)
+ private function correctPluginName(array $vars): array
{
$camelCasedName = preg_replace_callback('/(-[a-z])/', function ($matches) {
return strtoupper($matches[0][1]);
}, $vars['name']);
+
+ if (null === $camelCasedName) {
+ throw new \RuntimeException('Failed to run preg_replace_callback: '.preg_last_error());
+ }
+
$vars['name'] = ucfirst($camelCasedName);
return $vars;
}
diff --git a/vendor/composer/installers/src/Composer/Installers/MakoInstaller.php b/vendor/composer/installers/src/Composer/Installers/MakoInstaller.php
index ca3cfac..cbe3760 100644
--- a/vendor/composer/installers/src/Composer/Installers/MakoInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/MakoInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'package' => 'app/packages/{$name}/',
);
diff --git a/vendor/composer/installers/src/Composer/Installers/MantisBTInstaller.php b/vendor/composer/installers/src/Composer/Installers/MantisBTInstaller.php
index dadb1db..98e230f 100644
--- a/vendor/composer/installers/src/Composer/Installers/MantisBTInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/MantisBTInstaller.php
@@ -1,10 +1,12 @@
*/
protected $locations = array(
'plugin' => 'plugins/{$name}/',
);
@@ -12,9 +14,9 @@ class MantisBTInstaller extends BaseInstaller
/**
* Format package name to CamelCase
*/
- public function inflectPackageVars($vars)
+ public function inflectPackageVars(array $vars): array
{
- $vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
+ $vars['name'] = strtolower($this->pregReplace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
diff --git a/vendor/composer/installers/src/Composer/Installers/PimcoreInstaller.php b/vendor/composer/installers/src/Composer/Installers/MatomoInstaller.php
similarity index 53%
rename from vendor/composer/installers/src/Composer/Installers/PimcoreInstaller.php
rename to vendor/composer/installers/src/Composer/Installers/MatomoInstaller.php
index 4781fa6..57fdb03 100644
--- a/vendor/composer/installers/src/Composer/Installers/PimcoreInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/MatomoInstaller.php
@@ -1,8 +1,15 @@
*/
protected $locations = array(
'plugin' => 'plugins/{$name}/',
);
@@ -10,9 +17,9 @@ class PimcoreInstaller extends BaseInstaller
/**
* Format package name to CamelCase
*/
- public function inflectPackageVars($vars)
+ public function inflectPackageVars(array $vars): array
{
- $vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
+ $vars['name'] = strtolower($this->pregReplace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
diff --git a/vendor/composer/installers/src/Composer/Installers/MauticInstaller.php b/vendor/composer/installers/src/Composer/Installers/MauticInstaller.php
index c3dd2b6..e48c133 100644
--- a/vendor/composer/installers/src/Composer/Installers/MauticInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/MauticInstaller.php
@@ -1,17 +1,19 @@
*/
protected $locations = array(
'plugin' => 'plugins/{$name}/',
'theme' => 'themes/{$name}/',
'core' => 'app/',
);
- private function getDirectoryName()
+ private function getDirectoryName(): string
{
$extra = $this->package->getExtra();
if (!empty($extra['install-directory-name'])) {
@@ -21,12 +23,7 @@ class MauticInstaller extends BaseInstaller
return $this->toCamelCase($this->package->getPrettyName());
}
- /**
- * @param string $packageName
- *
- * @return string
- */
- private function toCamelCase($packageName)
+ private function toCamelCase(string $packageName): string
{
return str_replace(' ', '', ucwords(str_replace('-', ' ', basename($packageName))));
}
@@ -34,9 +31,8 @@ class MauticInstaller extends BaseInstaller
/**
* Format package name of mautic-plugins to CamelCase
*/
- public function inflectPackageVars($vars)
+ public function inflectPackageVars(array $vars): array
{
-
if ($vars['type'] == 'mautic-plugin' || $vars['type'] == 'mautic-theme') {
$directoryName = $this->getDirectoryName();
$vars['name'] = $directoryName;
@@ -44,5 +40,4 @@ class MauticInstaller extends BaseInstaller
return $vars;
}
-
}
diff --git a/vendor/composer/installers/src/Composer/Installers/MayaInstaller.php b/vendor/composer/installers/src/Composer/Installers/MayaInstaller.php
index 30a9167..df486da 100644
--- a/vendor/composer/installers/src/Composer/Installers/MayaInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/MayaInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'module' => 'modules/{$name}/',
);
@@ -11,9 +13,8 @@ class MayaInstaller extends BaseInstaller
* Format package name.
*
* For package type maya-module, cut off a trailing '-module' if present.
- *
*/
- public function inflectPackageVars($vars)
+ public function inflectPackageVars(array $vars): array
{
if ($vars['type'] === 'maya-module') {
return $this->inflectModuleVars($vars);
@@ -22,9 +23,13 @@ class MayaInstaller extends BaseInstaller
return $vars;
}
- protected function inflectModuleVars($vars)
+ /**
+ * @param array $vars
+ * @return array
+ */
+ protected function inflectModuleVars(array $vars): array
{
- $vars['name'] = preg_replace('/-module$/', '', $vars['name']);
+ $vars['name'] = $this->pregReplace('/-module$/', '', $vars['name']);
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
diff --git a/vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php b/vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php
index f5a8957..8e9d771 100644
--- a/vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/MediaWikiInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'core' => 'core/',
'extension' => 'extensions/{$name}/',
@@ -16,11 +18,9 @@ class MediaWikiInstaller extends BaseInstaller
* to CamelCase keeping existing uppercase chars.
*
* For package type mediawiki-skin, cut off a trailing '-skin' if present.
- *
*/
- public function inflectPackageVars($vars)
+ public function inflectPackageVars(array $vars): array
{
-
if ($vars['type'] === 'mediawiki-extension') {
return $this->inflectExtensionVars($vars);
}
@@ -32,20 +32,27 @@ class MediaWikiInstaller extends BaseInstaller
return $vars;
}
- protected function inflectExtensionVars($vars)
+ /**
+ * @param array $vars
+ * @return array
+ */
+ protected function inflectExtensionVars(array $vars): array
{
- $vars['name'] = preg_replace('/-extension$/', '', $vars['name']);
+ $vars['name'] = $this->pregReplace('/-extension$/', '', $vars['name']);
$vars['name'] = str_replace('-', ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars;
}
- protected function inflectSkinVars($vars)
+ /**
+ * @param array $vars
+ * @return array
+ */
+ protected function inflectSkinVars(array $vars): array
{
- $vars['name'] = preg_replace('/-skin$/', '', $vars['name']);
+ $vars['name'] = $this->pregReplace('/-skin$/', '', $vars['name']);
return $vars;
}
-
}
diff --git a/vendor/composer/installers/src/Composer/Installers/MiaoxingInstaller.php b/vendor/composer/installers/src/Composer/Installers/MiaoxingInstaller.php
index 66d8369..0254177 100644
--- a/vendor/composer/installers/src/Composer/Installers/MiaoxingInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/MiaoxingInstaller.php
@@ -4,6 +4,7 @@ namespace Composer\Installers;
class MiaoxingInstaller extends BaseInstaller
{
+ /** @var array */
protected $locations = array(
'plugin' => 'plugins/{$name}/',
);
diff --git a/vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php b/vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php
index b7d9703..a4d97ab 100644
--- a/vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/MicroweberInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'module' => 'userfiles/modules/{$install_item_dir}/',
'module-skin' => 'userfiles/modules/{$install_item_dir}/templates/',
@@ -18,13 +20,10 @@ class MicroweberInstaller extends BaseInstaller
* For package type microweber-module, cut off a trailing '-module' if present
*
* For package type microweber-template, cut off a trailing '-template' if present.
- *
*/
- public function inflectPackageVars($vars)
+ public function inflectPackageVars(array $vars): array
{
-
-
- if ($this->package->getTargetDir()) {
+ if ($this->package->getTargetDir() !== null && $this->package->getTargetDir() !== '') {
$vars['install_item_dir'] = $this->package->getTargetDir();
} else {
$vars['install_item_dir'] = $vars['name'];
@@ -54,65 +53,92 @@ class MicroweberInstaller extends BaseInstaller
}
}
+ return $vars;
+ }
+
+ /**
+ * @param array $vars
+ * @return array
+ */
+ protected function inflectTemplateVars(array $vars): array
+ {
+ $vars['install_item_dir'] = $this->pregReplace('/-template$/', '', $vars['install_item_dir']);
+ $vars['install_item_dir'] = $this->pregReplace('/template-$/', '', $vars['install_item_dir']);
return $vars;
}
- protected function inflectTemplateVars($vars)
+ /**
+ * @param array $vars
+ * @return array
+ */
+ protected function inflectTemplatesVars(array $vars): array
{
- $vars['install_item_dir'] = preg_replace('/-template$/', '', $vars['install_item_dir']);
- $vars['install_item_dir'] = preg_replace('/template-$/', '', $vars['install_item_dir']);
+ $vars['install_item_dir'] = $this->pregReplace('/-templates$/', '', $vars['install_item_dir']);
+ $vars['install_item_dir'] = $this->pregReplace('/templates-$/', '', $vars['install_item_dir']);
return $vars;
}
- protected function inflectTemplatesVars($vars)
+ /**
+ * @param array $vars
+ * @return array
+ */
+ protected function inflectCoreVars(array $vars): array
{
- $vars['install_item_dir'] = preg_replace('/-templates$/', '', $vars['install_item_dir']);
- $vars['install_item_dir'] = preg_replace('/templates-$/', '', $vars['install_item_dir']);
+ $vars['install_item_dir'] = $this->pregReplace('/-providers$/', '', $vars['install_item_dir']);
+ $vars['install_item_dir'] = $this->pregReplace('/-provider$/', '', $vars['install_item_dir']);
+ $vars['install_item_dir'] = $this->pregReplace('/-adapter$/', '', $vars['install_item_dir']);
return $vars;
}
- protected function inflectCoreVars($vars)
+ /**
+ * @param array $vars
+ * @return array
+ */
+ protected function inflectModuleVars(array $vars): array
{
- $vars['install_item_dir'] = preg_replace('/-providers$/', '', $vars['install_item_dir']);
- $vars['install_item_dir'] = preg_replace('/-provider$/', '', $vars['install_item_dir']);
- $vars['install_item_dir'] = preg_replace('/-adapter$/', '', $vars['install_item_dir']);
+ $vars['install_item_dir'] = $this->pregReplace('/-module$/', '', $vars['install_item_dir']);
+ $vars['install_item_dir'] = $this->pregReplace('/module-$/', '', $vars['install_item_dir']);
return $vars;
}
- protected function inflectModuleVars($vars)
+ /**
+ * @param array $vars
+ * @return array
+ */
+ protected function inflectModulesVars(array $vars): array
{
- $vars['install_item_dir'] = preg_replace('/-module$/', '', $vars['install_item_dir']);
- $vars['install_item_dir'] = preg_replace('/module-$/', '', $vars['install_item_dir']);
+ $vars['install_item_dir'] = $this->pregReplace('/-modules$/', '', $vars['install_item_dir']);
+ $vars['install_item_dir'] = $this->pregReplace('/modules-$/', '', $vars['install_item_dir']);
return $vars;
}
- protected function inflectModulesVars($vars)
+ /**
+ * @param array $vars
+ * @return array
+ */
+ protected function inflectSkinVars(array $vars): array
{
- $vars['install_item_dir'] = preg_replace('/-modules$/', '', $vars['install_item_dir']);
- $vars['install_item_dir'] = preg_replace('/modules-$/', '', $vars['install_item_dir']);
+ $vars['install_item_dir'] = $this->pregReplace('/-skin$/', '', $vars['install_item_dir']);
+ $vars['install_item_dir'] = $this->pregReplace('/skin-$/', '', $vars['install_item_dir']);
return $vars;
}
- protected function inflectSkinVars($vars)
+ /**
+ * @param array $vars
+ * @return array
+ */
+ protected function inflectElementVars(array $vars): array
{
- $vars['install_item_dir'] = preg_replace('/-skin$/', '', $vars['install_item_dir']);
- $vars['install_item_dir'] = preg_replace('/skin-$/', '', $vars['install_item_dir']);
-
- return $vars;
- }
-
- protected function inflectElementVars($vars)
- {
- $vars['install_item_dir'] = preg_replace('/-elements$/', '', $vars['install_item_dir']);
- $vars['install_item_dir'] = preg_replace('/elements-$/', '', $vars['install_item_dir']);
- $vars['install_item_dir'] = preg_replace('/-element$/', '', $vars['install_item_dir']);
- $vars['install_item_dir'] = preg_replace('/element-$/', '', $vars['install_item_dir']);
+ $vars['install_item_dir'] = $this->pregReplace('/-elements$/', '', $vars['install_item_dir']);
+ $vars['install_item_dir'] = $this->pregReplace('/elements-$/', '', $vars['install_item_dir']);
+ $vars['install_item_dir'] = $this->pregReplace('/-element$/', '', $vars['install_item_dir']);
+ $vars['install_item_dir'] = $this->pregReplace('/element-$/', '', $vars['install_item_dir']);
return $vars;
}
diff --git a/vendor/composer/installers/src/Composer/Installers/ModxInstaller.php b/vendor/composer/installers/src/Composer/Installers/ModxInstaller.php
index 0ee140a..e2dddec 100644
--- a/vendor/composer/installers/src/Composer/Installers/ModxInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/ModxInstaller.php
@@ -1,4 +1,5 @@
*/
protected $locations = array(
'extra' => 'core/packages/{$name}/'
);
diff --git a/vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php b/vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php
index 0531799..eb2b8ac 100644
--- a/vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/MoodleInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'mod' => 'mod/{$name}/',
'admin_report' => 'admin/report/{$name}/',
@@ -11,6 +13,7 @@ class MoodleInstaller extends BaseInstaller
'assignment' => 'mod/assignment/type/{$name}/',
'assignsubmission' => 'mod/assign/submission/{$name}/',
'assignfeedback' => 'mod/assign/feedback/{$name}/',
+ 'antivirus' => 'lib/antivirus/{$name}/',
'auth' => 'auth/{$name}/',
'availability' => 'availability/condition/{$name}/',
'block' => 'blocks/{$name}/',
@@ -18,27 +21,37 @@ class MoodleInstaller extends BaseInstaller
'cachestore' => 'cache/stores/{$name}/',
'cachelock' => 'cache/locks/{$name}/',
'calendartype' => 'calendar/type/{$name}/',
+ 'communication' => 'communication/provider/{$name}/',
+ 'customfield' => 'customfield/field/{$name}/',
'fileconverter' => 'files/converter/{$name}/',
'format' => 'course/format/{$name}/',
'coursereport' => 'course/report/{$name}/',
+ 'contenttype' => 'contentbank/contenttype/{$name}/',
'customcertelement' => 'mod/customcert/element/{$name}/',
'datafield' => 'mod/data/field/{$name}/',
+ 'dataformat' => 'dataformat/{$name}/',
'datapreset' => 'mod/data/preset/{$name}/',
'editor' => 'lib/editor/{$name}/',
'enrol' => 'enrol/{$name}/',
'filter' => 'filter/{$name}/',
+ 'forumreport' => 'mod/forum/report/{$name}/',
'gradeexport' => 'grade/export/{$name}/',
'gradeimport' => 'grade/import/{$name}/',
'gradereport' => 'grade/report/{$name}/',
'gradingform' => 'grade/grading/form/{$name}/',
+ 'h5plib' => 'h5p/h5plib/{$name}/',
'local' => 'local/{$name}/',
'logstore' => 'admin/tool/log/store/{$name}/',
'ltisource' => 'mod/lti/source/{$name}/',
'ltiservice' => 'mod/lti/service/{$name}/',
+ 'media' => 'media/player/{$name}/',
'message' => 'message/output/{$name}/',
+ 'mlbackend' => 'lib/mlbackend/{$name}/',
'mnetservice' => 'mnet/service/{$name}/',
+ 'paygw' => 'payment/gateway/{$name}/',
'plagiarism' => 'plagiarism/{$name}/',
'portfolio' => 'portfolio/{$name}/',
+ 'qbank' => 'question/bank/{$name}/',
'qbehaviour' => 'question/behaviour/{$name}/',
'qformat' => 'question/format/{$name}/',
'qtype' => 'question/type/{$name}/',
@@ -49,6 +62,7 @@ class MoodleInstaller extends BaseInstaller
'scormreport' => 'mod/scorm/report/{$name}/',
'search' => 'search/engine/{$name}/',
'theme' => 'theme/{$name}/',
+ 'tiny' => 'lib/editor/tiny/plugins/{$name}/',
'tinymce' => 'lib/editor/tinymce/plugins/{$name}/',
'profilefield' => 'user/profile/field/{$name}/',
'webservice' => 'webservice/{$name}/',
diff --git a/vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php b/vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php
index 489ef02..524f17d 100644
--- a/vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/OctoberInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'module' => 'modules/{$name}/',
'plugin' => 'plugins/{$vendor}/{$name}/',
@@ -15,9 +17,8 @@ class OctoberInstaller extends BaseInstaller
* For package type october-plugin, cut off a trailing '-plugin' if present.
*
* For package type october-theme, cut off a trailing '-theme' if present.
- *
*/
- public function inflectPackageVars($vars)
+ public function inflectPackageVars(array $vars): array
{
if ($vars['type'] === 'october-plugin') {
return $this->inflectPluginVars($vars);
@@ -30,18 +31,26 @@ class OctoberInstaller extends BaseInstaller
return $vars;
}
- protected function inflectPluginVars($vars)
+ /**
+ * @param array $vars
+ * @return array
+ */
+ protected function inflectPluginVars(array $vars): array
{
- $vars['name'] = preg_replace('/^oc-|-plugin$/', '', $vars['name']);
- $vars['vendor'] = preg_replace('/[^a-z0-9_]/i', '', $vars['vendor']);
+ $vars['name'] = $this->pregReplace('/^oc-|-plugin$/', '', $vars['name']);
+ $vars['vendor'] = $this->pregReplace('/[^a-z0-9_]/i', '', $vars['vendor']);
return $vars;
}
- protected function inflectThemeVars($vars)
+ /**
+ * @param array $vars
+ * @return array
+ */
+ protected function inflectThemeVars(array $vars): array
{
- $vars['name'] = preg_replace('/^oc-|-theme$/', '', $vars['name']);
- $vars['vendor'] = preg_replace('/[^a-z0-9_]/i', '', $vars['vendor']);
+ $vars['name'] = $this->pregReplace('/^oc-|-theme$/', '', $vars['name']);
+ $vars['vendor'] = $this->pregReplace('/[^a-z0-9_]/i', '', $vars['vendor']);
return $vars;
}
diff --git a/vendor/composer/installers/src/Composer/Installers/OntoWikiInstaller.php b/vendor/composer/installers/src/Composer/Installers/OntoWikiInstaller.php
index 5dd3438..fd20c1a 100644
--- a/vendor/composer/installers/src/Composer/Installers/OntoWikiInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/OntoWikiInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'extension' => 'extensions/{$name}/',
'theme' => 'extensions/themes/{$name}/',
@@ -12,12 +14,12 @@ class OntoWikiInstaller extends BaseInstaller
/**
* Format package name to lower case and remove ".ontowiki" suffix
*/
- public function inflectPackageVars($vars)
+ public function inflectPackageVars(array $vars): array
{
$vars['name'] = strtolower($vars['name']);
- $vars['name'] = preg_replace('/.ontowiki$/', '', $vars['name']);
- $vars['name'] = preg_replace('/-theme$/', '', $vars['name']);
- $vars['name'] = preg_replace('/-translation$/', '', $vars['name']);
+ $vars['name'] = $this->pregReplace('/.ontowiki$/', '', $vars['name']);
+ $vars['name'] = $this->pregReplace('/-theme$/', '', $vars['name']);
+ $vars['name'] = $this->pregReplace('/-translation$/', '', $vars['name']);
return $vars;
}
diff --git a/vendor/composer/installers/src/Composer/Installers/OsclassInstaller.php b/vendor/composer/installers/src/Composer/Installers/OsclassInstaller.php
index 3ca7954..e61d61f 100644
--- a/vendor/composer/installers/src/Composer/Installers/OsclassInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/OsclassInstaller.php
@@ -1,14 +1,14 @@
*/
protected $locations = array(
'plugin' => 'oc-content/plugins/{$name}/',
'theme' => 'oc-content/themes/{$name}/',
'language' => 'oc-content/languages/{$name}/',
);
-
}
diff --git a/vendor/composer/installers/src/Composer/Installers/OxidInstaller.php b/vendor/composer/installers/src/Composer/Installers/OxidInstaller.php
index 1797a22..6e1e862 100644
--- a/vendor/composer/installers/src/Composer/Installers/OxidInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/OxidInstaller.php
@@ -1,59 +1,49 @@
.+)\/.+/';
+ const VENDOR_PATTERN = '/^modules\/(?P.+)\/.+/';
+ /** @var array */
protected $locations = array(
'module' => 'modules/{$name}/',
'theme' => 'application/views/{$name}/',
'out' => 'out/{$name}/',
);
- /**
- * getInstallPath
- *
- * @param PackageInterface $package
- * @param string $frameworkType
- * @return string
- */
- public function getInstallPath(PackageInterface $package, $frameworkType = '')
- {
- $installPath = parent::getInstallPath($package, $frameworkType);
- $type = $this->package->getType();
- if ($type === 'oxid-module') {
- $this->prepareVendorDirectory($installPath);
- }
- return $installPath;
- }
+ public function getInstallPath(PackageInterface $package, string $frameworkType = ''): string
+ {
+ $installPath = parent::getInstallPath($package, $frameworkType);
+ $type = $this->package->getType();
+ if ($type === 'oxid-module') {
+ $this->prepareVendorDirectory($installPath);
+ }
+ return $installPath;
+ }
- /**
- * prepareVendorDirectory
- *
- * Makes sure there is a vendormetadata.php file inside
- * the vendor folder if there is a vendor folder.
- *
- * @param string $installPath
- * @return void
- */
- protected function prepareVendorDirectory($installPath)
- {
- $matches = '';
- $hasVendorDirectory = preg_match(self::VENDOR_PATTERN, $installPath, $matches);
- if (!$hasVendorDirectory) {
- return;
- }
+ /**
+ * Makes sure there is a vendormetadata.php file inside
+ * the vendor folder if there is a vendor folder.
+ */
+ protected function prepareVendorDirectory(string $installPath): void
+ {
+ $matches = '';
+ $hasVendorDirectory = preg_match(self::VENDOR_PATTERN, $installPath, $matches);
+ if (!$hasVendorDirectory) {
+ return;
+ }
- $vendorDirectory = $matches['vendor'];
- $vendorPath = getcwd() . '/modules/' . $vendorDirectory;
- if (!file_exists($vendorPath)) {
- mkdir($vendorPath, 0755, true);
- }
+ $vendorDirectory = $matches['vendor'];
+ $vendorPath = getcwd() . '/modules/' . $vendorDirectory;
+ if (!file_exists($vendorPath)) {
+ mkdir($vendorPath, 0755, true);
+ }
- $vendorMetaDataPath = $vendorPath . '/vendormetadata.php';
- touch($vendorMetaDataPath);
- }
+ $vendorMetaDataPath = $vendorPath . '/vendormetadata.php';
+ touch($vendorMetaDataPath);
+ }
}
diff --git a/vendor/composer/installers/src/Composer/Installers/PPIInstaller.php b/vendor/composer/installers/src/Composer/Installers/PPIInstaller.php
index 170136f..714c467 100644
--- a/vendor/composer/installers/src/Composer/Installers/PPIInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/PPIInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'module' => 'modules/{$name}/',
);
diff --git a/vendor/composer/installers/src/Composer/Installers/PhiftyInstaller.php b/vendor/composer/installers/src/Composer/Installers/PhiftyInstaller.php
index 4e59a8a..3c970e2 100644
--- a/vendor/composer/installers/src/Composer/Installers/PhiftyInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/PhiftyInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'bundle' => 'bundles/{$name}/',
'library' => 'libraries/{$name}/',
diff --git a/vendor/composer/installers/src/Composer/Installers/PhpBBInstaller.php b/vendor/composer/installers/src/Composer/Installers/PhpBBInstaller.php
index deb2b77..d53ee4f 100644
--- a/vendor/composer/installers/src/Composer/Installers/PhpBBInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/PhpBBInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'extension' => 'ext/{$vendor}/{$name}/',
'language' => 'language/{$name}/',
diff --git a/vendor/composer/installers/src/Composer/Installers/PiwikInstaller.php b/vendor/composer/installers/src/Composer/Installers/PiwikInstaller.php
index c17f457..b2faf44 100644
--- a/vendor/composer/installers/src/Composer/Installers/PiwikInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/PiwikInstaller.php
@@ -1,4 +1,5 @@
*/
protected $locations = array(
'plugin' => 'plugins/{$name}/',
);
/**
* Format package name to CamelCase
- * @param array $vars
- *
- * @return array
*/
- public function inflectPackageVars($vars)
+ public function inflectPackageVars(array $vars): array
{
- $vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
+ $vars['name'] = strtolower($this->pregReplace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
diff --git a/vendor/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php b/vendor/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php
index 903e55f..0c06359 100644
--- a/vendor/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/PlentymarketsInstaller.php
@@ -1,28 +1,27 @@
*/
protected $locations = array(
'plugin' => '{$name}/'
);
/**
* Remove hyphen, "plugin" and format to camelcase
- * @param array $vars
- *
- * @return array
*/
- public function inflectPackageVars($vars)
+ public function inflectPackageVars(array $vars): array
{
- $vars['name'] = explode("-", $vars['name']);
- foreach ($vars['name'] as $key => $name) {
- $vars['name'][$key] = ucfirst($vars['name'][$key]);
+ $nameBits = explode("-", $vars['name']);
+ foreach ($nameBits as $key => $name) {
+ $nameBits[$key] = ucfirst($name);
if (strcasecmp($name, "Plugin") == 0) {
- unset($vars['name'][$key]);
+ unset($nameBits[$key]);
}
}
- $vars['name'] = implode("",$vars['name']);
+ $vars['name'] = implode('', $nameBits);
return $vars;
}
diff --git a/vendor/composer/installers/src/Composer/Installers/Plugin.php b/vendor/composer/installers/src/Composer/Installers/Plugin.php
index e60da0e..437a949 100644
--- a/vendor/composer/installers/src/Composer/Installers/Plugin.php
+++ b/vendor/composer/installers/src/Composer/Installers/Plugin.php
@@ -8,20 +8,21 @@ use Composer\Plugin\PluginInterface;
class Plugin implements PluginInterface
{
+ /** @var Installer */
private $installer;
- public function activate(Composer $composer, IOInterface $io)
+ public function activate(Composer $composer, IOInterface $io): void
{
$this->installer = new Installer($io, $composer);
$composer->getInstallationManager()->addInstaller($this->installer);
}
- public function deactivate(Composer $composer, IOInterface $io)
+ public function deactivate(Composer $composer, IOInterface $io): void
{
$composer->getInstallationManager()->removeInstaller($this->installer);
}
- public function uninstall(Composer $composer, IOInterface $io)
+ public function uninstall(Composer $composer, IOInterface $io): void
{
}
}
diff --git a/vendor/composer/installers/src/Composer/Installers/PortoInstaller.php b/vendor/composer/installers/src/Composer/Installers/PortoInstaller.php
index dbf85e6..a01d7a0 100644
--- a/vendor/composer/installers/src/Composer/Installers/PortoInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/PortoInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'container' => 'app/Containers/{$name}/',
);
diff --git a/vendor/composer/installers/src/Composer/Installers/PrestashopInstaller.php b/vendor/composer/installers/src/Composer/Installers/PrestashopInstaller.php
index 4c8421e..23f156f 100644
--- a/vendor/composer/installers/src/Composer/Installers/PrestashopInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/PrestashopInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'module' => 'modules/{$name}/',
'theme' => 'themes/{$name}/',
diff --git a/vendor/composer/installers/src/Composer/Installers/ProcessWireInstaller.php b/vendor/composer/installers/src/Composer/Installers/ProcessWireInstaller.php
index e6834a0..a7eb1ee 100644
--- a/vendor/composer/installers/src/Composer/Installers/ProcessWireInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/ProcessWireInstaller.php
@@ -4,6 +4,7 @@ namespace Composer\Installers;
class ProcessWireInstaller extends BaseInstaller
{
+ /** @var array */
protected $locations = array(
'module' => 'site/modules/{$name}/',
);
@@ -11,9 +12,9 @@ class ProcessWireInstaller extends BaseInstaller
/**
* Format package name to CamelCase
*/
- public function inflectPackageVars($vars)
+ public function inflectPackageVars(array $vars): array
{
- $vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
+ $vars['name'] = strtolower($this->pregReplace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
diff --git a/vendor/composer/installers/src/Composer/Installers/PuppetInstaller.php b/vendor/composer/installers/src/Composer/Installers/PuppetInstaller.php
index 77cc3dd..1a0a8a3 100644
--- a/vendor/composer/installers/src/Composer/Installers/PuppetInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/PuppetInstaller.php
@@ -5,6 +5,7 @@ namespace Composer\Installers;
class PuppetInstaller extends BaseInstaller
{
+ /** @var array */
protected $locations = array(
'module' => 'modules/{$name}/',
);
diff --git a/vendor/composer/installers/src/Composer/Installers/PxcmsInstaller.php b/vendor/composer/installers/src/Composer/Installers/PxcmsInstaller.php
index 6551058..fc58b8a 100644
--- a/vendor/composer/installers/src/Composer/Installers/PxcmsInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/PxcmsInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'module' => 'app/Modules/{$name}/',
'theme' => 'themes/{$name}/',
@@ -10,12 +12,8 @@ class PxcmsInstaller extends BaseInstaller
/**
* Format package name.
- *
- * @param array $vars
- *
- * @return array
*/
- public function inflectPackageVars($vars)
+ public function inflectPackageVars(array $vars): array
{
if ($vars['type'] === 'pxcms-module') {
return $this->inflectModuleVars($vars);
@@ -31,30 +29,31 @@ class PxcmsInstaller extends BaseInstaller
/**
* For package type pxcms-module, cut off a trailing '-plugin' if present.
*
- * return string
+ * @param array $vars
+ * @return array
*/
- protected function inflectModuleVars($vars)
+ protected function inflectModuleVars(array $vars): array
{
$vars['name'] = str_replace('pxcms-', '', $vars['name']); // strip out pxcms- just incase (legacy)
$vars['name'] = str_replace('module-', '', $vars['name']); // strip out module-
- $vars['name'] = preg_replace('/-module$/', '', $vars['name']); // strip out -module
+ $vars['name'] = $this->pregReplace('/-module$/', '', $vars['name']); // strip out -module
$vars['name'] = str_replace('-', '_', $vars['name']); // make -'s be _'s
$vars['name'] = ucwords($vars['name']); // make module name camelcased
return $vars;
}
-
/**
* For package type pxcms-module, cut off a trailing '-plugin' if present.
*
- * return string
+ * @param array $vars
+ * @return array
*/
- protected function inflectThemeVars($vars)
+ protected function inflectThemeVars(array $vars): array
{
$vars['name'] = str_replace('pxcms-', '', $vars['name']); // strip out pxcms- just incase (legacy)
$vars['name'] = str_replace('theme-', '', $vars['name']); // strip out theme-
- $vars['name'] = preg_replace('/-theme$/', '', $vars['name']); // strip out -theme
+ $vars['name'] = $this->pregReplace('/-theme$/', '', $vars['name']); // strip out -theme
$vars['name'] = str_replace('-', '_', $vars['name']); // make -'s be _'s
$vars['name'] = ucwords($vars['name']); // make module name camelcased
diff --git a/vendor/composer/installers/src/Composer/Installers/RadPHPInstaller.php b/vendor/composer/installers/src/Composer/Installers/RadPHPInstaller.php
index 0f78b5c..4caae51 100644
--- a/vendor/composer/installers/src/Composer/Installers/RadPHPInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/RadPHPInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'bundle' => 'src/{$name}/'
);
@@ -10,11 +12,11 @@ class RadPHPInstaller extends BaseInstaller
/**
* Format package name to CamelCase
*/
- public function inflectPackageVars($vars)
+ public function inflectPackageVars(array $vars): array
{
$nameParts = explode('/', $vars['name']);
foreach ($nameParts as &$value) {
- $value = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $value));
+ $value = strtolower($this->pregReplace('/(?<=\\w)([A-Z])/', '_\\1', $value));
$value = str_replace(array('-', '_'), ' ', $value);
$value = str_replace(' ', '', ucwords($value));
}
diff --git a/vendor/composer/installers/src/Composer/Installers/ReIndexInstaller.php b/vendor/composer/installers/src/Composer/Installers/ReIndexInstaller.php
index 252c733..a19eaaf 100644
--- a/vendor/composer/installers/src/Composer/Installers/ReIndexInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/ReIndexInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'theme' => 'themes/{$name}/',
'plugin' => 'plugins/{$name}/'
diff --git a/vendor/composer/installers/src/Composer/Installers/Redaxo5Installer.php b/vendor/composer/installers/src/Composer/Installers/Redaxo5Installer.php
index 23a2034..b62c926 100644
--- a/vendor/composer/installers/src/Composer/Installers/Redaxo5Installer.php
+++ b/vendor/composer/installers/src/Composer/Installers/Redaxo5Installer.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'addon' => 'redaxo/src/addons/{$name}/',
'bestyle-plugin' => 'redaxo/src/addons/be_style/plugins/{$name}/'
diff --git a/vendor/composer/installers/src/Composer/Installers/RedaxoInstaller.php b/vendor/composer/installers/src/Composer/Installers/RedaxoInstaller.php
index 0954457..26b3aa8 100644
--- a/vendor/composer/installers/src/Composer/Installers/RedaxoInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/RedaxoInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'addon' => 'redaxo/include/addons/{$name}/',
'bestyle-plugin' => 'redaxo/include/addons/be_style/plugins/{$name}/'
diff --git a/vendor/composer/installers/src/Composer/Installers/RoundcubeInstaller.php b/vendor/composer/installers/src/Composer/Installers/RoundcubeInstaller.php
index d8d795b..7e71674 100644
--- a/vendor/composer/installers/src/Composer/Installers/RoundcubeInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/RoundcubeInstaller.php
@@ -1,19 +1,18 @@
*/
protected $locations = array(
'plugin' => 'plugins/{$name}/',
);
/**
* Lowercase name and changes the name to a underscores
- *
- * @param array $vars
- * @return array
*/
- public function inflectPackageVars($vars)
+ public function inflectPackageVars(array $vars): array
{
$vars['name'] = strtolower(str_replace('-', '_', $vars['name']));
diff --git a/vendor/composer/installers/src/Composer/Installers/SMFInstaller.php b/vendor/composer/installers/src/Composer/Installers/SMFInstaller.php
index 1acd3b1..7321046 100644
--- a/vendor/composer/installers/src/Composer/Installers/SMFInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/SMFInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'module' => 'Sources/{$name}/',
'theme' => 'Themes/{$name}/',
diff --git a/vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php b/vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php
index 7d20d27..82b8e28 100644
--- a/vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/ShopwareInstaller.php
@@ -1,4 +1,5 @@
*/
protected $locations = array(
'backend-plugin' => 'engine/Shopware/Plugins/Local/Backend/{$name}/',
'core-plugin' => 'engine/Shopware/Plugins/Local/Core/{$name}/',
@@ -18,29 +20,32 @@ class ShopwareInstaller extends BaseInstaller
/**
* Transforms the names
- * @param array $vars
- * @return array
*/
- public function inflectPackageVars($vars)
+ public function inflectPackageVars(array $vars): array
{
if ($vars['type'] === 'shopware-theme') {
return $this->correctThemeName($vars);
}
- return $this->correctPluginName($vars);
+ return $this->correctPluginName($vars);
}
/**
* Changes the name to a camelcased combination of vendor and name
- * @param array $vars
- * @return array
+ *
+ * @param array $vars
+ * @return array
*/
- private function correctPluginName($vars)
+ private function correctPluginName(array $vars): array
{
$camelCasedName = preg_replace_callback('/(-[a-z])/', function ($matches) {
return strtoupper($matches[0][1]);
}, $vars['name']);
+ if (null === $camelCasedName) {
+ throw new \RuntimeException('Failed to run preg_replace_callback: '.preg_last_error());
+ }
+
$vars['name'] = ucfirst($vars['vendor']) . ucfirst($camelCasedName);
return $vars;
@@ -48,10 +53,11 @@ class ShopwareInstaller extends BaseInstaller
/**
* Changes the name to a underscore separated name
- * @param array $vars
- * @return array
+ *
+ * @param array $vars
+ * @return array
*/
- private function correctThemeName($vars)
+ private function correctThemeName(array $vars): array
{
$vars['name'] = str_replace('-', '_', $vars['name']);
diff --git a/vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php b/vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php
index 81910e9..aa2de21 100644
--- a/vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/SilverStripeInstaller.php
@@ -1,10 +1,12 @@
*/
protected $locations = array(
'module' => '{$name}/',
'theme' => 'themes/{$name}/',
@@ -15,12 +17,8 @@ class SilverStripeInstaller extends BaseInstaller
*
* Relies on built-in BaseInstaller behaviour with one exception: silverstripe/framework
* must be installed to 'sapphire' and not 'framework' if the version is <3.0.0
- *
- * @param PackageInterface $package
- * @param string $frameworkType
- * @return string
*/
- public function getInstallPath(PackageInterface $package, $frameworkType = '')
+ public function getInstallPath(PackageInterface $package, string $frameworkType = ''): string
{
if (
$package->getName() == 'silverstripe/framework'
diff --git a/vendor/composer/installers/src/Composer/Installers/SiteDirectInstaller.php b/vendor/composer/installers/src/Composer/Installers/SiteDirectInstaller.php
index 762d94c..0af3239 100644
--- a/vendor/composer/installers/src/Composer/Installers/SiteDirectInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/SiteDirectInstaller.php
@@ -4,17 +4,26 @@ namespace Composer\Installers;
class SiteDirectInstaller extends BaseInstaller
{
+ /** @var array */
protected $locations = array(
'module' => 'modules/{$vendor}/{$name}/',
'plugin' => 'plugins/{$vendor}/{$name}/'
);
- public function inflectPackageVars($vars)
+ /**
+ * @param array $vars
+ * @return array
+ */
+ public function inflectPackageVars(array $vars): array
{
return $this->parseVars($vars);
}
- protected function parseVars($vars)
+ /**
+ * @param array $vars
+ * @return array
+ */
+ protected function parseVars(array $vars): array
{
$vars['vendor'] = strtolower($vars['vendor']) == 'sitedirect' ? 'SiteDirect' : $vars['vendor'];
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
diff --git a/vendor/composer/installers/src/Composer/Installers/StarbugInstaller.php b/vendor/composer/installers/src/Composer/Installers/StarbugInstaller.php
index a31c9fd..72afa08 100644
--- a/vendor/composer/installers/src/Composer/Installers/StarbugInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/StarbugInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'module' => 'modules/{$name}/',
'theme' => 'themes/{$name}/',
diff --git a/vendor/composer/installers/src/Composer/Installers/SyDESInstaller.php b/vendor/composer/installers/src/Composer/Installers/SyDESInstaller.php
index 8626a9b..24673d2 100644
--- a/vendor/composer/installers/src/Composer/Installers/SyDESInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/SyDESInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'module' => 'app/modules/{$name}/',
'theme' => 'themes/{$name}/',
@@ -12,10 +14,8 @@ class SyDESInstaller extends BaseInstaller
* Format module name.
*
* Strip `sydes-` prefix and a trailing '-theme' or '-module' from package name if present.
- *
- * {@inerhitDoc}
*/
- public function inflectPackageVars($vars)
+ public function inflectPackageVars(array $vars): array
{
if ($vars['type'] == 'sydes-module') {
return $this->inflectModuleVars($vars);
@@ -28,18 +28,26 @@ class SyDESInstaller extends BaseInstaller
return $vars;
}
- public function inflectModuleVars($vars)
+ /**
+ * @param array $vars
+ * @return array
+ */
+ public function inflectModuleVars(array $vars): array
{
- $vars['name'] = preg_replace('/(^sydes-|-module$)/i', '', $vars['name']);
+ $vars['name'] = $this->pregReplace('/(^sydes-|-module$)/i', '', $vars['name']);
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars;
}
- protected function inflectThemeVars($vars)
+ /**
+ * @param array $vars
+ * @return array
+ */
+ protected function inflectThemeVars(array $vars): array
{
- $vars['name'] = preg_replace('/(^sydes-|-theme$)/', '', $vars['name']);
+ $vars['name'] = $this->pregReplace('/(^sydes-|-theme$)/', '', $vars['name']);
$vars['name'] = strtolower($vars['name']);
return $vars;
diff --git a/vendor/composer/installers/src/Composer/Installers/SyliusInstaller.php b/vendor/composer/installers/src/Composer/Installers/SyliusInstaller.php
index 4357a35..c82bd85 100644
--- a/vendor/composer/installers/src/Composer/Installers/SyliusInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/SyliusInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'theme' => 'themes/{$name}/',
);
diff --git a/vendor/composer/installers/src/Composer/Installers/Symfony1Installer.php b/vendor/composer/installers/src/Composer/Installers/Symfony1Installer.php
deleted file mode 100644
index 1675c4f..0000000
--- a/vendor/composer/installers/src/Composer/Installers/Symfony1Installer.php
+++ /dev/null
@@ -1,26 +0,0 @@
-
- */
-class Symfony1Installer extends BaseInstaller
-{
- protected $locations = array(
- 'plugin' => 'plugins/{$name}/',
- );
-
- /**
- * Format package name to CamelCase
- */
- public function inflectPackageVars($vars)
- {
- $vars['name'] = preg_replace_callback('/(-[a-z])/', function ($matches) {
- return strtoupper($matches[0][1]);
- }, $vars['name']);
-
- return $vars;
- }
-}
diff --git a/vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php b/vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php
deleted file mode 100644
index b1663e8..0000000
--- a/vendor/composer/installers/src/Composer/Installers/TYPO3CmsInstaller.php
+++ /dev/null
@@ -1,16 +0,0 @@
-
- */
-class TYPO3CmsInstaller extends BaseInstaller
-{
- protected $locations = array(
- 'extension' => 'typo3conf/ext/{$name}/',
- );
-}
diff --git a/vendor/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php b/vendor/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php
deleted file mode 100644
index 42572f4..0000000
--- a/vendor/composer/installers/src/Composer/Installers/TYPO3FlowInstaller.php
+++ /dev/null
@@ -1,38 +0,0 @@
- 'Packages/Application/{$name}/',
- 'framework' => 'Packages/Framework/{$name}/',
- 'plugin' => 'Packages/Plugins/{$name}/',
- 'site' => 'Packages/Sites/{$name}/',
- 'boilerplate' => 'Packages/Boilerplates/{$name}/',
- 'build' => 'Build/{$name}/',
- );
-
- /**
- * Modify the package name to be a TYPO3 Flow style key.
- *
- * @param array $vars
- * @return array
- */
- public function inflectPackageVars($vars)
- {
- $autoload = $this->package->getAutoload();
- if (isset($autoload['psr-0']) && is_array($autoload['psr-0'])) {
- $namespace = key($autoload['psr-0']);
- $vars['name'] = str_replace('\\', '.', $namespace);
- }
- if (isset($autoload['psr-4']) && is_array($autoload['psr-4'])) {
- $namespace = key($autoload['psr-4']);
- $vars['name'] = rtrim(str_replace('\\', '.', $namespace), '.');
- }
-
- return $vars;
- }
-}
diff --git a/vendor/composer/installers/src/Composer/Installers/TaoInstaller.php b/vendor/composer/installers/src/Composer/Installers/TaoInstaller.php
index 4f79a45..8c1d814 100644
--- a/vendor/composer/installers/src/Composer/Installers/TaoInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/TaoInstaller.php
@@ -1,4 +1,5 @@
*/
protected $locations = array(
'extension' => '{$name}'
);
- public function inflectPackageVars($vars)
+ public function inflectPackageVars(array $vars): array
{
$extra = $this->package->getExtra();
diff --git a/vendor/composer/installers/src/Composer/Installers/TastyIgniterInstaller.php b/vendor/composer/installers/src/Composer/Installers/TastyIgniterInstaller.php
index e20e65b..39ceae0 100644
--- a/vendor/composer/installers/src/Composer/Installers/TastyIgniterInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/TastyIgniterInstaller.php
@@ -4,10 +4,12 @@ namespace Composer\Installers;
class TastyIgniterInstaller extends BaseInstaller
{
- protected $locations = array(
+ /** @var array */
+ protected $locations = [
+ 'module' => 'app/{$name}/',
'extension' => 'extensions/{$vendor}/{$name}/',
'theme' => 'themes/{$name}/',
- );
+ ];
/**
* Format package name.
@@ -16,17 +18,68 @@ class TastyIgniterInstaller extends BaseInstaller
* Strip vendor name of characters that is not alphanumeric or an underscore
*
*/
- public function inflectPackageVars($vars)
+ public function inflectPackageVars(array $vars): array
{
+ $extra = $this->package->getExtra();
+
+ if ($vars['type'] === 'tastyigniter-module') {
+ return $this->inflectModuleVars($vars);
+ }
+
if ($vars['type'] === 'tastyigniter-extension') {
- $vars['vendor'] = preg_replace('/[^a-z0-9_]/i', '', $vars['vendor']);
- $vars['name'] = preg_replace('/^ti-ext-/', '', $vars['name']);
+ return $this->inflectExtensionVars($vars, $extra);
}
if ($vars['type'] === 'tastyigniter-theme') {
- $vars['name'] = preg_replace('/^ti-theme-/', '', $vars['name']);
+ return $this->inflectThemeVars($vars, $extra);
}
return $vars;
}
-}
\ No newline at end of file
+
+ /**
+ * @param array $vars
+ * @return array
+ */
+ protected function inflectModuleVars(array $vars): array
+ {
+ $vars['name'] = $this->pregReplace('/^ti-module-/', '', $vars['name']);
+
+ return $vars;
+ }
+
+ /**
+ * @param array $vars
+ * @param array $extra
+ * @return array
+ */
+ protected function inflectExtensionVars(array $vars, array $extra): array
+ {
+ if (!empty($extra['tastyigniter-extension']['code'])) {
+ $parts = explode('.', $extra['tastyigniter-extension']['code']);
+ $vars['vendor'] = (string)$parts[0];
+ $vars['name'] = (string)($parts[1] ?? '');
+ }
+
+ $vars['vendor'] = $this->pregReplace('/[^a-z0-9_]/i', '', $vars['vendor']);
+ $vars['name'] = $this->pregReplace('/^ti-ext-/', '', $vars['name']);
+
+ return $vars;
+ }
+
+ /**
+ * @param array $vars
+ * @param array $extra
+ * @return array
+ */
+ protected function inflectThemeVars(array $vars, array $extra): array
+ {
+ if (!empty($extra['tastyigniter-theme']['code'])) {
+ $vars['name'] = $extra['tastyigniter-theme']['code'];
+ }
+
+ $vars['name'] = $this->pregReplace('/^ti-theme-/', '', $vars['name']);
+
+ return $vars;
+ }
+}
diff --git a/vendor/composer/installers/src/Composer/Installers/TheliaInstaller.php b/vendor/composer/installers/src/Composer/Installers/TheliaInstaller.php
index 158af52..896bed5 100644
--- a/vendor/composer/installers/src/Composer/Installers/TheliaInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/TheliaInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'module' => 'local/modules/{$name}/',
'frontoffice-template' => 'templates/frontOffice/{$name}/',
diff --git a/vendor/composer/installers/src/Composer/Installers/TuskInstaller.php b/vendor/composer/installers/src/Composer/Installers/TuskInstaller.php
index 7c0113b..3b5f142 100644
--- a/vendor/composer/installers/src/Composer/Installers/TuskInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/TuskInstaller.php
@@ -1,14 +1,17 @@
- */
- class TuskInstaller extends BaseInstaller
- {
- protected $locations = array(
- 'task' => '.tusk/tasks/{$name}/',
- 'command' => '.tusk/commands/{$name}/',
- 'asset' => 'assets/tusk/{$name}/',
- );
- }
+
+namespace Composer\Installers;
+
+/**
+ * Composer installer for 3rd party Tusk utilities
+ * @author Drew Ewing
+ */
+class TuskInstaller extends BaseInstaller
+{
+ /** @var array */
+ protected $locations = array(
+ 'task' => '.tusk/tasks/{$name}/',
+ 'command' => '.tusk/commands/{$name}/',
+ 'asset' => 'assets/tusk/{$name}/',
+ );
+}
diff --git a/vendor/composer/installers/src/Composer/Installers/UserFrostingInstaller.php b/vendor/composer/installers/src/Composer/Installers/UserFrostingInstaller.php
index fcb414a..a646c5b 100644
--- a/vendor/composer/installers/src/Composer/Installers/UserFrostingInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/UserFrostingInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'sprinkle' => 'app/sprinkles/{$name}/',
);
diff --git a/vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php b/vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php
index 24ca645..06d5db3 100644
--- a/vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/VanillaInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'plugin' => 'plugins/{$name}/',
'theme' => 'themes/{$name}/',
diff --git a/vendor/composer/installers/src/Composer/Installers/VgmcpInstaller.php b/vendor/composer/installers/src/Composer/Installers/VgmcpInstaller.php
index 7d90c5e..cf094dd 100644
--- a/vendor/composer/installers/src/Composer/Installers/VgmcpInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/VgmcpInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'bundle' => 'src/{$vendor}/{$name}/',
'theme' => 'themes/{$name}/'
@@ -16,7 +18,7 @@ class VgmcpInstaller extends BaseInstaller
* For package type vgmcp-theme, cut off a trailing '-theme' if present.
*
*/
- public function inflectPackageVars($vars)
+ public function inflectPackageVars(array $vars): array
{
if ($vars['type'] === 'vgmcp-bundle') {
return $this->inflectPluginVars($vars);
@@ -29,18 +31,26 @@ class VgmcpInstaller extends BaseInstaller
return $vars;
}
- protected function inflectPluginVars($vars)
+ /**
+ * @param array $vars
+ * @return array
+ */
+ protected function inflectPluginVars(array $vars): array
{
- $vars['name'] = preg_replace('/-bundle$/', '', $vars['name']);
+ $vars['name'] = $this->pregReplace('/-bundle$/', '', $vars['name']);
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars;
}
- protected function inflectThemeVars($vars)
+ /**
+ * @param array $vars
+ * @return array
+ */
+ protected function inflectThemeVars(array $vars): array
{
- $vars['name'] = preg_replace('/-theme$/', '', $vars['name']);
+ $vars['name'] = $this->pregReplace('/-theme$/', '', $vars['name']);
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
diff --git a/vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php b/vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php
index b65dbba..91b19fd 100644
--- a/vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/WHMCSInstaller.php
@@ -4,6 +4,7 @@ namespace Composer\Installers;
class WHMCSInstaller extends BaseInstaller
{
+ /** @var array */
protected $locations = array(
'addons' => 'modules/addons/{$vendor}_{$name}/',
'fraud' => 'modules/fraud/{$vendor}_{$name}/',
diff --git a/vendor/composer/installers/src/Composer/Installers/WinterInstaller.php b/vendor/composer/installers/src/Composer/Installers/WinterInstaller.php
index cff1bf1..f75a681 100644
--- a/vendor/composer/installers/src/Composer/Installers/WinterInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/WinterInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'module' => 'modules/{$name}/',
'plugin' => 'plugins/{$vendor}/{$name}/',
@@ -15,9 +17,8 @@ class WinterInstaller extends BaseInstaller
* For package type winter-plugin, cut off a trailing '-plugin' if present.
*
* For package type winter-theme, cut off a trailing '-theme' if present.
- *
*/
- public function inflectPackageVars($vars)
+ public function inflectPackageVars(array $vars): array
{
if ($vars['type'] === 'winter-module') {
return $this->inflectModuleVars($vars);
@@ -34,24 +35,36 @@ class WinterInstaller extends BaseInstaller
return $vars;
}
- protected function inflectModuleVars($vars)
+ /**
+ * @param array $vars
+ * @return array
+ */
+ protected function inflectModuleVars(array $vars): array
{
- $vars['name'] = preg_replace('/^wn-|-module$/', '', $vars['name']);
+ $vars['name'] = $this->pregReplace('/^wn-|-module$/', '', $vars['name']);
return $vars;
}
- protected function inflectPluginVars($vars)
+ /**
+ * @param array $vars
+ * @return array
+ */
+ protected function inflectPluginVars(array $vars): array
{
- $vars['name'] = preg_replace('/^wn-|-plugin$/', '', $vars['name']);
- $vars['vendor'] = preg_replace('/[^a-z0-9_]/i', '', $vars['vendor']);
+ $vars['name'] = $this->pregReplace('/^wn-|-plugin$/', '', $vars['name']);
+ $vars['vendor'] = $this->pregReplace('/[^a-z0-9_]/i', '', $vars['vendor']);
return $vars;
}
- protected function inflectThemeVars($vars)
+ /**
+ * @param array $vars
+ * @return array
+ */
+ protected function inflectThemeVars(array $vars): array
{
- $vars['name'] = preg_replace('/^wn-|-theme$/', '', $vars['name']);
+ $vars['name'] = $this->pregReplace('/^wn-|-theme$/', '', $vars['name']);
return $vars;
}
diff --git a/vendor/composer/installers/src/Composer/Installers/WolfCMSInstaller.php b/vendor/composer/installers/src/Composer/Installers/WolfCMSInstaller.php
index cb38788..58a9587 100644
--- a/vendor/composer/installers/src/Composer/Installers/WolfCMSInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/WolfCMSInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'plugin' => 'wolf/plugins/{$name}/',
);
diff --git a/vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php b/vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php
index 91c46ad..d46d5ab 100644
--- a/vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/WordPressInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'plugin' => 'wp-content/plugins/{$name}/',
'theme' => 'wp-content/themes/{$name}/',
diff --git a/vendor/composer/installers/src/Composer/Installers/YawikInstaller.php b/vendor/composer/installers/src/Composer/Installers/YawikInstaller.php
index 27f429f..d609dea 100644
--- a/vendor/composer/installers/src/Composer/Installers/YawikInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/YawikInstaller.php
@@ -1,32 +1,23 @@
*/
protected $locations = array(
'module' => 'module/{$name}/',
);
/**
* Format package name to CamelCase
- * @param array $vars
- *
- * @return array
*/
- public function inflectPackageVars($vars)
+ public function inflectPackageVars(array $vars): array
{
- $vars['name'] = strtolower(preg_replace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
+ $vars['name'] = strtolower($this->pregReplace('/(?<=\\w)([A-Z])/', '_\\1', $vars['name']));
$vars['name'] = str_replace(array('-', '_'), ' ', $vars['name']);
$vars['name'] = str_replace(' ', '', ucwords($vars['name']));
return $vars;
}
-}
\ No newline at end of file
+}
diff --git a/vendor/composer/installers/src/Composer/Installers/ZendInstaller.php b/vendor/composer/installers/src/Composer/Installers/ZendInstaller.php
index bde9bc8..ccfcd4a 100644
--- a/vendor/composer/installers/src/Composer/Installers/ZendInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/ZendInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'library' => 'library/{$name}/',
'extra' => 'extras/library/{$name}/',
diff --git a/vendor/composer/installers/src/Composer/Installers/ZikulaInstaller.php b/vendor/composer/installers/src/Composer/Installers/ZikulaInstaller.php
index 56cdf5d..d1fd1d7 100644
--- a/vendor/composer/installers/src/Composer/Installers/ZikulaInstaller.php
+++ b/vendor/composer/installers/src/Composer/Installers/ZikulaInstaller.php
@@ -1,8 +1,10 @@
*/
protected $locations = array(
'module' => 'modules/{$vendor}-{$name}/',
'theme' => 'themes/{$vendor}-{$name}/'
diff --git a/vendor/composer/installers/src/bootstrap.php b/vendor/composer/installers/src/bootstrap.php
index 0de276e..a5bb9ad 100644
--- a/vendor/composer/installers/src/bootstrap.php
+++ b/vendor/composer/installers/src/bootstrap.php
@@ -1,9 +1,14 @@
= 70100)) {
- $issues[] = 'Your Composer dependencies require a PHP version ">= 7.1.0". You are running ' . PHP_VERSION . '.';
+if (!(PHP_VERSION_ID >= 70200)) {
+ $issues[] = 'Your Composer dependencies require a PHP version ">= 7.2.0". You are running ' . PHP_VERSION . '.';
}
if ($issues) {
diff --git a/vendor/woocommerce/subscriptions-core/changelog.txt b/vendor/woocommerce/subscriptions-core/changelog.txt
index 81b6d7b..0655f57 100644
--- a/vendor/woocommerce/subscriptions-core/changelog.txt
+++ b/vendor/woocommerce/subscriptions-core/changelog.txt
@@ -1,5 +1,20 @@
*** WooCommerce Subscriptions Core Changelog ***
+= 8.0.1 - 2025-02-13 =
+* Fix - Revert a change released in 7.2.0 which triggered the "woocommerce_cart_item_name" filter with the wrong number of parameters.
+
+= 8.0.0 - 2025-02-13 =
+* Fix - Recommend WooPayments when there is no available payment gateway.
+* Fix - Safeguards added to the Subscriptions Totals template used in the My Account area, to guard against fatal errors that could arise in unusual conditions.
+* Fix - Correctly load product names with HTML on the cart and checkout shipping rates.
+* Fix - Improve our admin notice handling to ensure notices are displayed to the intended admin user.
+* Fix - Improve protections around the pending renewal order-creation process, to prevent uncaught exceptions and other errors from breaking the subscription editor.
+* Fix - Prevent unnecessary subscription object lookups on non-subscription admin pages when global $post is set.
+* Fix - After enabling the Customer Notification feature or changing the reminder timer setting, ensure notification emails are scheduled for subscriptions with pending cancellation status.
+* Update - Include subscription items table in all customer notification emails.
+* Update - Subscription notes for unsent customer notification emails now only occurs if WCS_DEBUG is enabled.
+* Dev - Introduces a new `woocommerce_subscription_valid_customer_notification_types` filter to modify which notification types are scheduled in Action Scheduler.
+
= 7.9.0 - 2025-01-10 =
* Add - Compatibility with WooCommerce's new preview email feature introduced in 9.6.
* Fix - Prevent payment gateways that complete Change Payment requests asynchronously from blocking future attempts to update payment methods for all subscriptions.
diff --git a/vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php b/vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php
index 0d11ac4..28ab32b 100644
--- a/vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php
+++ b/vendor/woocommerce/subscriptions-core/includes/admin/class-wc-subscriptions-admin.php
@@ -1893,7 +1893,7 @@ class WC_Subscriptions_Admin {
if ( ! $payment_gateways_handler::one_gateway_supports( 'subscriptions' ) ) {
// translators: $1-2: opening and closing tags of a link that takes to Woo marketplace / Stripe product page
- $available_gateways_description = sprintf( __( 'No payment gateways capable of processing automatic subscription payments are enabled. If you would like to process automatic payments, we recommend the %1$sfree Stripe extension%2$s.', 'woocommerce-subscriptions' ), '', '' );
+ $available_gateways_description = sprintf( __( 'No payment gateways capable of processing automatic subscription payments are enabled. If you would like to process automatic payments, we recommend %1$sWooPayments%2$s.', 'woocommerce-subscriptions' ), '', '' );
}
$recurring_payment_settings = apply_filters(
diff --git a/vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php b/vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php
index 63d19c4..8a3235d 100644
--- a/vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php
+++ b/vendor/woocommerce/subscriptions-core/includes/admin/class-wcs-admin-meta-boxes.php
@@ -136,11 +136,6 @@ class WCS_Admin_Meta_Boxes {
public function enqueue_styles_scripts() {
global $theorder;
- // If $theorder is empty, fallback to using the global post object.
- if ( empty( $theorder ) && ! empty( $GLOBALS['post']->ID ) ) {
- $theorder = wcs_get_subscription( $GLOBALS['post']->ID );
- }
-
// Get admin screen ID.
$screen = get_current_screen();
$screen_id = isset( $screen->id ) ? $screen->id : '';
@@ -148,9 +143,22 @@ class WCS_Admin_Meta_Boxes {
// Get the script version.
$ver = WC_Subscriptions_Core_Plugin::instance()->get_library_version();
- if ( wcs_get_page_screen_id( 'shop_subscription' ) === $screen_id && wcs_is_subscription( $theorder ) ) {
- // Declare a subscription variable for clearer use. The $theorder global on edit subscription screens is a subscription.
- $subscription = $theorder;
+ if ( wcs_get_page_screen_id( 'shop_subscription' ) === $screen_id ) {
+ // If global $theorder is empty, fallback to using the global post object.
+ if ( empty( $theorder ) && ! empty( $GLOBALS['post']->ID ) ) {
+ $subscription = wcs_get_subscription( $GLOBALS['post']->ID );
+
+ // If we have a subscription, set it as the global $theorder.
+ if ( $subscription ) {
+ $theorder = $subscription;
+ }
+ } else {
+ $subscription = $theorder;
+ }
+
+ if ( ! wcs_is_subscription( $subscription ) ) {
+ return;
+ }
wp_register_script( 'jstz', WC_Subscriptions_Core_Plugin::instance()->get_subscriptions_core_directory_url( 'assets/js/admin/jstz.min.js' ), [], $ver, false );
wp_register_script( 'momentjs', WC_Subscriptions_Core_Plugin::instance()->get_subscriptions_core_directory_url( 'assets/js/admin/moment.min.js' ), [], $ver, false );
@@ -247,21 +255,65 @@ class WCS_Admin_Meta_Boxes {
/**
* Handles the action request to create a pending renewal order.
*
- * @param array $subscription
- * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.0
+ * @param WC_Subscription $subscription
*/
public static function create_pending_renewal_action_request( $subscription ) {
$subscription->add_order_note( __( 'Create pending renewal order requested by admin action.', 'woocommerce-subscriptions' ), false, true );
- $subscription->update_status( 'on-hold' );
+
+ try {
+ $subscription->update_status( 'on-hold' );
+ } catch ( Exception $e ) {
+ wcs_add_admin_notice(
+ __( 'Pending renewal order was not created, as it was not possible to update the subscription status.', 'woocommerce-subscriptions' ),
+ 'error'
+ );
+ return;
+ }
$renewal_order = wcs_create_renewal_order( $subscription );
+ if ( is_wp_error( $renewal_order ) ) {
+ self::notify(
+ $subscription,
+ 'error',
+ esc_html__( 'Creation of the pending renewal order failed.', 'woocommerce-subscriptions' )
+ . ' ' . $renewal_order->get_error_message()
+ );
+
+ return;
+ }
+
if ( ! $subscription->is_manual() ) {
+ $renewal_url = $renewal_order->get_edit_order_url();
- $renewal_order->set_payment_method( wc_get_payment_gateway_by_order( $subscription ) ); // We need to pass the payment gateway instance to be compatible with WC < 3.0, only WC 3.0+ supports passing the string name
+ try {
+ // We need to pass the payment gateway instance to be compatible with WC < 3.0, only WC 3.0+ supports passing the string name.
+ $renewal_order->set_payment_method( wc_get_payment_gateway_by_order( $subscription ) );
- if ( is_callable( array( $renewal_order, 'save' ) ) ) { // WC 3.0+
- $renewal_order->save();
+ if ( is_callable( array( $renewal_order, 'save' ) ) ) { // WC 3.0+
+ $renewal_order->save();
+ }
+
+ wcs_add_admin_notice(
+ sprintf(
+ /* Translators: %1$s opening link tag, %2$s closing link tag. */
+ esc_html__( 'A pending %1$srenewal order%2$s was successfully created!', 'woocommerce-subscriptions' ),
+ '',
+ ''
+ ),
+ 'success'
+ );
+ } catch ( WC_Data_Exception $e ) {
+ self::notify(
+ $subscription,
+ 'error',
+ sprintf(
+ /* Translators: %1$s opening link tag, %2$s closing link tag. */
+ esc_html__( 'A %1$spending renewal order%2$s was successfully created, but there was a problem setting the payment method. Please review the order.', 'woocommerce-subscriptions' ),
+ '',
+ ''
+ )
+ );
}
}
}
@@ -722,4 +774,22 @@ class WCS_Admin_Meta_Boxes {
$items_meta_box['args']
);
}
+
+ /**
+ * Notifies the user of an operational success or failure, and records a matching order note.
+ *
+ * In essence, it can be convenient to generate both an admin notice (to give the user some clear and
+ * obvious feedback) and record the same as an order note (the admin notice could be missed, and is
+ * auto-dismissed after the first view).
+ *
+ * @param WC_Subscription $subscription The subscription we are working with.
+ * @param string $type Message type: 'success' or 'error.
+ * @param string $message Message text, which will be used both for an admin notice and for the order note.
+ *
+ * @return void
+ */
+ private static function notify( WC_Subscription $subscription, $type, $message ) {
+ $subscription->add_order_note( $message, false, true );
+ wcs_add_admin_notice( $message, $type );
+ }
}
diff --git a/vendor/woocommerce/subscriptions-core/includes/admin/wcs-admin-functions.php b/vendor/woocommerce/subscriptions-core/includes/admin/wcs-admin-functions.php
index 83e12ff..f410e55 100644
--- a/vendor/woocommerce/subscriptions-core/includes/admin/wcs-admin-functions.php
+++ b/vendor/woocommerce/subscriptions-core/includes/admin/wcs-admin-functions.php
@@ -13,59 +13,141 @@ if ( ! defined( 'ABSPATH' ) ) {
}
/**
- * Store a message to display via @see wcs_display_admin_notices().
+ * Registers an admin notice to be displayed once to the current (or other specified) user.
*
- * @param string The message to display
- * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.0
+ * @see wcs_display_admin_notices()
+ * @since 1.0.0 Migrated from WooCommerce Subscriptions v2.0.
+ * @since 7.2.0 Added support for specifying the target user and context.
+ *
+ * @param string $message The message to display.
+ * @param string $notice_type Either 'success' or 'error'.
+ * @param int|null $user_id The specific user who should see this message. If not specified, defaults to the current user.
+ * @param string|null $screen_id The screen ID for which the message should be displayed. If not specified, it will show on the next admin page load.
+ *
+ * @return void
*/
-function wcs_add_admin_notice( $message, $notice_type = 'success' ) {
+function wcs_add_admin_notice( $message, $notice_type = 'success', $user_id = null, $screen_id = null ) {
+ $user_id = (int) ( null === $user_id ? get_current_user_id() : $user_id );
- $notices = get_transient( '_wcs_admin_notices' );
+ if ( $user_id < 1 ) {
+ wc_get_logger()->warning(
+ sprintf(
+ /* Translators: %1$s: notice type ('success' or 'error'), %2$s: notice text. */
+ 'Admin notices can only be added if a user is currently logged in. Attempted (%1$s) notice: "%2$s"',
+ $notice_type,
+ $message
+ ),
+ array(
+ 'backtrace' => true,
+ 'user_id' => $user_id,
+ )
+ );
- if ( false === $notices ) {
+ return;
+ }
+
+ $notices = get_transient( '_wcs_admin_notices_' . $user_id );
+
+ if ( ! is_array( $notices ) ) {
$notices = array();
}
- $notices[ $notice_type ][] = $message;
+ $notices[ $notice_type ][] = array(
+ 'message' => $message,
+ 'screen_id' => $screen_id,
+ );
- set_transient( '_wcs_admin_notices', $notices, 60 * 60 );
+ set_transient( '_wcs_admin_notices_' . $user_id, $notices, HOUR_IN_SECONDS );
}
/**
- * Display any notices added with @see wcs_add_admin_notice()
+ * Display any admin notices added with wcs_add_admin_notice().
*
- * This method is also hooked to 'admin_notices' to display notices there.
+ * @see wcs_add_admin_notice()
+ * @since 1.0.0 Migrated from WooCommerce Subscriptions v2.0.
+ * @since 7.2.0 Supports contextual awareness of the user and screen.
*
- * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.0
+ * @param bool $clear If the message queue should be cleared after rendering the message(s). Defaults to true.
+ *
+ * @return void
*/
function wcs_display_admin_notices( $clear = true ) {
+ $user_id = get_current_user_id();
+ $notices = get_transient( '_wcs_admin_notices_' . $user_id );
- $notices = get_transient( '_wcs_admin_notices' );
-
- if ( false !== $notices && ! empty( $notices ) ) {
-
- if ( ! empty( $notices['success'] ) ) {
- array_walk( $notices['success'], 'esc_html' );
- echo '' . wp_kses_post( implode( "
\n
", $notices['success'] ) ) . '
';
- }
-
- if ( ! empty( $notices['error'] ) ) {
- array_walk( $notices['error'], 'esc_html' );
- echo '' . wp_kses_post( implode( "
\n
", $notices['error'] ) ) . '
';
- }
+ if ( ! is_array( $notices ) || empty( $notices ) ) {
+ return;
}
- if ( false !== $clear ) {
+ /**
+ * Normalizes, sanitizes and outputs the provided notices.
+ *
+ * @param array &$notices The notice data.
+ * @param string $class The CSS notice class to be applied (typically 'updated' or 'error').
+ *
+ * @return void
+ */
+ $handle_notices = static function ( &$notices, $class ) {
+ $notice_output = array();
+ $screen_id = false;
+
+ foreach ( $notices as $index => $notice ) {
+ // Ensure the notice data now has the expected shape. If it does not, remove it.
+ if ( ! is_array( $notice ) || ! isset( $notice['message'] ) || ! array_key_exists( 'screen_id', $notice ) ) {
+ unset( $notices[ $index ] );
+ continue;
+ }
+
+ // We only need to determine the current screen ID once.
+ if ( false === $screen_id ) {
+ $screen = get_current_screen();
+ $screen_id = $screen instanceof WP_Screen ? $screen->id : '';
+ }
+
+ // Should the notice display in the current screen context?
+ if ( is_string( $notice['screen_id'] ) && $screen_id !== $notice['screen_id'] ) {
+ continue;
+ }
+
+ $notice_output[] = $notice['message'];
+ unset( $notices[ $index ] );
+ }
+
+ // $notice_output may be empty if some notices were withheld, due to not matching the screen context.
+ if ( ! empty( $notice_output ) ) {
+ echo '' . wp_kses_post( implode( "
\n
", $notice_output ) ) . '
';
+ }
+ };
+
+ if ( ! empty( $notices['success'] ) ) {
+ $handle_notices( $notices['success'], 'updated' );
+ }
+
+ if ( ! empty( $notices['error'] ) ) {
+ $handle_notices( $notices['error'], 'error' );
+ }
+
+ // Under certain circumstances, the caller may not wish for the rendered messages to be cleared from the queue.
+ if ( false === $clear ) {
+ return;
+ }
+
+ // If all notices were rendered, clear the queue. If only some were rendered, clear what we can.
+ if ( empty( $notices['success'] ) && empty( $notices['error'] ) ) {
wcs_clear_admin_notices();
+ } else {
+ set_transient( '_wcs_admin_notices_' . $user_id, $notices, HOUR_IN_SECONDS );
}
}
+
add_action( 'admin_notices', 'wcs_display_admin_notices' );
/**
* Delete any admin notices we stored for display later.
*
- * @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.0
+ * @since 1.0.0 Migrated from WooCommerce Subscriptions v2.0.
+ * @since 7.2.0 Became user aware.
*/
function wcs_clear_admin_notices() {
- delete_transient( '_wcs_admin_notices' );
+ delete_transient( '_wcs_admin_notices_' . get_current_user_id() );
}
diff --git a/vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php b/vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php
index a572d24..7060524 100644
--- a/vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php
+++ b/vendor/woocommerce/subscriptions-core/includes/class-wc-subscription.php
@@ -1514,7 +1514,14 @@ class WC_Subscription extends WC_Order {
/**
* Calculate a given date for the subscription in GMT/UTC.
*
- * @param string $date_type 'trial_end', 'next_payment', 'end_of_prepaid_term' or 'end'
+ * This function is primarily used when the date needs to be recalculated (e.g., after a renewal or if the date has already passed).
+ * If you need to retrieve the currently scheduled date, use get_date() or get_time() instead.
+ *
+ * @see WC_Subscription::calculate_next_payment_date() for more details about how the next payment date is calculated.
+ *
+ * @param string $date_type 'trial_end', 'next_payment', 'end_of_prepaid_term' or 'end'.
+ *
+ * @return string|int The calculated date in MySQL format (`YYYY-MM-DD HH:MM:SS`), or `0` if undefined.
*/
public function calculate_date( $date_type ) {
@@ -1550,19 +1557,61 @@ class WC_Subscription extends WC_Order {
break;
}
+ /**
+ * Filter the calculated date for a subscription.
+ *
+ * The filter hook is dynamic. 'woocommerce_subscription_calculated_{date_type}_date' where {date_type} is the date type passed to the function.
+ * For example:
+ * - 'woocommerce_subscription_calculated_next_payment_date'
+ * - 'woocommerce_subscription_calculated_trial_end_date'
+ * - 'woocommerce_subscription_calculated_end_of_prepaid_term_date'
+ *
+ * @param string|int $date The calculated date in MySQL format (`YYYY-MM-DD HH:MM:SS`), or `0` if undefined.
+ * @param WC_Subscription $subscription The subscription object.
+ */
return apply_filters( 'woocommerce_subscription_calculated_' . $date_type . '_date', $date, $this );
}
/**
* Calculates the next payment date for a subscription.
*
- * Although an inactive subscription does not have a next payment date, this function will still calculate the date
- * so that it can be used to determine the date the next payment should be charged for inactive subscriptions.
+ * This function calculates the next valid renewal date. This could be the currently scheduled next payment date if it's still valid or
+ * it could be a newly calculated date based on specific conditions. It is primarily used when the next payment date needs to be
+ * recalculated (e.g., after a renewal or if the next payment date has already passed).
*
- * @return int | string Zero if the subscription has no next payment date, or a MySQL formatted date time if there is a next payment date
+ * How it calculates the next payment date:
+ * - If the subscription has a trial period, and the trial is still active, the next
+ * payment returned is the scheduled trial end date.
+ * - Otherwise, the function selects a base date and adds {interval} {period} to it. The base date is chosen in this order:
+ * 1. Current next payment date – Used if the subscription has a trial period and there's no first renewal payment yet or it is synced
+ * to a fixed billing day.
+ * 2. Last payment date – This is the most common case. The last order payment date is used to ensure the customer is given a full
+ * billing term after they successfully paid the last order. This is important in cases where the last order payment failed and
+ * was paid sometime later.
+ * - This can be bypassed using the 'wcs_calculate_next_payment_from_last_payment' filter.
+ * - @see https://github.com/woocommerce/woocommerce-subscriptions-preserve-billing-schedule
+ * 3. Next payment date – Used when the filter above is used and the subscription has a valid next payment date. This preserves the
+ * subscriptions current billing date. eg if the subscription's payment date occurs on the 10th of every month, it will continue
+ * even if the last payment was received late.
+ * 4. Subscription start date – Used as a last resort if no valid payment dates exist.
+ *
+ * Important notes:
+ * - If the resulting calculated next payment date is less than 2 hours in the future, it will add an additional billing period
+ * until it finds a date a least 2 hours in the future. This was originally necessary to combat daylight savings issues. ie if
+ * we added 1 billing period to the previous date but there has been a subsequent daylight savings change, the next payment date
+ * could be on the same day as the previous payment.
+ * - If the subscription has an end date, and the calculated next payment occurs after it, the function returns 0. ie there are no
+ * more payments to be made.
+ * - Although an inactive subscription does not have a public facing next payment date, this function will still calculate the date
+ * so it can be used when determining what the next date would be if the subscription were to be reactivated.
+ *
+ * Filters:
+ * - wcs_calculate_next_payment_from_last_payment (bool) – Controls whether the function
+ * should use the last payment date as the base for calculation. Default is true.
+ *
+ * @return int|string Zero if the subscription has no next payment date, or a MySQL formatted date (YYYY-MM-DD HH:MM:SS) if there is a next payment date.
*/
protected function calculate_next_payment_date() {
-
$next_payment_date = 0;
// If the subscription is not active, there is no next payment date
diff --git a/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php b/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php
index 1d15311..2ce4dba 100644
--- a/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php
+++ b/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-core-plugin.php
@@ -16,7 +16,7 @@ class WC_Subscriptions_Core_Plugin {
* The version of subscriptions-core library.
* @var string
*/
- protected $library_version = '7.9.0'; // WRCS: DEFINED_VERSION.
+ protected $library_version = '8.0.1'; // WRCS: DEFINED_VERSION.
/**
* The subscription scheduler instance.
diff --git a/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-email-notifications.php b/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-email-notifications.php
index 31dece4..39f2af0 100644
--- a/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-email-notifications.php
+++ b/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-email-notifications.php
@@ -178,7 +178,7 @@ class WC_Subscriptions_Email_Notifications {
break;
}
- if ( $notification ) {
+ if ( $notification && $notification->is_enabled() ) {
$notification->trigger( $subscription_id );
}
}
diff --git a/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-email.php b/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-email.php
index c8a7be0..03a8f9c 100644
--- a/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-email.php
+++ b/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-email.php
@@ -329,6 +329,7 @@ class WC_Subscriptions_Email {
'order' => $order,
'subscriptions' => $subscriptions,
'is_admin_email' => $sent_to_admin,
+ 'plain_text' => $plain_text,
'skip_my_account_link' => $skip_my_account_link,
),
'',
diff --git a/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php b/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php
index d6c10f2..e220d57 100644
--- a/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php
+++ b/vendor/woocommerce/subscriptions-core/includes/class-wc-subscriptions-order.php
@@ -756,6 +756,7 @@ class WC_Subscriptions_Order {
'order' => $order,
'subscriptions' => $subscriptions,
'is_admin_email' => $is_admin_email,
+ 'plain_text' => $plaintext,
'skip_my_account_link' => $skip_my_account_link,
),
'',
diff --git a/vendor/woocommerce/subscriptions-core/includes/class-wcs-action-scheduler-customer-notifications.php b/vendor/woocommerce/subscriptions-core/includes/class-wcs-action-scheduler-customer-notifications.php
index 4e1b5a6..b2c7fdb 100644
--- a/vendor/woocommerce/subscriptions-core/includes/class-wcs-action-scheduler-customer-notifications.php
+++ b/vendor/woocommerce/subscriptions-core/includes/class-wcs-action-scheduler-customer-notifications.php
@@ -497,7 +497,25 @@ class WCS_Action_Scheduler_Customer_Notifications extends WCS_Scheduler {
}
}
- return $notifications;
+ /**
+ * Filter: `woocommerce_subscription_valid_customer_notification_types`.
+ *
+ * Allows filtering the list of notification types that will be scheduled for a particular subscription.
+ *
+ * Default array format returned:
+ *
+ * array(
+ * 'next_payment', // Exists if the subscription contains a next payment date in the future.
+ * 'trial_end', // Exists if the subscription contains a trial end date in the future.
+ * 'end' // Exists if the subscription contains an end date in the future.
+ * )
+ *
+ * @since 7.2.0
+ *
+ * @param array $notifications Array of valid notification types.
+ * @param WC_Subscription $subscription Subscription object.
+ */
+ return (array) apply_filters( 'woocommerce_subscription_valid_customer_notification_types', $notifications, $subscription );
}
/**
diff --git a/vendor/woocommerce/subscriptions-core/includes/class-wcs-notifications-batch-processor.php b/vendor/woocommerce/subscriptions-core/includes/class-wcs-notifications-batch-processor.php
index e244a55..737a834 100644
--- a/vendor/woocommerce/subscriptions-core/includes/class-wcs-notifications-batch-processor.php
+++ b/vendor/woocommerce/subscriptions-core/includes/class-wcs-notifications-batch-processor.php
@@ -49,6 +49,7 @@ class WCS_Notifications_Batch_Processor implements WCS_Batch_Processor {
'active',
'pending',
'on-hold',
+ 'pending-cancel',
);
return array_map( 'wcs_sanitize_subscription_status_key', $allowed_statuses );
diff --git a/vendor/woocommerce/subscriptions-core/includes/emails/class-wcs-email-customer-notification.php b/vendor/woocommerce/subscriptions-core/includes/emails/class-wcs-email-customer-notification.php
index 0c9d47e..16e3bae 100644
--- a/vendor/woocommerce/subscriptions-core/includes/emails/class-wcs-email-customer-notification.php
+++ b/vendor/woocommerce/subscriptions-core/includes/emails/class-wcs-email-customer-notification.php
@@ -254,7 +254,7 @@ class WCS_Email_Customer_Notification extends WC_Email {
}
/**
- * Determine whether the customer reminder email should be sent and add an order note if it shouldn't.
+ * Determines whether the customer reminder email should be sent.
*
* Reminder emails are not sent if:
* - The Customer Notification feature is disabled.
@@ -267,30 +267,43 @@ class WCS_Email_Customer_Notification extends WC_Email {
* @return bool
*/
public function should_send_reminder_email( $subscription ) {
- $should_skip = [];
-
if ( ! $this->is_enabled() ) {
- $should_skip[] = __( 'Reminder emails disabled.', 'woocommerce-subscriptions' );
- } else {
- if ( ! WC_Subscriptions_Email_Notifications::should_send_notification() ) {
- $should_skip[] = __( 'Not a production site', 'woocommerce-subscriptions' );
- }
-
- if ( ! $this->get_recipient() ) {
- $should_skip[] = __( 'Recipient not found', 'woocommerce-subscriptions' );
- }
-
- if ( WCS_Action_Scheduler_Customer_Notifications::is_subscription_period_too_short( $subscription ) ) {
- $should_skip[] = __( 'Subscription billing cycle too short', 'woocommerce-subscriptions' );
- }
+ return $this->log_reminder_email_not_sent( $subscription, __( 'Reminder emails disabled.', 'woocommerce-subscriptions' ) );
}
- if ( ! empty( $should_skip ) ) {
+ $skipped_reasons = [];
+
+ if ( ! WC_Subscriptions_Email_Notifications::should_send_notification() ) {
+ $skipped_reasons[] = __( 'Not a production site, or notifications have been globally disabled', 'woocommerce-subscriptions' );
+ }
+
+ if ( ! $this->get_recipient() ) {
+ $skipped_reasons[] = __( 'Recipient not found', 'woocommerce-subscriptions' );
+ }
+
+ if ( WCS_Action_Scheduler_Customer_Notifications::is_subscription_period_too_short( $subscription ) ) {
+ $skipped_reasons[] = __( 'Subscription billing cycle too short', 'woocommerce-subscriptions' );
+ }
+
+ return empty( $skipped_reasons ) || $this->log_reminder_email_not_sent( $subscription, $skipped_reasons );
+ }
+
+ /**
+ * If WCS_DEBUG or WP_DEBUG is enabled, attach a note to the subscription to detail why a reminder email was not sent.
+ *
+ * @param WC_Subscription $subscription
+ * @param array|string $reasons
+ *
+ * @return false
+ */
+ private function log_reminder_email_not_sent( $subscription, $reasons ) {
+ if ( ( defined( 'WCS_DEBUG' ) && WCS_DEBUG ) || ( defined( 'WP_DEBUG' ) && WP_DEBUG ) ) {
+ $reasons = (array) $reasons;
+
// translators: %1$s: email title, %2$s: list of reasons why email was skipped.
- $subscription->add_order_note( sprintf( __( 'Skipped sending "%1$s": %2$s', 'woocommerce-subscriptions' ), $this->title, '
- ' . implode( '
- ', $should_skip ) ) );
- return false;
+ $subscription->add_order_note( sprintf( __( 'Skipped sending "%1$s": %2$s', 'woocommerce-subscriptions' ), $this->title, '
- ' . implode( '
- ', $reasons ) ) );
}
- return true;
+ return false;
}
}
diff --git a/vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php b/vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php
index 297a4d5..3bb66c0 100644
--- a/vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php
+++ b/vendor/woocommerce/subscriptions-core/includes/upgrades/class-wc-subscriptions-upgrader.php
@@ -129,6 +129,11 @@ class WC_Subscriptions_Upgrader {
wp_unschedule_hook( 'wcs_cleanup_big_logs' );
}
+ if ( version_compare( self::$active_version, '8.0.0', '<' ) ) {
+ // As of Subscriptions 7.2.0 (Core 8.0.0), admin notices are stored one transient per-user.
+ delete_transient( '_wcs_admin_notices' );
+ }
+
self::upgrade_complete();
}
diff --git a/vendor/woocommerce/subscriptions-core/includes/upgrades/class-wcs-repair-2-0.php b/vendor/woocommerce/subscriptions-core/includes/upgrades/class-wcs-repair-2-0.php
index f7538f2..ec392a2 100644
--- a/vendor/woocommerce/subscriptions-core/includes/upgrades/class-wcs-repair-2-0.php
+++ b/vendor/woocommerce/subscriptions-core/includes/upgrades/class-wcs-repair-2-0.php
@@ -395,8 +395,7 @@ class WCS_Repair_2_0 {
public static function repair_start_date( $subscription, $item_id, $item_meta ) {
global $wpdb;
- $order = wc_get_order( $subscription['order_id'] );
- $start_date = $order->get_meta( '_paid_date', true );
+ $start_date = get_post_meta( $subscription['order_id'], '_paid_date', true );
WCS_Upgrade_Logger::add( sprintf( 'Repairing start_date for order %d: Trying to use the _paid date for start date.', $subscription['order_id'] ) );
diff --git a/vendor/woocommerce/subscriptions-core/includes/wcs-renewal-functions.php b/vendor/woocommerce/subscriptions-core/includes/wcs-renewal-functions.php
index 8350b6f..7220cd5 100644
--- a/vendor/woocommerce/subscriptions-core/includes/wcs-renewal-functions.php
+++ b/vendor/woocommerce/subscriptions-core/includes/wcs-renewal-functions.php
@@ -35,7 +35,17 @@ function wcs_create_renewal_order( $subscription ) {
WCS_Related_Order_Store::instance()->add_relation( $renewal_order, $subscription, 'renewal' );
- return apply_filters( 'wcs_renewal_order_created', $renewal_order, $subscription );
+ /**
+ * Provides an opportunity to monitor, interact with and replace renewal orders when they
+ * are first created.
+ *
+ * @param WC_Order $renewal_order The renewal order.
+ * @param WC_Subscription $subscription The subscription the renewal is related to.
+ */
+ $filtered_renewal_order = apply_filters( 'wcs_renewal_order_created', $renewal_order, $subscription );
+
+ // It is possible that a filter function will replace the renewal order with something else entirely.
+ return $filtered_renewal_order instanceof WC_Order ? $filtered_renewal_order : $renewal_order;
}
/**
diff --git a/vendor/woocommerce/subscriptions-core/templates/emails/customer-notification-auto-renewal.php b/vendor/woocommerce/subscriptions-core/templates/emails/customer-notification-auto-renewal.php
index 82db308..27ac7fe 100644
--- a/vendor/woocommerce/subscriptions-core/templates/emails/customer-notification-auto-renewal.php
+++ b/vendor/woocommerce/subscriptions-core/templates/emails/customer-notification-auto-renewal.php
@@ -3,7 +3,7 @@
* Customer Notification: Notify the customer that an automated renewal their subscription is about to happen.
*
* @package WooCommerce_Subscriptions/Templates/Emails
- * @version x.x.x
+ * @version 7.2.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
@@ -12,7 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) {
/**
* @hooked WC_Emails::email_header() Output the email header.
*
- * @since x.x.x
+ * @since 6.9.0
*/
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
@@ -45,18 +45,24 @@ do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
);
?>
-
-
-
-
-
-
@@ -84,6 +90,6 @@ if ( $additional_content ) {
/**
* @hooked WC_Emails::email_footer() Output the email footer.
*
- * @since x.x.x
+ * @since 6.9.0
*/
do_action( 'woocommerce_email_footer', $email );
diff --git a/vendor/woocommerce/subscriptions-core/templates/emails/customer-notification-auto-trial-ending.php b/vendor/woocommerce/subscriptions-core/templates/emails/customer-notification-auto-trial-ending.php
index 17b6819..a72aaae 100644
--- a/vendor/woocommerce/subscriptions-core/templates/emails/customer-notification-auto-trial-ending.php
+++ b/vendor/woocommerce/subscriptions-core/templates/emails/customer-notification-auto-trial-ending.php
@@ -3,7 +3,7 @@
* Customer Notification: Free trial of an automatically renewed subscription is about to expire email.
*
* @package WooCommerce_Subscriptions/Templates/Emails
- * @version x.x.x
+ * @version 7.2.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
@@ -12,7 +12,7 @@ if ( ! defined( 'ABSPATH' ) ) {
/**
* @hooked WC_Emails::email_header() Output the email header.
*
- * @since x.x.x
+ * @since 6.9.0
*/
do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
@@ -59,18 +59,14 @@ do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
);
?>
-
-
-
-
-
@@ -45,19 +45,14 @@ do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
);
?>
-
-
-
-
-
-
@@ -87,18 +87,14 @@ do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
-
-
-
-
-
@@ -53,6 +53,9 @@ do_action( 'woocommerce_email_header', $email_heading, $email ); ?>
// Show subscription details.
\WC_Subscriptions_Email::subscription_details( $subscription, $order, $sent_to_admin, $plain_text );
+/** This action is documented in templates/emails/customer-notification-auto-renewal.php */
+do_action( 'woocommerce_subscriptions_email_order_details', $subscription, $sent_to_admin, $plain_text, $email );
+
/**
* Show user-defined additional content - this is set in each email's settings.
*/
@@ -63,6 +66,6 @@ if ( $additional_content ) {
/**
* @hooked WC_Emails::email_footer() Output the email footer.
*
- * @since x.x.x
+ * @since 6.9.0
*/
do_action( 'woocommerce_email_footer', $email );
diff --git a/vendor/woocommerce/subscriptions-core/templates/emails/plain/customer-notification-auto-renewal.php b/vendor/woocommerce/subscriptions-core/templates/emails/plain/customer-notification-auto-renewal.php
index 6c45e38..023f796 100644
--- a/vendor/woocommerce/subscriptions-core/templates/emails/plain/customer-notification-auto-renewal.php
+++ b/vendor/woocommerce/subscriptions-core/templates/emails/plain/customer-notification-auto-renewal.php
@@ -3,7 +3,7 @@
* Customer Notification: Notify the customer that an automated renewal their subscription is about to happen. Plain text version.
*
* @package WooCommerce_Subscriptions/Templates/Emails/Plain
- * @version x.x.x
+ * @version 7.2.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
@@ -37,11 +37,12 @@ echo esc_html(
echo "\n\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
-esc_html_e( 'Here are the details:', 'woocommerce-subscriptions' );
-echo "\n";
// Show subscription details.
\WC_Subscriptions_Email::subscription_details( $subscription, $order, $sent_to_admin, $plain_text, true );
+/** This action is documented in templates/emails/customer-notification-auto-renewal.php */
+do_action( 'woocommerce_subscriptions_email_order_details', $subscription, $sent_to_admin, $plain_text, $email );
+
esc_html_e( 'You can manage this subscription from your account dashboard: ', 'woocommerce-subscriptions' );
echo esc_url( wc_get_page_permalink( 'myaccount' ) );
diff --git a/vendor/woocommerce/subscriptions-core/templates/emails/plain/customer-notification-auto-trial-ending.php b/vendor/woocommerce/subscriptions-core/templates/emails/plain/customer-notification-auto-trial-ending.php
index e1ef241..b6090ef 100644
--- a/vendor/woocommerce/subscriptions-core/templates/emails/plain/customer-notification-auto-trial-ending.php
+++ b/vendor/woocommerce/subscriptions-core/templates/emails/plain/customer-notification-auto-trial-ending.php
@@ -3,7 +3,7 @@
* Customer Notification: Free trial of an automatically renewed subscription is about to expire email. Plain text version.
*
* @package WooCommerce_Subscriptions/Templates/Emails/Plain
- * @version x.x.x
+ * @version 7.2.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
@@ -43,11 +43,12 @@ echo esc_url( wc_get_page_permalink( 'myaccount' ) );
echo "\n\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
-esc_html_e( 'Here are the details:', 'woocommerce-subscriptions' );
-
// Show subscription details.
\WC_Subscriptions_Email::subscription_details( $subscription, $order, $sent_to_admin, $plain_text, true );
+/** This action is documented in templates/emails/customer-notification-auto-renewal.php */
+do_action( 'woocommerce_subscriptions_email_order_details', $subscription, $sent_to_admin, $plain_text, $email );
+
echo "\n\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
/**
diff --git a/vendor/woocommerce/subscriptions-core/templates/emails/plain/customer-notification-expiring-subscription.php b/vendor/woocommerce/subscriptions-core/templates/emails/plain/customer-notification-expiring-subscription.php
index 0ade00c..73320af 100644
--- a/vendor/woocommerce/subscriptions-core/templates/emails/plain/customer-notification-expiring-subscription.php
+++ b/vendor/woocommerce/subscriptions-core/templates/emails/plain/customer-notification-expiring-subscription.php
@@ -3,7 +3,7 @@
* Customer Notification: Subscription is about to expire email. Plain text version.
*
* @package WooCommerce_Subscriptions/Templates/Emails/Plain
- * @version x.x.x
+ * @version 7.2.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
@@ -37,11 +37,12 @@ echo esc_html(
echo "\n\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
-esc_html_e( 'Here are the details:', 'woocommerce-subscriptions' );
-
// Show subscription details.
\WC_Subscriptions_Email::subscription_details( $subscription, $order, $sent_to_admin, $plain_text, true );
+/** This action is documented in templates/emails/customer-notification-auto-renewal.php */
+do_action( 'woocommerce_subscriptions_email_order_details', $subscription, $sent_to_admin, $plain_text, $email );
+
/**
* Show user-defined additional content - this is set in each email's settings.
*/
diff --git a/vendor/woocommerce/subscriptions-core/templates/emails/plain/customer-notification-manual-renewal.php b/vendor/woocommerce/subscriptions-core/templates/emails/plain/customer-notification-manual-renewal.php
index 2ed4908..848ee62 100644
--- a/vendor/woocommerce/subscriptions-core/templates/emails/plain/customer-notification-manual-renewal.php
+++ b/vendor/woocommerce/subscriptions-core/templates/emails/plain/customer-notification-manual-renewal.php
@@ -3,7 +3,7 @@
* Customer Notification: Manual renewal needed. Plain text version.
*
* @package WooCommerce_Subscriptions/Templates/Emails/Plain
- * @version x.x.x
+ * @version 7.2.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
@@ -58,11 +58,12 @@ if ( $can_renew_early ) {
echo "\n\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
-esc_html_e( 'Here are the details:', 'woocommerce-subscriptions' );
-
// Show subscription details.
\WC_Subscriptions_Email::subscription_details( $subscription, $order, $sent_to_admin, $plain_text );
+/** This action is documented in templates/emails/customer-notification-auto-renewal.php */
+do_action( 'woocommerce_subscriptions_email_order_details', $subscription, $sent_to_admin, $plain_text, $email );
+
echo "\n\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
/**
diff --git a/vendor/woocommerce/subscriptions-core/templates/emails/plain/customer-notification-manual-trial-ending.php b/vendor/woocommerce/subscriptions-core/templates/emails/plain/customer-notification-manual-trial-ending.php
index 95c321a..45ebcdd 100644
--- a/vendor/woocommerce/subscriptions-core/templates/emails/plain/customer-notification-manual-trial-ending.php
+++ b/vendor/woocommerce/subscriptions-core/templates/emails/plain/customer-notification-manual-trial-ending.php
@@ -3,7 +3,7 @@
* Customer Notification: Free trial of a manually renewed subscription is about to expire email. Plain text version.
*
* @package WooCommerce_Subscriptions/Templates/Emails/Plain
- * @version x.x.x
+ * @version 7.2.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
@@ -40,6 +40,9 @@ echo "\n\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\
// Show subscription details.
\WC_Subscriptions_Email::subscription_details( $subscription, $order, $sent_to_admin, $plain_text );
+/** This action is documented in templates/emails/customer-notification-auto-renewal.php */
+do_action( 'woocommerce_subscriptions_email_order_details', $subscription, $sent_to_admin, $plain_text, $email );
+
echo "\n\n=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\n";
/**
diff --git a/vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php b/vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php
index 001e117..5a92a94 100644
--- a/vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php
+++ b/vendor/woocommerce/subscriptions-core/templates/emails/plain/subscription-info.php
@@ -2,9 +2,8 @@
/**
* Subscription information template
*
- * @author Brent Shepherd / Chuck Mac
* @package WooCommerce_Subscriptions/Templates/Emails
- * @version 1.0.0 - Migrated from WooCommerce Subscriptions v3.0.4
+ * @version 7.2.0
*/
if ( ! defined( 'ABSPATH' ) ) {
diff --git a/vendor/woocommerce/subscriptions-core/templates/emails/subscription-info.php b/vendor/woocommerce/subscriptions-core/templates/emails/subscription-info.php
index ea619b0..224c31b 100644
--- a/vendor/woocommerce/subscriptions-core/templates/emails/subscription-info.php
+++ b/vendor/woocommerce/subscriptions-core/templates/emails/subscription-info.php
@@ -2,9 +2,8 @@
/**
* Subscription information template
*
- * @author Brent Shepherd / Chuck Mac
* @package WooCommerce_Subscriptions/Templates/Emails
- * @version 1.0.0 - Migrated from WooCommerce Subscriptions v3.0.4
+ * @version 7.2.0
*/
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
@@ -32,6 +31,7 @@ $is_parent_order = wcs_order_contains_subscription( $order, 'parent' );
is_manual(); ?>
+
get_order_number() ) ); ?> |
get_time( 'start_date', 'site' ) ) ); ?> |
get_time( 'end' ) ) ? date_i18n( wc_date_format(), $subscription->get_time( 'end', 'site' ) ) : _x( 'When cancelled', 'Used as end date for an indefinite subscription', 'woocommerce-subscriptions' ) ); ?> |
@@ -39,6 +39,7 @@ $is_parent_order = wcs_order_contains_subscription( $order, 'parent' );
get_formatted_order_total() ); ?>
get_time( 'next_payment' ) > 0 ) : ?>
+
get_time( 'next_payment', 'site' ) ) ) ); ?>
@@ -55,11 +56,11 @@ if ( $has_automatic_renewal && ! $is_admin_email && $subscription->get_time( 'ne
$my_account_url = wc_get_endpoint_url( 'subscriptions', '', wc_get_page_permalink( 'myaccount' ) );
}
- // Translators: Placeholders are opening and closing My Account link tags.
printf(
'%s',
wp_kses_post(
sprintf(
+ // Translators: Placeholders are opening and closing My Account link tags.
_n(
'This subscription is set to renew automatically using your payment method on file. You can manage or cancel this subscription from your %1$smy account page%2$s.',
'These subscriptions are set to renew automatically using your payment method on file. You can manage or cancel your subscriptions from your %1$smy account page%2$s.',
@@ -74,4 +75,3 @@ if ( $has_automatic_renewal && ! $is_admin_email && $subscription->get_time( 'ne
}
?>
-
diff --git a/vendor/woocommerce/subscriptions-core/templates/myaccount/subscription-totals-table.php b/vendor/woocommerce/subscriptions-core/templates/myaccount/subscription-totals-table.php
index 58a2f64..f8faad9 100644
--- a/vendor/woocommerce/subscriptions-core/templates/myaccount/subscription-totals-table.php
+++ b/vendor/woocommerce/subscriptions-core/templates/myaccount/subscription-totals-table.php
@@ -4,7 +4,7 @@
*
* @package WooCommerce_Subscription/Templates
* @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.6.0
- * @version 1.0.0 - Migrated from WooCommerce Subscriptions v2.6.0
+ * @version 7.2.0
*/
if ( ! defined( 'ABSPATH' ) ) {
@@ -25,6 +25,18 @@ if ( ! defined( 'ABSPATH' ) ) {
get_items() as $item_id => $item ) {
$_product = apply_filters( 'woocommerce_subscriptions_order_item_product', $item->get_product(), $item );
+
+ if ( ! is_a( $_product, WC_Product::class ) ) {
+ wc_get_logger()->warning(
+ 'A non-product was encountered while summarizing subscription product totals.',
+ array(
+ 'backtrace' => true,
+ 'entity' => $_product,
+ 'entity_type' => gettype( $_product ),
+ )
+ );
+ }
+
if ( apply_filters( 'woocommerce_order_item_visible', true, $item ) ) {
?>
@@ -38,7 +50,7 @@ if ( ! defined( 'ABSPATH' ) ) {
is_visible() ) {
+ if ( is_a( $_product, WC_Product::class ) && ! $_product->is_visible() ) {
echo wp_kses_post( apply_filters( 'woocommerce_order_item_name', $item['name'], $item, false ) );
} else {
echo wp_kses_post( apply_filters( 'woocommerce_order_item_name', sprintf( '%s', get_permalink( $item['product_id'] ), $item['name'] ), $item, false ) );
@@ -76,7 +88,8 @@ if ( ! defined( 'ABSPATH' ) ) {
get_purchase_note();
+ $purchase_note = is_a( $_product, WC_Product::class ) ? $_product->get_purchase_note() : false;
+
if ( $subscription->has_status( array( 'completed', 'processing' ) ) && $purchase_note ) {
?>
|
diff --git a/vendor/woocommerce/subscriptions-core/woocommerce-subscriptions-core.php b/vendor/woocommerce/subscriptions-core/woocommerce-subscriptions-core.php
index 043f8aa..6d66f2f 100644
--- a/vendor/woocommerce/subscriptions-core/woocommerce-subscriptions-core.php
+++ b/vendor/woocommerce/subscriptions-core/woocommerce-subscriptions-core.php
@@ -6,5 +6,5 @@
* Author: Automattic
* Author URI: https://woocommerce.com/
* Requires WP: 5.6
- * Version: 7.9.0
+ * Version: 8.0.1
*/
diff --git a/woocommerce-subscriptions.php b/woocommerce-subscriptions.php
index 0359ea2..4c4c32e 100644
--- a/woocommerce-subscriptions.php
+++ b/woocommerce-subscriptions.php
@@ -5,11 +5,11 @@
* Description: Sell products and services with recurring payments in your WooCommerce Store.
* Author: WooCommerce
* Author URI: https://woocommerce.com/
- * Version: 7.1.0
+ * Version: 7.2.1
* Requires Plugins: woocommerce
*
* WC requires at least: 8.7.1
- * WC tested up to: 9.4
+ * WC tested up to: 9.7
* Woo: 27147:6115e6d7e297b623a169fdcf5728b224
*
* Copyright 2019 WooCommerce
@@ -78,7 +78,7 @@ class WC_Subscriptions {
public static $plugin_file = __FILE__;
/** @var string */
- public static $version = '7.1.0'; // WRCS: DEFINED_VERSION.
+ public static $version = '7.2.1'; // WRCS: DEFINED_VERSION.
/** @var string */
public static $wc_minimum_supported_version = '7.7';