mirror of
https://github.com/pronamic/woocommerce-subscriptions.git
synced 2025-10-07 01:54:05 +00:00
Updates to 7.9.0
This commit is contained in:
@@ -28,3 +28,36 @@
|
|||||||
border-color: var(--wc-red, #cc1818);
|
border-color: var(--wc-red, #cc1818);
|
||||||
color: var(--wc-red, #cc1818);
|
color: var(--wc-red, #cc1818);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.wcsg_add_recipient_fields_container label {
|
||||||
|
display: inline-block;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wcsg_add_recipient_fields_container .wcsg_add_recipient_fields .woocommerce_subscriptions_gifting_recipient_email {
|
||||||
|
padding: 0;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wcsg_add_recipient_fields_container .wcsg_add_recipient_fields.hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.wcsg_add_recipient_fields_container .recipient_email:focus {
|
||||||
|
outline-offset: -2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#woocommerce_subscriptions_gifting_field {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
align-items: center;
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
#woocommerce_subscriptions_gifting_field div {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
max-width: 100%;
|
||||||
|
word-break: break-all;
|
||||||
|
word-wrap: break-word;
|
||||||
|
}
|
||||||
|
@@ -156,8 +156,8 @@ jQuery( document ).ready( function ( $ ) {
|
|||||||
'.woocommerce-cart-form :input[type="submit"][name="update_cart"]'
|
'.woocommerce-cart-form :input[type="submit"][name="update_cart"]'
|
||||||
);
|
);
|
||||||
|
|
||||||
if ( $updateCartButton.length ) {
|
if ( $updateCartButton.length && ! allValid ) {
|
||||||
$updateCartButton.prop( 'disabled', ! allValid );
|
$updateCartButton.prop( 'disabled', true );
|
||||||
}
|
}
|
||||||
|
|
||||||
return allValid;
|
return allValid;
|
||||||
|
@@ -1 +0,0 @@
|
|||||||
.wcsg_add_recipient_fields_container label{display:inline-block;margin-bottom:20px}.wcsg_add_recipient_fields_container .wcsg_add_recipient_fields .woocommerce_subscriptions_gifting_recipient_email{margin-bottom:20px;padding:0}.wcsg_add_recipient_fields_container .recipient_email:focus{outline-offset:-2px}.wcsg-gifting-to-container-editing{display:flex;gap:5px;margin-top:12px}.wcsg-gifting-to-container-editing .wc-block-components-text-input{flex-grow:1;margin-top:0}.wcsg-gifting-to-container-editing .wp-element-button.gifting-update-button:not(.is-link){min-height:unset;padding:0 var(--xs,20px)}.wcsg-gifting-to-container-editing .components-base-control__field{margin-bottom:0}.wcsg-gifting-to-container-editing .has-error .components-text-control__input{color:var(--wc-red,#cc1818)}.wcsg-gifting-to-container-view{display:flex;gap:5px}.wcsg-gifting-to-container-view .components-button.is-link{color:var(--wp--preset--color--contrast);font-size:medium}.wcsg-block-recipient-container .components-checkbox-control__label{font-size:medium}.wc-block-cart .wc-block-components-product-details__gifting-to,.wc-block-cart .wc-block-components-product-details__gifting-to-hidden,.wc-block-cart .wc-block-components-product-details__item-key,.wc-block-checkout .wc-block-components-product-details__gifting-to-hidden,.wc-block-checkout .wc-block-components-product-details__item-key,.wp-block-woocommerce-mini-cart-contents .wc-block-components-product-details__gifting-to,.wp-block-woocommerce-mini-cart-contents .wc-block-components-product-details__gifting-to-hidden,.wp-block-woocommerce-mini-cart-contents .wc-block-components-product-details__item-key{display:none}
|
|
@@ -1 +0,0 @@
|
|||||||
.wcsg_add_recipient_fields_container label{display:inline-block;margin-bottom:20px}.wcsg_add_recipient_fields_container .wcsg_add_recipient_fields .woocommerce_subscriptions_gifting_recipient_email{margin-bottom:20px;padding:0}.wcsg_add_recipient_fields_container .recipient_email:focus{outline-offset:-2px}.wcsg-gifting-to-container-editing{display:flex;gap:5px;margin-top:12px}.wcsg-gifting-to-container-editing .wc-block-components-text-input{flex-grow:1;margin-top:0}.wcsg-gifting-to-container-editing .wp-element-button.gifting-update-button:not(.is-link){min-height:unset;padding:0 var(--xs,20px)}.wcsg-gifting-to-container-editing .components-base-control__field{margin-bottom:0}.wcsg-gifting-to-container-editing .has-error .components-text-control__input{color:var(--wc-red,#cc1818)}.wcsg-gifting-to-container-view{display:flex;gap:5px}.wcsg-gifting-to-container-view .components-button.is-link{color:var(--wp--preset--color--contrast);font-size:medium}.wcsg-block-recipient-container .components-checkbox-control__label{font-size:medium}.wc-block-cart .wc-block-components-product-details__gifting-to,.wc-block-cart .wc-block-components-product-details__gifting-to-hidden,.wc-block-cart .wc-block-components-product-details__item-key,.wc-block-checkout .wc-block-components-product-details__gifting-to-hidden,.wc-block-checkout .wc-block-components-product-details__item-key,.wp-block-woocommerce-mini-cart-contents .wc-block-components-product-details__gifting-to,.wp-block-woocommerce-mini-cart-contents .wc-block-components-product-details__gifting-to-hidden,.wp-block-woocommerce-mini-cart-contents .wc-block-components-product-details__item-key{display:none}
|
|
1
build/wcsg-blocks-integration-rtl.css
Normal file
1
build/wcsg-blocks-integration-rtl.css
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.wcsg-gifting-to-container-editing{display:flex;gap:5px;margin-top:12px}.wcsg-gifting-to-container-editing .wc-block-components-text-input{flex-grow:1;margin-top:0}.wcsg-gifting-to-container-editing .wp-element-button.gifting-update-button:not(.is-link){min-height:unset;padding:0 var(--xs,20px)}.wcsg-gifting-to-container-editing .components-base-control__field{margin-bottom:0}.wcsg-gifting-to-container-editing .wc-block-components-text-input input:-webkit-autofill{padding-top:.5em}.wcsg-gifting-to-container-editing .has-error .components-text-control__input{color:var(--wc-red,#cc1818)}.wp-block-woocommerce-mini-cart-contents .wcsg-gifting-to-container-editing{flex-direction:column}.wp-block-woocommerce-mini-cart-contents .gifting-update-button{height:40px}.wcsg-gifting-to-container-view{align-items:center;display:flex;flex-wrap:wrap;gap:5px;max-width:100%}.wcsg-gifting-to-container-view span{align-items:center;display:inline-flex;max-width:100%;word-break:break-all;word-wrap:break-word;gap:5px}.wcsg-gifting-to-container-view .components-button.is-link{color:var(--wp--preset--color--contrast);flex-shrink:0;font-size:medium}.wc-block-checkout,.wc-block-components-product-details__gifting-to{align-items:center;display:flex;flex-wrap:wrap;max-width:100%}.wc-block-checkout .wc-block-components-product-details__name:after,.wc-block-components-product-details__gifting-to .wc-block-components-product-details__name:after{content:" "}.wc-block-checkout .wc-block-components-product-details__value,.wc-block-components-product-details__gifting-to .wc-block-components-product-details__value{align-items:center;display:inline-flex;max-width:100%;word-break:break-all;word-wrap:break-word}.wcsg-block-recipient-container .components-checkbox-control__label{font-size:medium}.wc-block-cart .wc-block-components-product-details__gifting-to,.wc-block-cart .wc-block-components-product-details__gifting-to-hidden,.wc-block-cart .wc-block-components-product-details__item-key,.wc-block-checkout .wc-block-components-product-details__gifting-to-hidden,.wc-block-checkout .wc-block-components-product-details__item-key,.wp-block-woocommerce-mini-cart-contents .wc-block-components-product-details__gifting-to,.wp-block-woocommerce-mini-cart-contents .wc-block-components-product-details__gifting-to-hidden,.wp-block-woocommerce-mini-cart-contents .wc-block-components-product-details__item-key{display:none}
|
@@ -1 +1 @@
|
|||||||
<?php return array('dependencies' => array('react', 'react-dom', 'wc-blocks-checkout', 'wp-components', 'wp-data', 'wp-i18n', 'wp-plugins', 'wp-url'), 'version' => 'a0b59d802da6d44a20b3');
|
<?php return array('dependencies' => array('react', 'react-dom', 'wc-blocks-checkout', 'wp-components', 'wp-data', 'wp-i18n', 'wp-plugins', 'wp-url'), 'version' => 'e5022699093de48ed96e');
|
1
build/wcsg-blocks-integration.css
Normal file
1
build/wcsg-blocks-integration.css
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.wcsg-gifting-to-container-editing{display:flex;gap:5px;margin-top:12px}.wcsg-gifting-to-container-editing .wc-block-components-text-input{flex-grow:1;margin-top:0}.wcsg-gifting-to-container-editing .wp-element-button.gifting-update-button:not(.is-link){min-height:unset;padding:0 var(--xs,20px)}.wcsg-gifting-to-container-editing .components-base-control__field{margin-bottom:0}.wcsg-gifting-to-container-editing .wc-block-components-text-input input:-webkit-autofill{padding-top:.5em}.wcsg-gifting-to-container-editing .has-error .components-text-control__input{color:var(--wc-red,#cc1818)}.wp-block-woocommerce-mini-cart-contents .wcsg-gifting-to-container-editing{flex-direction:column}.wp-block-woocommerce-mini-cart-contents .gifting-update-button{height:40px}.wcsg-gifting-to-container-view{align-items:center;display:flex;flex-wrap:wrap;gap:5px;max-width:100%}.wcsg-gifting-to-container-view span{align-items:center;display:inline-flex;max-width:100%;word-break:break-all;word-wrap:break-word;gap:5px}.wcsg-gifting-to-container-view .components-button.is-link{color:var(--wp--preset--color--contrast);flex-shrink:0;font-size:medium}.wc-block-checkout,.wc-block-components-product-details__gifting-to{align-items:center;display:flex;flex-wrap:wrap;max-width:100%}.wc-block-checkout .wc-block-components-product-details__name:after,.wc-block-components-product-details__gifting-to .wc-block-components-product-details__name:after{content:" "}.wc-block-checkout .wc-block-components-product-details__value,.wc-block-components-product-details__gifting-to .wc-block-components-product-details__value{align-items:center;display:inline-flex;max-width:100%;word-break:break-all;word-wrap:break-word}.wcsg-block-recipient-container .components-checkbox-control__label{font-size:medium}.wc-block-cart .wc-block-components-product-details__gifting-to,.wc-block-cart .wc-block-components-product-details__gifting-to-hidden,.wc-block-cart .wc-block-components-product-details__item-key,.wc-block-checkout .wc-block-components-product-details__gifting-to-hidden,.wc-block-checkout .wc-block-components-product-details__item-key,.wp-block-woocommerce-mini-cart-contents .wc-block-components-product-details__gifting-to,.wp-block-woocommerce-mini-cart-contents .wc-block-components-product-details__gifting-to-hidden,.wp-block-woocommerce-mini-cart-contents .wc-block-components-product-details__item-key{display:none}
|
File diff suppressed because one or more lines are too long
@@ -1,5 +1,17 @@
|
|||||||
*** WooCommerce Subscriptions Changelog ***
|
*** WooCommerce Subscriptions Changelog ***
|
||||||
|
|
||||||
|
2025-09-16 - version 7.9.0
|
||||||
|
|
||||||
|
* Add: REST API endpoint to retrieve subscriptions associated with a specific order ID.
|
||||||
|
* Fix: Keep subscription with successful renewals active when parent order fails.
|
||||||
|
* Fix: Error when renewing subscriptions with downloadable gifts.
|
||||||
|
* Fix: Improve performance by loading assets only when necessary.
|
||||||
|
* Fix: "Update cart" button being always enabled.
|
||||||
|
* Fix: Gifting recipient email layout issues when using a long e-mail address.
|
||||||
|
* Fix: Gifting checkbox not showing up on blocks cart when using WooCommerce 10.2+.
|
||||||
|
* Fix: Deleting a gifted subscription recipient will not delete their subscriptions, they will be moved to the subscription purchaser instead.
|
||||||
|
* Dev: The `wcs_get_subscriptions()` and `wcs_get_subscriptions_for_order()` functions are now stricter, and only return instances of `WC_Subscription`.
|
||||||
|
|
||||||
2025-09-02 - version 7.8.2
|
2025-09-02 - version 7.8.2
|
||||||
* Fix: Error when updating/renewing subscriptions containing a pseudo coupon.
|
* Fix: Error when updating/renewing subscriptions containing a pseudo coupon.
|
||||||
* Fix: Fix gifting recipient notice being shown for non gifting orders.
|
* Fix: Fix gifting recipient notice being shown for non gifting orders.
|
||||||
@@ -22,7 +34,7 @@
|
|||||||
2025-07-09 - version 7.7.0
|
2025-07-09 - version 7.7.0
|
||||||
* Fix: Restores normal behavior for the report caching updates scheduled action, which was failing due to a bad filepath.
|
* Fix: Restores normal behavior for the report caching updates scheduled action, which was failing due to a bad filepath.
|
||||||
* Fix: Fix error when placing an order with a valid card after using a declined one.
|
* Fix: Fix error when placing an order with a valid card after using a declined one.
|
||||||
* Fix: Fix order renewal errors when using some plugins.
|
* Fix: Fix order renewal errors when using some plugins.
|
||||||
* Fix: Prevent fatal errors when loading or deleting subscriptions with corrupted date values stored in a database.
|
* Fix: Prevent fatal errors when loading or deleting subscriptions with corrupted date values stored in a database.
|
||||||
* Fix: Prevent fatal errors when trying to save invalid date values and display better error messages instead.
|
* Fix: Prevent fatal errors when trying to save invalid date values and display better error messages instead.
|
||||||
* Fix: Fix broken blocks and javascript translations.
|
* Fix: Fix broken blocks and javascript translations.
|
||||||
|
@@ -36,6 +36,8 @@ class WC_REST_Subscriptions_Controller extends WC_REST_Orders_Controller {
|
|||||||
* -- Subscription specific --
|
* -- Subscription specific --
|
||||||
* GET /subscriptions/status
|
* GET /subscriptions/status
|
||||||
* GET /subscriptions/<subscription_id>/orders
|
* GET /subscriptions/<subscription_id>/orders
|
||||||
|
* GET /orders/<order_id>/subscriptions
|
||||||
|
* POST /orders/<order_id>/subscriptions
|
||||||
*
|
*
|
||||||
* @since 3.1.0
|
* @since 3.1.0
|
||||||
*/
|
*/
|
||||||
@@ -61,15 +63,25 @@ class WC_REST_Subscriptions_Controller extends WC_REST_Orders_Controller {
|
|||||||
'schema' => array( $this, 'get_public_item_schema' ),
|
'schema' => array( $this, 'get_public_item_schema' ),
|
||||||
) );
|
) );
|
||||||
|
|
||||||
register_rest_route( $this->namespace, "/orders/(?P<id>[\d]+)/{$this->rest_base}", array(
|
register_rest_route(
|
||||||
|
$this->namespace,
|
||||||
|
"/orders/(?P<id>[\d]+)/{$this->rest_base}",
|
||||||
array(
|
array(
|
||||||
'methods' => WP_REST_Server::CREATABLE,
|
array(
|
||||||
'callback' => array( $this, 'create_subscriptions_from_order' ),
|
'methods' => WP_REST_Server::READABLE,
|
||||||
'permission_callback' => array( $this, 'create_item_permissions_check' ),
|
'callback' => array( $this, 'get_order_subscriptions' ),
|
||||||
'args' => $this->get_collection_params(),
|
'permission_callback' => array( $this, 'get_items_permissions_check' ),
|
||||||
),
|
'args' => $this->get_collection_params(),
|
||||||
'schema' => array( $this, 'get_public_item_schema' ),
|
),
|
||||||
) );
|
array(
|
||||||
|
'methods' => WP_REST_Server::CREATABLE,
|
||||||
|
'callback' => array( $this, 'create_subscriptions_from_order' ),
|
||||||
|
'permission_callback' => array( $this, 'create_item_permissions_check' ),
|
||||||
|
'args' => $this->get_collection_params(),
|
||||||
|
),
|
||||||
|
'schema' => array( $this, 'get_public_item_schema' ),
|
||||||
|
)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -206,6 +218,76 @@ class WC_REST_Subscriptions_Controller extends WC_REST_Orders_Controller {
|
|||||||
return apply_filters( 'wcs_rest_subscription_orders_response', $response, $request );
|
return apply_filters( 'wcs_rest_subscription_orders_response', $response, $request );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the /orders/[id]/subscriptions response.
|
||||||
|
*
|
||||||
|
* @since 7.9.0
|
||||||
|
*
|
||||||
|
* @param WP_REST_Request $request The request object.
|
||||||
|
* @return WP_Error|WP_REST_Response $response The response or an error if one occurs.
|
||||||
|
*/
|
||||||
|
public function get_order_subscriptions( $request ) {
|
||||||
|
$order_id = absint( $request['id'] );
|
||||||
|
|
||||||
|
if ( empty( $order_id ) ) {
|
||||||
|
return new WP_Error( 'woocommerce_rest_invalid_order_id', __( 'Invalid order ID.', 'woocommerce-subscriptions' ), array( 'status' => 404 ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
$order = wc_get_order( $order_id );
|
||||||
|
|
||||||
|
if ( ! $order ) {
|
||||||
|
return new WP_Error(
|
||||||
|
'woocommerce_rest_invalid_order_id',
|
||||||
|
// translators: %d is the order ID.
|
||||||
|
sprintf( __( 'Failed to load order object with the ID %d.', 'woocommerce-subscriptions' ), $order_id ),
|
||||||
|
array( 'status' => 404 )
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Build arguments for wcs_get_subscriptions_for_order()x
|
||||||
|
$args = array(
|
||||||
|
'order_type' => 'any', // Return all subscriptions for the order.
|
||||||
|
);
|
||||||
|
|
||||||
|
// Set arguments from request.
|
||||||
|
if ( ! empty( $request['orderby'] ) ) {
|
||||||
|
$args['orderby'] = $request['orderby'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! empty( $request['order'] ) ) {
|
||||||
|
$args['order'] = $request['order'];
|
||||||
|
}
|
||||||
|
|
||||||
|
// Map standard request parameters to wcs_get_subscriptions_for_order() arguments.
|
||||||
|
if ( ! empty( $request['customer'] ) ) {
|
||||||
|
$args['customer_id'] = $request['customer'];
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( ! empty( $request['status'] ) ) {
|
||||||
|
$args['subscription_status'] = $request['status'];
|
||||||
|
}
|
||||||
|
|
||||||
|
$subscriptions = wcs_get_subscriptions_for_order( $order, $args );
|
||||||
|
|
||||||
|
$response_data = array();
|
||||||
|
|
||||||
|
foreach ( $subscriptions as $subscription ) {
|
||||||
|
if ( is_a( $subscription, 'WC_Subscription' ) && ! wc_rest_check_post_permissions( 'shop_subscription', 'read', $subscription->get_id() ) ) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$response = $this->prepare_object_for_response( $subscription, $request );
|
||||||
|
$response_data[] = $this->prepare_response_for_collection( $response );
|
||||||
|
}
|
||||||
|
|
||||||
|
$response = rest_ensure_response( $response_data );
|
||||||
|
// Pagination is not fully supported, so we manually set the total.
|
||||||
|
$response->header( 'X-WP-Total', count( $response_data ) );
|
||||||
|
$response->header( 'X-WP-TotalPages', 1 );
|
||||||
|
|
||||||
|
return $response;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Overrides WC_REST_Orders_Controller::get_order_statuses() so that subscription statuses are
|
* Overrides WC_REST_Orders_Controller::get_order_statuses() so that subscription statuses are
|
||||||
* validated correctly.
|
* validated correctly.
|
||||||
|
@@ -8,6 +8,8 @@
|
|||||||
* @since 2.0
|
* @since 2.0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use Automattic\Jetpack\Constants;
|
||||||
|
|
||||||
if ( ! defined( 'ABSPATH' ) ) {
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
@@ -153,7 +155,7 @@ class WCS_API {
|
|||||||
* @return boolean
|
* @return boolean
|
||||||
*/
|
*/
|
||||||
protected static function is_orders_api_request() {
|
protected static function is_orders_api_request() {
|
||||||
if ( ! defined( 'REST_REQUEST' ) || ! REST_REQUEST || empty( $GLOBALS['wp']->query_vars['rest_route'] ) ) {
|
if ( ! Constants::is_true( 'REST_REQUEST' ) || empty( $GLOBALS['wp']->query_vars['rest_route'] ) ) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -2028,30 +2028,49 @@ class WC_Subscription extends WC_Order {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When a payment fails, either for the original purchase or a renewal payment, this function processes it.
|
* When related order fails, update the status of the related order and the subscription.
|
||||||
|
* Related order can fail because of payment failure or because of other reasons.
|
||||||
*
|
*
|
||||||
* @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.0
|
* @param string $new_status The new status to set for the subscription.
|
||||||
|
* @param WC_Order|bool $related_order The related order that failed payment. False if no related order is found.
|
||||||
|
* @since 7.9.0 Replaces payment_failed() method.
|
||||||
*/
|
*/
|
||||||
public function payment_failed( $new_status = 'on-hold' ) {
|
public function payment_failed_for_related_order( $new_status = 'on-hold', $related_order = false ) {
|
||||||
|
if ( is_a( $related_order, 'WC_Order' ) ) {
|
||||||
// Make sure the last order's status is set to failed
|
$related_order_was_modified = false;
|
||||||
$last_order = $this->get_last_order( 'all', 'any' );
|
if ( wcs_order_contains_renewal( $related_order ) ) {
|
||||||
|
$related_order->update_meta_data( self::RENEWAL_FAILED_META_KEY, wc_bool_to_string( true ) );
|
||||||
if ( false !== $last_order ) {
|
$related_order_was_modified = true;
|
||||||
$last_order->update_meta_data( self::RENEWAL_FAILED_META_KEY, wc_bool_to_string( true ) );
|
|
||||||
|
|
||||||
if ( false === $last_order->has_status( 'failed' ) ) {
|
|
||||||
remove_filter( 'woocommerce_order_status_changed', 'WC_Subscriptions_Renewal_Order::maybe_record_subscription_payment' );
|
|
||||||
$last_order->update_status( 'failed' );
|
|
||||||
add_filter( 'woocommerce_order_status_changed', 'WC_Subscriptions_Renewal_Order::maybe_record_subscription_payment', 10, 3 );
|
|
||||||
} else {
|
|
||||||
// If we didn't update the status, save the order to make sure our self::RENEWAL_FAILED_META_KEY meta data is saved.
|
|
||||||
$last_order->save();
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Log payment failure on order
|
if ( false === $related_order->has_status( 'failed' ) ) {
|
||||||
$this->add_order_note( __( 'Payment failed.', 'woocommerce-subscriptions' ) );
|
remove_filter( 'woocommerce_order_status_changed', 'WC_Subscriptions_Renewal_Order::maybe_record_subscription_payment' );
|
||||||
|
// No need to set $related_order_was_modified to true here because update status will save the changes.
|
||||||
|
$related_order->update_status( 'failed' );
|
||||||
|
add_filter( 'woocommerce_order_status_changed', 'WC_Subscriptions_Renewal_Order::maybe_record_subscription_payment', 10, 3 );
|
||||||
|
} elseif ( $related_order_was_modified ) {
|
||||||
|
// If we didn't update the status, save the order to make sure our self::RENEWAL_FAILED_META_KEY meta data is saved.
|
||||||
|
$related_order->save();
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->add_order_note(
|
||||||
|
sprintf(
|
||||||
|
// translators: %d: related order ID
|
||||||
|
__( 'Related order #%d failed.', 'woocommerce-subscriptions' ),
|
||||||
|
$related_order->get_id()
|
||||||
|
)
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
wc_get_logger()->debug(
|
||||||
|
'WC_Subscription::payment_failed_for_related_order is called without a related order',
|
||||||
|
array(
|
||||||
|
'subscription_id' => $this->get_id(),
|
||||||
|
'new_status' => $new_status,
|
||||||
|
'related_order' => $related_order,
|
||||||
|
'backtrace' => true,
|
||||||
|
)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// Allow a short circuit for plugins & payment gateways to force max failed payments exceeded
|
// Allow a short circuit for plugins & payment gateways to force max failed payments exceeded
|
||||||
// This also forces the new status to be 'cancelled' if the filter is applied or the subscription is pending-cancel
|
// This also forces the new status to be 'cancelled' if the filter is applied or the subscription is pending-cancel
|
||||||
@@ -2068,11 +2087,23 @@ class WC_Subscription extends WC_Order {
|
|||||||
|
|
||||||
do_action( 'woocommerce_subscription_payment_failed', $this, $new_status );
|
do_action( 'woocommerce_subscription_payment_failed', $this, $new_status );
|
||||||
|
|
||||||
if ( false !== $last_order && wcs_order_contains_renewal( $last_order ) ) {
|
if ( false !== $related_order && wcs_order_contains_renewal( $related_order ) ) {
|
||||||
do_action( 'woocommerce_subscription_renewal_payment_failed', $this, $last_order );
|
do_action( 'woocommerce_subscription_renewal_payment_failed', $this, $related_order );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* When a payment fails, either for the original purchase or a renewal payment, this function processes it.
|
||||||
|
*
|
||||||
|
* @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.0
|
||||||
|
* @deprecated 7.9.0 - The method incorrectly assumes that the last order failed, and sometimes causes side effects.Use payment_failed_for_related_order instead.
|
||||||
|
*/
|
||||||
|
public function payment_failed( $new_status = 'on-hold' ) {
|
||||||
|
// Make sure the last order's status is set to failed
|
||||||
|
$last_order = $this->get_last_order( 'all', 'any' );
|
||||||
|
$this->payment_failed_for_related_order( $new_status, $last_order );
|
||||||
|
}
|
||||||
|
|
||||||
/*** Refund related functions are required for the Edit Order/Subscription screen, but they aren't used on a subscription ************/
|
/*** Refund related functions are required for the Edit Order/Subscription screen, but they aren't used on a subscription ************/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -1159,19 +1159,20 @@ class WC_Subscriptions_Cart {
|
|||||||
*/
|
*/
|
||||||
public static function cart_contains_other_subscription_products( $product_id ) {
|
public static function cart_contains_other_subscription_products( $product_id ) {
|
||||||
|
|
||||||
$cart_contains_other_subscription_products = false;
|
if ( empty( WC()->cart->cart_contents ) || ! WC_Subscriptions_Product::is_subscription( $product_id ) ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if ( ! empty( WC()->cart->cart_contents ) && WC_Subscriptions_Product::is_subscription( $product_id ) ) {
|
foreach ( WC()->cart->cart_contents as $cart_item ) {
|
||||||
$is_subscription = WC_Subscriptions_Product::is_subscription( $product_id );
|
$item_product_id = wcs_get_canonical_product_id( $cart_item );
|
||||||
foreach ( WC()->cart->cart_contents as $cart_item ) {
|
$is_subscription = isset( $item_product_id ) ? WC_Subscriptions_Product::is_subscription( $item_product_id ) : false;
|
||||||
if ( wcs_get_canonical_product_id( $cart_item ) !== $product_id ) {
|
if ( $item_product_id !== $product_id && $is_subscription ) {
|
||||||
$cart_contains_other_subscription_products = true;
|
return true;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return $cart_contains_other_subscription_products;
|
// Return false because no other subscription product was found in the cart.
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -34,11 +34,13 @@ class WC_Subscriptions_Frontend_Scripts {
|
|||||||
* @since 1.0.0 - Migrated from WooCommerce Subscriptions v3.1.3
|
* @since 1.0.0 - Migrated from WooCommerce Subscriptions v3.1.3
|
||||||
*/
|
*/
|
||||||
public static function enqueue_scripts() {
|
public static function enqueue_scripts() {
|
||||||
|
global $post;
|
||||||
|
|
||||||
$dependencies = array( 'jquery' );
|
$dependencies = array( 'jquery' );
|
||||||
|
|
||||||
if ( is_cart() || is_checkout() ) {
|
if ( is_cart() || is_checkout() ) {
|
||||||
wp_enqueue_script( 'wcs-cart', self::get_file_url( 'assets/js/frontend/wcs-cart.js' ), $dependencies, WC_Subscriptions_Core_Plugin::instance()->get_library_version(), true );
|
wp_enqueue_script( 'wcs-cart', self::get_file_url( 'assets/js/frontend/wcs-cart.js' ), $dependencies, WC_Subscriptions_Core_Plugin::instance()->get_library_version(), true );
|
||||||
} elseif ( is_product() ) {
|
} elseif ( is_product() && WC_Subscriptions_Product::is_subscription( $post->ID ) ) {
|
||||||
wp_enqueue_script( 'wcs-single-product', self::get_file_url( 'assets/js/frontend/single-product.js' ), $dependencies, WC_Subscriptions_Core_Plugin::instance()->get_library_version(), true );
|
wp_enqueue_script( 'wcs-single-product', self::get_file_url( 'assets/js/frontend/single-product.js' ), $dependencies, WC_Subscriptions_Core_Plugin::instance()->get_library_version(), true );
|
||||||
} elseif ( wcs_is_view_subscription_page() ) {
|
} elseif ( wcs_is_view_subscription_page() ) {
|
||||||
$subscription = wcs_get_subscription( absint( get_query_var( 'view-subscription' ) ) );
|
$subscription = wcs_get_subscription( absint( get_query_var( 'view-subscription' ) ) );
|
||||||
@@ -66,6 +68,7 @@ class WC_Subscriptions_Frontend_Scripts {
|
|||||||
* @since 1.0.0 - Migrated from WooCommerce Subscriptions v3.1.3
|
* @since 1.0.0 - Migrated from WooCommerce Subscriptions v3.1.3
|
||||||
*/
|
*/
|
||||||
public static function enqueue_styles( $styles ) {
|
public static function enqueue_styles( $styles ) {
|
||||||
|
global $post;
|
||||||
|
|
||||||
if ( is_checkout() || is_cart() ) {
|
if ( is_checkout() || is_cart() ) {
|
||||||
$styles['wcs-checkout'] = array(
|
$styles['wcs-checkout'] = array(
|
||||||
@@ -82,6 +85,35 @@ class WC_Subscriptions_Frontend_Scripts {
|
|||||||
'media' => 'all',
|
'media' => 'all',
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (
|
||||||
|
wp_is_block_theme() ||
|
||||||
|
(
|
||||||
|
! empty( $post ) &&
|
||||||
|
(
|
||||||
|
WC_Blocks_Utils::has_block_in_page( $post->ID, 'woocommerce/cart' ) ||
|
||||||
|
WC_Blocks_Utils::has_block_in_page( $post->ID, 'woocommerce/mini-cart' ) ||
|
||||||
|
WC_Blocks_Utils::has_block_in_page( $post->ID, 'woocommerce/checkout' )
|
||||||
|
)
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
$styles['wcs-blocks-integration'] = array(
|
||||||
|
'src' => \WC_Subscriptions_Core_Plugin::instance()->get_subscriptions_core_directory_url( 'build/index.css' ),
|
||||||
|
'deps' => 'wc-checkout',
|
||||||
|
'version' => WCS_Blocks_Integration::get_file_version( \WC_Subscriptions_Plugin::instance()->get_plugin_directory( 'build/index.css' ) ),
|
||||||
|
'media' => 'all',
|
||||||
|
);
|
||||||
|
|
||||||
|
if ( WCSG_Admin::is_gifting_enabled() ) {
|
||||||
|
$styles['wcsg-blocks-integration'] = array(
|
||||||
|
'src' => \WC_Subscriptions_Core_Plugin::instance()->get_subscriptions_core_directory_url( 'build/wcsg-blocks-integration.css' ),
|
||||||
|
'deps' => 'wc-checkout',
|
||||||
|
'version' => WCS_Blocks_Integration::get_file_version( \WC_Subscriptions_Plugin::instance()->get_plugin_directory( 'build/wcsg-blocks-integration.css' ) ),
|
||||||
|
'media' => 'all',
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $styles;
|
return $styles;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -438,11 +438,13 @@ class WC_Subscriptions_Manager {
|
|||||||
/**
|
/**
|
||||||
* Called when a sign up fails during the payment processing step.
|
* Called when a sign up fails during the payment processing step.
|
||||||
*
|
*
|
||||||
|
* This method only performs actions when a parent order changed to failed status.
|
||||||
|
* Overlaps with WC_Subscriptions_Order::maybe_record_subscription_payment.
|
||||||
|
*
|
||||||
* @param WC_Order|int $order The order or ID of the order for which subscriptions should be marked as failed.
|
* @param WC_Order|int $order The order or ID of the order for which subscriptions should be marked as failed.
|
||||||
* @since 1.0.0 - Migrated from WooCommerce Subscriptions v1.0
|
* @since 1.0.0 - Migrated from WooCommerce Subscriptions v1.0
|
||||||
*/
|
*/
|
||||||
public static function failed_subscription_sign_ups_for_order( $order ) {
|
public static function failed_subscription_sign_ups_for_order( $order ) {
|
||||||
|
|
||||||
$subscriptions = wcs_get_subscriptions_for_order( $order, array( 'order_type' => 'parent' ) );
|
$subscriptions = wcs_get_subscriptions_for_order( $order, array( 'order_type' => 'parent' ) );
|
||||||
|
|
||||||
if ( empty( $subscriptions ) ) {
|
if ( empty( $subscriptions ) ) {
|
||||||
@@ -461,9 +463,23 @@ class WC_Subscriptions_Manager {
|
|||||||
foreach ( $subscriptions as $subscription ) {
|
foreach ( $subscriptions as $subscription ) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$new_status = $subscription->has_status( 'pending' ) && $subscription->get_parent_id() === $order->get_id() ? 'pending' : 'on-hold';
|
/**
|
||||||
$subscription->payment_failed( $new_status );
|
* Parent status failure should not change the subscription status in most cases.
|
||||||
|
* We only change the status when the parent order is the last order and subscription is active.
|
||||||
|
* In that case, we need to put the subscription on hold as we do when the latest renewal order fails.
|
||||||
|
* Examples:
|
||||||
|
* - if subscription is pending and initial payment fails, we keep subscription as pending to activate it on successful payment.
|
||||||
|
* - if subscription has successful renewals and somehow the parent order fails after that, we still keep subscription as active.
|
||||||
|
* - if subscription is active after successful initial payment, but later the parent order fails, we move subscription to on-hold.
|
||||||
|
*/
|
||||||
|
$new_status = $subscription->get_status();
|
||||||
|
|
||||||
|
if ( 'active' === $new_status && $subscription->get_parent_id() === $order->get_id() ) {
|
||||||
|
$last_order = $subscription->get_last_order( 'ids', 'any' );
|
||||||
|
$new_status = $last_order === $order->get_id() ? 'on-hold' : 'active';
|
||||||
|
}
|
||||||
|
|
||||||
|
$subscription->payment_failed_for_related_order( $new_status, $order );
|
||||||
} catch ( Exception $e ) {
|
} catch ( Exception $e ) {
|
||||||
// translators: $1: order number, $2: error message
|
// translators: $1: order number, $2: error message
|
||||||
$subscription->add_order_note( sprintf( __( 'Failed to process failed payment on subscription for order #%1$s: %2$s', 'woocommerce-subscriptions' ), is_object( $order ) ? $order->get_order_number() : $order, $e->getMessage() ) );
|
$subscription->add_order_note( sprintf( __( 'Failed to process failed payment on subscription for order #%1$s: %2$s', 'woocommerce-subscriptions' ), is_object( $order ) ? $order->get_order_number() : $order, $e->getMessage() ) );
|
||||||
@@ -1020,6 +1036,24 @@ class WC_Subscriptions_Manager {
|
|||||||
foreach ( $subscriptions as $subscription ) {
|
foreach ( $subscriptions as $subscription ) {
|
||||||
$subscription_number = $subscription->get_order_number();
|
$subscription_number = $subscription->get_order_number();
|
||||||
|
|
||||||
|
if ( WCS_Gifting::is_gifted_subscription( $subscription ) ) {
|
||||||
|
// translators: %s is the email address of the recipient.
|
||||||
|
$message = sprintf( __( 'The gifted subscription moved to the purchaser after the recipient user with email address %s was deleted.', 'woocommerce-subscriptions' ), $subscription->get_meta( '_recipient_user_email_address' ) );
|
||||||
|
|
||||||
|
$subscription->delete_meta_data( '_recipient_user' );
|
||||||
|
$subscription->delete_meta_data( '_recipient_user_email_address' );
|
||||||
|
$subscription->save();
|
||||||
|
|
||||||
|
$subscription->add_order_note( $message, $subscription_number );
|
||||||
|
|
||||||
|
// Check needed for tests.
|
||||||
|
if ( $subscription->get_parent() ) {
|
||||||
|
$subscription->get_parent()->add_order_note( $message, $subscription_number );
|
||||||
|
}
|
||||||
|
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// Before deleting the subscription, add an order note to the related orders.
|
// Before deleting the subscription, add an order note to the related orders.
|
||||||
foreach ( $subscription->get_related_orders( 'all', array( 'parent', 'renewal', 'switch' ) ) as $order ) {
|
foreach ( $subscription->get_related_orders( 'all', array( 'parent', 'renewal', 'switch' ) ) as $order ) {
|
||||||
if ( $current_user ) {
|
if ( $current_user ) {
|
||||||
|
@@ -485,7 +485,7 @@ class WC_Subscriptions_Order {
|
|||||||
* @param string $new_order_status The new order status.
|
* @param string $new_order_status The new order status.
|
||||||
*/
|
*/
|
||||||
public static function maybe_record_subscription_payment( $order_id, $old_order_status, $new_order_status ) {
|
public static function maybe_record_subscription_payment( $order_id, $old_order_status, $new_order_status ) {
|
||||||
|
// ! This hook will only perform actions on parent order status changes.
|
||||||
if ( ! wcs_order_contains_subscription( $order_id, 'parent' ) ) {
|
if ( ! wcs_order_contains_subscription( $order_id, 'parent' ) ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -578,10 +578,6 @@ class WC_Subscriptions_Order {
|
|||||||
$subscription->payment_complete_for_order( $order );
|
$subscription->payment_complete_for_order( $order );
|
||||||
$was_activated = true;
|
$was_activated = true;
|
||||||
|
|
||||||
} elseif ( 'failed' === $new_order_status ) {
|
|
||||||
// When parent order fails, we want to keep the subscription status as pending unless it had another status before.
|
|
||||||
$new_status = $subscription->has_status( 'pending' ) && $subscription->get_parent_id() === $order->get_id() ? 'pending' : 'on-hold';
|
|
||||||
$subscription->payment_failed( $new_status );
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -81,10 +81,12 @@ class WC_Subscriptions_Renewal_Order {
|
|||||||
* subscriptions are updated even if payment is processed by a manual payment gateways (which would never trigger the
|
* subscriptions are updated even if payment is processed by a manual payment gateways (which would never trigger the
|
||||||
* 'woocommerce_payment_complete' hook) or by some other means that circumvents that hook.
|
* 'woocommerce_payment_complete' hook) or by some other means that circumvents that hook.
|
||||||
*
|
*
|
||||||
|
* This hook will be skipped for early renewal orders transitioning to statuses other than cancelled or refunded.
|
||||||
|
* @see WCS_Cart_Early_Renewal::maybe_record_subscription_payment().
|
||||||
|
*
|
||||||
* @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.0
|
* @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.0
|
||||||
*/
|
*/
|
||||||
public static function maybe_record_subscription_payment( $order_id, $orders_old_status, $orders_new_status ) {
|
public static function maybe_record_subscription_payment( $order_id, $orders_old_status, $orders_new_status ) {
|
||||||
|
|
||||||
if ( ! wcs_order_contains_renewal( $order_id ) ) {
|
if ( ! wcs_order_contains_renewal( $order_id ) ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -22,17 +22,15 @@ class WCS_Blocks_Integration implements IntegrationInterface {
|
|||||||
*/
|
*/
|
||||||
public function initialize() {
|
public function initialize() {
|
||||||
$script_path = 'build/index.js';
|
$script_path = 'build/index.js';
|
||||||
$style_path = 'build/index.css';
|
|
||||||
|
|
||||||
$script_url = \WC_Subscriptions_Core_Plugin::instance()->get_subscriptions_core_directory_url( $script_path );
|
$script_url = \WC_Subscriptions_Core_Plugin::instance()->get_subscriptions_core_directory_url( $script_path );
|
||||||
$style_url = \WC_Subscriptions_Core_Plugin::instance()->get_subscriptions_core_directory_url( $style_path );
|
|
||||||
|
|
||||||
$script_asset_path = \WC_Subscriptions_Plugin::instance()->get_plugin_directory( 'build/index.asset.php' );
|
$script_asset_path = \WC_Subscriptions_Plugin::instance()->get_plugin_directory( 'build/index.asset.php' );
|
||||||
$script_asset = file_exists( $script_asset_path )
|
$script_asset = file_exists( $script_asset_path )
|
||||||
? require $script_asset_path
|
? require $script_asset_path
|
||||||
: array(
|
: array(
|
||||||
'dependencies' => array(),
|
'dependencies' => array(),
|
||||||
'version' => $this->get_file_version( $script_asset_path ),
|
'version' => self::get_file_version( $script_asset_path ),
|
||||||
);
|
);
|
||||||
|
|
||||||
wp_register_script(
|
wp_register_script(
|
||||||
@@ -47,13 +45,6 @@ class WCS_Blocks_Integration implements IntegrationInterface {
|
|||||||
'woocommerce-subscriptions',
|
'woocommerce-subscriptions',
|
||||||
\WC_Subscriptions_Plugin::instance()->get_plugin_directory( 'languages' )
|
\WC_Subscriptions_Plugin::instance()->get_plugin_directory( 'languages' )
|
||||||
);
|
);
|
||||||
wp_enqueue_style(
|
|
||||||
'wc-blocks-integration',
|
|
||||||
$style_url,
|
|
||||||
'',
|
|
||||||
$this->get_file_version( \WC_Subscriptions_Plugin::instance()->get_plugin_directory( 'build/index.css' ) ),
|
|
||||||
'all'
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -92,7 +83,7 @@ class WCS_Blocks_Integration implements IntegrationInterface {
|
|||||||
* @param string $file Local path to the file.
|
* @param string $file Local path to the file.
|
||||||
* @return string The cache buster value to use for the given file.
|
* @return string The cache buster value to use for the given file.
|
||||||
*/
|
*/
|
||||||
protected function get_file_version( $file ) {
|
public static function get_file_version( $file ) {
|
||||||
if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG && file_exists( $file ) ) {
|
if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG && file_exists( $file ) ) {
|
||||||
return filemtime( $file );
|
return filemtime( $file );
|
||||||
}
|
}
|
||||||
|
@@ -79,6 +79,10 @@ function wcs_do_subscriptions_exist() {
|
|||||||
*/
|
*/
|
||||||
function wcs_get_subscription( $the_subscription ) {
|
function wcs_get_subscription( $the_subscription ) {
|
||||||
|
|
||||||
|
if ( empty( $the_subscription ) ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if ( is_object( $the_subscription ) && wcs_is_subscription( $the_subscription ) ) {
|
if ( is_object( $the_subscription ) && wcs_is_subscription( $the_subscription ) ) {
|
||||||
$the_subscription = $the_subscription->get_id();
|
$the_subscription = $the_subscription->get_id();
|
||||||
}
|
}
|
||||||
@@ -395,6 +399,7 @@ function wcs_sanitize_subscription_status_key( $status_key ) {
|
|||||||
*
|
*
|
||||||
* @since 1.0.0 Migrated from WooCommerce Subscriptions v2.0.
|
* @since 1.0.0 Migrated from WooCommerce Subscriptions v2.0.
|
||||||
* @since 7.3.0 Any additional arguments are passed across to WooCommerce for use in the final query.
|
* @since 7.3.0 Any additional arguments are passed across to WooCommerce for use in the final query.
|
||||||
|
* @since 7.9.0 Only instances of WC_Subscriptions will be returned by this function (prior to this, other values including false were occassionally part of the result).
|
||||||
*
|
*
|
||||||
* @param array $args {
|
* @param array $args {
|
||||||
* A set of name value pairs to query for subscriptions - similar to args supported by wc_get_orders().
|
* A set of name value pairs to query for subscriptions - similar to args supported by wc_get_orders().
|
||||||
@@ -563,7 +568,27 @@ function wcs_get_subscriptions( $args ) {
|
|||||||
$subscriptions = $query_controller->paginate_results( $subscriptions );
|
$subscriptions = $query_controller->paginate_results( $subscriptions );
|
||||||
}
|
}
|
||||||
|
|
||||||
return apply_filters( 'woocommerce_got_subscriptions', $subscriptions, $working_args );
|
/**
|
||||||
|
* Provides an opportunity to filter the subscriptions returned by wcs_get_subscriptions().
|
||||||
|
*
|
||||||
|
* Note that the function guarantees it will return an array of WC_Subscription objects, keyed by subscription ID.
|
||||||
|
* For that reason, any non-WC_Subscription objects that are inserted via this hook will be removed.
|
||||||
|
*
|
||||||
|
* @since 2.0.0
|
||||||
|
*
|
||||||
|
* @param WC_Subscriptions[] $subscriptions The subscriptions to be returned by wcs_get_subscriptions().
|
||||||
|
* @param array $working_args The original wcs_get_subscription() $args parameter.
|
||||||
|
*/
|
||||||
|
$filtered_subscriptions = apply_filters( 'woocommerce_got_subscriptions', $subscriptions, $working_args );
|
||||||
|
$subscriptions = array();
|
||||||
|
|
||||||
|
foreach ( $filtered_subscriptions as $subscription ) {
|
||||||
|
if ( is_a( $subscription, WC_Subscription::class ) ) {
|
||||||
|
$subscriptions[ $subscription->get_id() ] = $subscription;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return $subscriptions;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -28,6 +28,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||||||
* 'order_type' Get subscriptions for the any order type in this array. Can include 'any', 'parent', 'renewal', 'resubscribe' or 'switch', defaults to 'parent'.
|
* 'order_type' Get subscriptions for the any order type in this array. Can include 'any', 'parent', 'renewal', 'resubscribe' or 'switch', defaults to 'parent'.
|
||||||
* @return WC_Subscription[] Subscription details in post_id => WC_Subscription form.
|
* @return WC_Subscription[] Subscription details in post_id => WC_Subscription form.
|
||||||
* @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.0
|
* @since 1.0.0 - Migrated from WooCommerce Subscriptions v2.0
|
||||||
|
* @since 7.9.0 Only instances of WC_Subscriptions will be returned by this function (prior to this, other values including false were occassionally part of the result).
|
||||||
*/
|
*/
|
||||||
function wcs_get_subscriptions_for_order( $order, $args = array() ) {
|
function wcs_get_subscriptions_for_order( $order, $args = array() ) {
|
||||||
|
|
||||||
@@ -72,7 +73,13 @@ function wcs_get_subscriptions_for_order( $order, $args = array() ) {
|
|||||||
|
|
||||||
foreach ( $subscription_ids as $subscription_id ) {
|
foreach ( $subscription_ids as $subscription_id ) {
|
||||||
if ( wcs_is_subscription( $subscription_id ) ) {
|
if ( wcs_is_subscription( $subscription_id ) ) {
|
||||||
$subscriptions[ $subscription_id ] = wcs_get_subscription( $subscription_id );
|
$subscription = wcs_get_subscription( $subscription_id );
|
||||||
|
|
||||||
|
// This additional check ensures we meet our promise of returning WC_Subscription[], in part by guarding
|
||||||
|
// a against race condition that could lead to $subscription being false.
|
||||||
|
if ( is_a( $subscription, WC_Subscription::class ) ) {
|
||||||
|
$subscriptions[ $subscription_id ] = $subscription;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -98,8 +98,13 @@ class WCS_Gifting {
|
|||||||
* Register/queue frontend scripts.
|
* Register/queue frontend scripts.
|
||||||
*/
|
*/
|
||||||
public static function gifting_scripts() {
|
public static function gifting_scripts() {
|
||||||
wp_register_script( 'woocommerce_subscriptions_gifting', plugins_url( '/assets/js/gifting/wcs-gifting.js', WC_Subscriptions::$plugin_file ), array( 'jquery' ), WC_Subscriptions::$version, true );
|
global $post;
|
||||||
wp_enqueue_script( 'woocommerce_subscriptions_gifting' );
|
|
||||||
|
if ( ! WCSG_Admin::is_gifting_enabled() ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// We load this on all pages because of the mini-cart related styles.
|
||||||
wp_enqueue_style(
|
wp_enqueue_style(
|
||||||
'woocommerce_subscriptions_gifting',
|
'woocommerce_subscriptions_gifting',
|
||||||
plugins_url( '/assets/css/gifting/shortcode-checkout.css', WC_Subscriptions::$plugin_file ),
|
plugins_url( '/assets/css/gifting/shortcode-checkout.css', WC_Subscriptions::$plugin_file ),
|
||||||
@@ -107,6 +112,23 @@ class WCS_Gifting {
|
|||||||
WC_VERSION,
|
WC_VERSION,
|
||||||
'all'
|
'all'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if ( ! is_cart() && ! is_checkout() && ! is_product() ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// We don't need to load the scripts on blocks pages.
|
||||||
|
if ( WC_Blocks_Utils::has_block_in_page( $post->ID, 'woocommerce/cart' ) || WC_Blocks_Utils::has_block_in_page( $post->ID, 'woocommerce/checkout' ) ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// We don't need to load the script on product pages that are not subscriptions or not giftable subscriptions.
|
||||||
|
if ( is_product() && ( ! WC_Subscriptions_Product::is_subscription( $post->ID ) || ! WCSG_Product::is_giftable( $post->ID ) ) ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
wp_register_script( 'woocommerce_subscriptions_gifting', plugins_url( '/assets/js/gifting/wcs-gifting.js', WC_Subscriptions::$plugin_file ), array( 'jquery' ), WC_Subscriptions::$version, true );
|
||||||
|
wp_enqueue_script( 'woocommerce_subscriptions_gifting' );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -324,8 +346,8 @@ class WCS_Gifting {
|
|||||||
$args = array(
|
$args = array(
|
||||||
'email' => $email,
|
'email' => $email,
|
||||||
'id' => $id,
|
'id' => $id,
|
||||||
'container_style_attributes' => apply_filters( 'wcsg_recipient_fields_style_attributes', empty( $email ) ? array( 'display: none;' ) : array(), $email ),
|
'container_style_attributes' => apply_filters( 'wcsg_recipient_fields_style_attributes', array(), $email ),
|
||||||
'container_css_class' => apply_filters( 'wcsg_recipient_fields_css_class', array(), $email ),
|
'container_css_class' => apply_filters( 'wcsg_recipient_fields_css_class', empty( $email ) ? array( 'hidden' ) : array(), $email ),
|
||||||
'email_field_args' => apply_filters( 'wcsg_recipient_email_field_args', $email_field_args, $email ),
|
'email_field_args' => apply_filters( 'wcsg_recipient_email_field_args', $email_field_args, $email ),
|
||||||
'checkbox_field_args' => apply_filters( 'wcsg_recipient_checkbox_field_args', $checkbox_field_args, $email ),
|
'checkbox_field_args' => apply_filters( 'wcsg_recipient_checkbox_field_args', $checkbox_field_args, $email ),
|
||||||
'nonce_field' => $nonce_field,
|
'nonce_field' => $nonce_field,
|
||||||
@@ -499,6 +521,10 @@ class WCS_Gifting {
|
|||||||
$subscription = wcs_get_subscription( $subscription );
|
$subscription = wcs_get_subscription( $subscription );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( ! $subscription ) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if ( wcs_is_subscription( $subscription ) ) {
|
if ( wcs_is_subscription( $subscription ) ) {
|
||||||
$recipient_user_id = self::get_recipient_user( $subscription );
|
$recipient_user_id = self::get_recipient_user( $subscription );
|
||||||
$has_recipient_email = $subscription->get_meta( '_recipient_user_email_address' );
|
$has_recipient_email = $subscription->get_meta( '_recipient_user_email_address' );
|
||||||
@@ -868,6 +894,11 @@ class WCS_Gifting {
|
|||||||
if ( ! class_exists( 'Automattic\WooCommerce\Blocks\Package' ) || ! version_compare( \Automattic\WooCommerce\Blocks\Package::get_version(), '4.4.0', '>' ) ) {
|
if ( ! class_exists( 'Automattic\WooCommerce\Blocks\Package' ) || ! version_compare( \Automattic\WooCommerce\Blocks\Package::get_version(), '4.4.0', '>' ) ) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( ! WCSG_Admin::is_gifting_enabled() ) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter the compatible blocks for WooCommerce Subscriptions.
|
* Filter the compatible blocks for WooCommerce Subscriptions.
|
||||||
* @since 7.8.2
|
* @since 7.8.2
|
||||||
|
@@ -20,18 +20,16 @@ class WCSG_Blocks_Integration implements IntegrationInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function initialize() {
|
public function initialize() {
|
||||||
$script_path = 'build/gifting-blocks-checkout.js';
|
$script_path = 'build/wcsg-blocks-integration.js';
|
||||||
$style_path = 'build/gifting-blocks-checkout.css';
|
|
||||||
|
|
||||||
$script_url = \WC_Subscriptions_Core_Plugin::instance()->get_subscriptions_core_directory_url( $script_path );
|
$script_url = \WC_Subscriptions_Core_Plugin::instance()->get_subscriptions_core_directory_url( $script_path );
|
||||||
$style_url = \WC_Subscriptions_Core_Plugin::instance()->get_subscriptions_core_directory_url( $style_path );
|
|
||||||
|
|
||||||
$script_asset_path = \WC_Subscriptions_Plugin::instance()->get_plugin_directory( 'build/gifting-blocks-checkout.asset.php' );
|
$script_asset_path = \WC_Subscriptions_Plugin::instance()->get_plugin_directory( 'build/wcsg-blocks-integration.asset.php' );
|
||||||
$script_asset = file_exists( $script_asset_path )
|
$script_asset = file_exists( $script_asset_path )
|
||||||
? require $script_asset_path
|
? require $script_asset_path
|
||||||
: array(
|
: array(
|
||||||
'dependencies' => array(),
|
'dependencies' => array(),
|
||||||
'version' => $this->get_file_version( $script_asset_path ),
|
'version' => WCS_Blocks_Integration::get_file_version( $script_asset_path ),
|
||||||
);
|
);
|
||||||
|
|
||||||
wp_register_script(
|
wp_register_script(
|
||||||
@@ -41,16 +39,6 @@ class WCSG_Blocks_Integration implements IntegrationInterface {
|
|||||||
$script_asset['version'],
|
$script_asset['version'],
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
wp_register_style(
|
|
||||||
'wcsg-blocks-integration',
|
|
||||||
$style_url,
|
|
||||||
array(),
|
|
||||||
$this->get_file_version( $style_path )
|
|
||||||
);
|
|
||||||
|
|
||||||
wp_enqueue_script( 'wcsg-blocks-integration' );
|
|
||||||
wp_enqueue_style( 'wcsg-blocks-integration' );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -92,17 +80,4 @@ class WCSG_Blocks_Integration implements IntegrationInterface {
|
|||||||
'gifting_checkbox_text' => $gifting_checkbox_text,
|
'gifting_checkbox_text' => $gifting_checkbox_text,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get the file modified time as a cache buster if we're in dev mode.
|
|
||||||
*
|
|
||||||
* @param string $file Local path to the file.
|
|
||||||
* @return string The cache buster value to use for the given file.
|
|
||||||
*/
|
|
||||||
protected function get_file_version( $file ) {
|
|
||||||
if ( defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG && file_exists( $file ) ) {
|
|
||||||
return filemtime( $file );
|
|
||||||
}
|
|
||||||
return \WC_Subscriptions_Core_Plugin::instance()->get_library_version();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@@ -97,7 +97,7 @@ class WCSG_Download_Handler {
|
|||||||
|
|
||||||
$subscription = wcs_get_subscription( $data['order_id'] );
|
$subscription = wcs_get_subscription( $data['order_id'] );
|
||||||
|
|
||||||
if ( WCS_Gifting::is_gifted_subscription( $subscription ) ) {
|
if ( $subscription && WCS_Gifting::is_gifted_subscription( $subscription ) ) {
|
||||||
|
|
||||||
$can_purchaser_download = ( 'yes' === get_option( WCSG_Admin::$option_prefix . '_downloadable_products', 'no' ) ) ? true : false;
|
$can_purchaser_download = ( 'yes' === get_option( WCSG_Admin::$option_prefix . '_downloadable_products', 'no' ) ) ? true : false;
|
||||||
|
|
||||||
|
@@ -489,15 +489,9 @@ class WCSG_Recipient_Management {
|
|||||||
*/
|
*/
|
||||||
public static function maybe_remove_recipient( $user_id ) {
|
public static function maybe_remove_recipient( $user_id ) {
|
||||||
|
|
||||||
$gifted_subscriptions = self::get_recipient_subscriptions( $user_id );
|
$gifted_items = WCS_Gifting::get_recipient_order_items( $user_id );
|
||||||
$gifted_items = WCS_Gifting::get_recipient_order_items( $user_id );
|
|
||||||
|
|
||||||
if ( ! empty( $gifted_subscriptions ) ) {
|
if ( ! empty( $gifted_items ) ) {
|
||||||
foreach ( $gifted_subscriptions as $subscription_id ) {
|
|
||||||
WCS_Gifting::set_recipient_user( $subscription, 'deleted_recipient' );
|
|
||||||
}
|
|
||||||
|
|
||||||
$recipient = get_user_by( 'id', $user_id );
|
|
||||||
$recipient_data = wp_json_encode(
|
$recipient_data = wp_json_encode(
|
||||||
array_merge(
|
array_merge(
|
||||||
array( 'display_name' => addslashes( WCS_Gifting::get_user_display_name( $user_id ) ) ),
|
array( 'display_name' => addslashes( WCS_Gifting::get_user_display_name( $user_id ) ) ),
|
||||||
|
File diff suppressed because it is too large
Load Diff
@@ -16,7 +16,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||||||
<label for="gifting_<?php echo esc_attr( $id ); ?>_option">
|
<label for="gifting_<?php echo esc_attr( $id ); ?>_option">
|
||||||
<?php echo esc_html( apply_filters( 'wcsg_enable_gifting_checkbox_label', get_option( WCSG_Admin::$option_prefix . '_gifting_checkbox_text', __( 'This is a gift', 'woocommerce-subscriptions' ) ) ) ); ?>
|
<?php echo esc_html( apply_filters( 'wcsg_enable_gifting_checkbox_label', get_option( WCSG_Admin::$option_prefix . '_gifting_checkbox_text', __( 'This is a gift', 'woocommerce-subscriptions' ) ) ) ); ?>
|
||||||
</label>
|
</label>
|
||||||
<div class="wcsg_add_recipient_fields <?php echo esc_attr( implode( ' ', $container_css_class ) ); ?>" style="<?php echo esc_attr( implode( ' ', $container_style_attributes ) ); ?>">
|
<div class="wcsg_add_recipient_fields <?php echo esc_attr( implode( ' ', $container_css_class ) ); ?>">
|
||||||
<?php echo $nonce_field; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
<?php echo $nonce_field; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
||||||
<p class="form-row form-row <?php echo esc_attr( implode( ' ', $email_field_args['class'] ) ); ?>" style="<?php echo esc_attr( implode( '; ', $email_field_args['style_attributes'] ) ); ?>">
|
<p class="form-row form-row <?php echo esc_attr( implode( ' ', $email_field_args['class'] ) ); ?>" style="<?php echo esc_attr( implode( '; ', $email_field_args['style_attributes'] ) ); ?>">
|
||||||
<input
|
<input
|
||||||
|
@@ -14,5 +14,5 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||||||
<label class="woocommerce_subscriptions_gifting_recipient_email">
|
<label class="woocommerce_subscriptions_gifting_recipient_email">
|
||||||
<?php esc_html_e( 'Recipient: ', 'woocommerce-subscriptions' ); ?>
|
<?php esc_html_e( 'Recipient: ', 'woocommerce-subscriptions' ); ?>
|
||||||
</label>
|
</label>
|
||||||
<?php echo esc_html( $email ); ?>
|
<div><?php echo esc_html( $email ); ?></div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
5
vendor/autoload.php
vendored
5
vendor/autoload.php
vendored
@@ -14,10 +14,7 @@ if (PHP_VERSION_ID < 50600) {
|
|||||||
echo $err;
|
echo $err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
trigger_error(
|
throw new RuntimeException($err);
|
||||||
$err,
|
|
||||||
E_USER_ERROR
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once __DIR__ . '/composer/autoload_real.php';
|
require_once __DIR__ . '/composer/autoload_real.php';
|
||||||
|
2
vendor/autoload_packages.php
vendored
2
vendor/autoload_packages.php
vendored
@@ -5,7 +5,7 @@
|
|||||||
* @package automattic/jetpack-autoloader
|
* @package automattic/jetpack-autoloader
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Automattic\Jetpack\Autoloader\jp32625eaf0064549a4f20b6231a37a93c\al5_0_9;
|
namespace Automattic\Jetpack\Autoloader\jp32625eaf0064549a4f20b6231a37a93c\al5_0_10;
|
||||||
|
|
||||||
// phpcs:ignore
|
// phpcs:ignore
|
||||||
|
|
||||||
|
@@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file.
|
|||||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
||||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [5.0.10] - 2025-09-15
|
||||||
|
### Changed
|
||||||
|
- Internal updates.
|
||||||
|
|
||||||
## [5.0.9] - 2025-07-28
|
## [5.0.9] - 2025-07-28
|
||||||
### Changed
|
### Changed
|
||||||
- Exclude development files from production build of the package. [#44456]
|
- Exclude development files from production build of the package. [#44456]
|
||||||
@@ -434,6 +438,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
- Add Custom Autoloader
|
- Add Custom Autoloader
|
||||||
|
|
||||||
|
[5.0.10]: https://github.com/Automattic/jetpack-autoloader/compare/v5.0.9...v5.0.10
|
||||||
[5.0.9]: https://github.com/Automattic/jetpack-autoloader/compare/v5.0.8...v5.0.9
|
[5.0.9]: https://github.com/Automattic/jetpack-autoloader/compare/v5.0.8...v5.0.9
|
||||||
[5.0.8]: https://github.com/Automattic/jetpack-autoloader/compare/v5.0.7...v5.0.8
|
[5.0.8]: https://github.com/Automattic/jetpack-autoloader/compare/v5.0.7...v5.0.8
|
||||||
[5.0.7]: https://github.com/Automattic/jetpack-autoloader/compare/v5.0.6...v5.0.7
|
[5.0.7]: https://github.com/Automattic/jetpack-autoloader/compare/v5.0.6...v5.0.7
|
||||||
|
@@ -21,7 +21,7 @@ use Composer\Util\PackageSorter;
|
|||||||
*/
|
*/
|
||||||
class AutoloadGenerator {
|
class AutoloadGenerator {
|
||||||
|
|
||||||
const VERSION = '5.0.9';
|
const VERSION = '5.0.10';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* IO object.
|
* IO object.
|
||||||
|
38
vendor/composer/InstalledVersions.php
vendored
38
vendor/composer/InstalledVersions.php
vendored
@@ -26,12 +26,23 @@ use Composer\Semver\VersionParser;
|
|||||||
*/
|
*/
|
||||||
class InstalledVersions
|
class InstalledVersions
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @var string|null if set (by reflection by Composer), this should be set to the path where this class is being copied to
|
||||||
|
* @internal
|
||||||
|
*/
|
||||||
|
private static $selfDir = null;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var mixed[]|null
|
* @var mixed[]|null
|
||||||
* @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
|
* @psalm-var array{root: array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool}, versions: array<string, array{pretty_version?: string, version?: string, reference?: string|null, type?: string, install_path?: string, aliases?: string[], dev_requirement: bool, replaced?: string[], provided?: string[]}>}|array{}|null
|
||||||
*/
|
*/
|
||||||
private static $installed;
|
private static $installed;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var bool
|
||||||
|
*/
|
||||||
|
private static $installedIsLocalDir;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var bool|null
|
* @var bool|null
|
||||||
*/
|
*/
|
||||||
@@ -309,6 +320,24 @@ class InstalledVersions
|
|||||||
{
|
{
|
||||||
self::$installed = $data;
|
self::$installed = $data;
|
||||||
self::$installedByVendor = array();
|
self::$installedByVendor = array();
|
||||||
|
|
||||||
|
// when using reload, we disable the duplicate protection to ensure that self::$installed data is
|
||||||
|
// always returned, but we cannot know whether it comes from the installed.php in __DIR__ or not,
|
||||||
|
// so we have to assume it does not, and that may result in duplicate data being returned when listing
|
||||||
|
// all installed packages for example
|
||||||
|
self::$installedIsLocalDir = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
private static function getSelfDir()
|
||||||
|
{
|
||||||
|
if (self::$selfDir === null) {
|
||||||
|
self::$selfDir = strtr(__DIR__, '\\', '/');
|
||||||
|
}
|
||||||
|
|
||||||
|
return self::$selfDir;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -325,7 +354,9 @@ class InstalledVersions
|
|||||||
$copiedLocalDir = false;
|
$copiedLocalDir = false;
|
||||||
|
|
||||||
if (self::$canGetVendors) {
|
if (self::$canGetVendors) {
|
||||||
|
$selfDir = self::getSelfDir();
|
||||||
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
|
foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
|
||||||
|
$vendorDir = strtr($vendorDir, '\\', '/');
|
||||||
if (isset(self::$installedByVendor[$vendorDir])) {
|
if (isset(self::$installedByVendor[$vendorDir])) {
|
||||||
$installed[] = self::$installedByVendor[$vendorDir];
|
$installed[] = self::$installedByVendor[$vendorDir];
|
||||||
} elseif (is_file($vendorDir.'/composer/installed.php')) {
|
} elseif (is_file($vendorDir.'/composer/installed.php')) {
|
||||||
@@ -333,11 +364,14 @@ class InstalledVersions
|
|||||||
$required = require $vendorDir.'/composer/installed.php';
|
$required = require $vendorDir.'/composer/installed.php';
|
||||||
self::$installedByVendor[$vendorDir] = $required;
|
self::$installedByVendor[$vendorDir] = $required;
|
||||||
$installed[] = $required;
|
$installed[] = $required;
|
||||||
if (strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
|
if (self::$installed === null && $vendorDir.'/composer' === $selfDir) {
|
||||||
self::$installed = $required;
|
self::$installed = $required;
|
||||||
$copiedLocalDir = true;
|
self::$installedIsLocalDir = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (self::$installedIsLocalDir && $vendorDir.'/composer' === $selfDir) {
|
||||||
|
$copiedLocalDir = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
1
vendor/composer/autoload_psr4.php
vendored
1
vendor/composer/autoload_psr4.php
vendored
@@ -7,5 +7,6 @@ $baseDir = dirname($vendorDir);
|
|||||||
|
|
||||||
return array(
|
return array(
|
||||||
'Composer\\Installers\\' => array($vendorDir . '/composer/installers/src/Composer/Installers'),
|
'Composer\\Installers\\' => array($vendorDir . '/composer/installers/src/Composer/Installers'),
|
||||||
|
'Automattic\\WooCommerce_Subscriptions\\' => array($baseDir . '/src'),
|
||||||
'Automattic\\Jetpack\\Autoloader\\' => array($vendorDir . '/automattic/jetpack-autoloader/src'),
|
'Automattic\\Jetpack\\Autoloader\\' => array($vendorDir . '/automattic/jetpack-autoloader/src'),
|
||||||
);
|
);
|
||||||
|
5
vendor/composer/autoload_static.php
vendored
5
vendor/composer/autoload_static.php
vendored
@@ -13,6 +13,7 @@ class ComposerStaticInit32625eaf0064549a4f20b6231a37a93c
|
|||||||
),
|
),
|
||||||
'A' =>
|
'A' =>
|
||||||
array (
|
array (
|
||||||
|
'Automattic\\WooCommerce_Subscriptions\\' => 37,
|
||||||
'Automattic\\Jetpack\\Autoloader\\' => 30,
|
'Automattic\\Jetpack\\Autoloader\\' => 30,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
@@ -22,6 +23,10 @@ class ComposerStaticInit32625eaf0064549a4f20b6231a37a93c
|
|||||||
array (
|
array (
|
||||||
0 => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers',
|
0 => __DIR__ . '/..' . '/composer/installers/src/Composer/Installers',
|
||||||
),
|
),
|
||||||
|
'Automattic\\WooCommerce_Subscriptions\\' =>
|
||||||
|
array (
|
||||||
|
0 => __DIR__ . '/../..' . '/src',
|
||||||
|
),
|
||||||
'Automattic\\Jetpack\\Autoloader\\' =>
|
'Automattic\\Jetpack\\Autoloader\\' =>
|
||||||
array (
|
array (
|
||||||
0 => __DIR__ . '/..' . '/automattic/jetpack-autoloader/src',
|
0 => __DIR__ . '/..' . '/automattic/jetpack-autoloader/src',
|
||||||
|
16
vendor/composer/installed.json
vendored
16
vendor/composer/installed.json
vendored
@@ -2,17 +2,17 @@
|
|||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "automattic/jetpack-autoloader",
|
"name": "automattic/jetpack-autoloader",
|
||||||
"version": "v5.0.9",
|
"version": "v5.0.10",
|
||||||
"version_normalized": "5.0.9.0",
|
"version_normalized": "5.0.10.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/Automattic/jetpack-autoloader.git",
|
"url": "https://github.com/Automattic/jetpack-autoloader.git",
|
||||||
"reference": "c9e9b82cc515d9ed093fa0ff21245f277aeceb4e"
|
"reference": "f7e2142139b925fac0a167ed0cbc71e2592bd9a0"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/Automattic/jetpack-autoloader/zipball/c9e9b82cc515d9ed093fa0ff21245f277aeceb4e",
|
"url": "https://api.github.com/repos/Automattic/jetpack-autoloader/zipball/f7e2142139b925fac0a167ed0cbc71e2592bd9a0",
|
||||||
"reference": "c9e9b82cc515d9ed093fa0ff21245f277aeceb4e",
|
"reference": "f7e2142139b925fac0a167ed0cbc71e2592bd9a0",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -20,12 +20,12 @@
|
|||||||
"php": ">=7.2"
|
"php": ">=7.2"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"automattic/jetpack-changelogger": "^6.0.5",
|
"automattic/jetpack-changelogger": "^6.0.7",
|
||||||
"automattic/phpunit-select-config": "^1.0.3",
|
"automattic/phpunit-select-config": "^1.0.3",
|
||||||
"composer/composer": "^2.2",
|
"composer/composer": "^2.2",
|
||||||
"yoast/phpunit-polyfills": "^4.0.0"
|
"yoast/phpunit-polyfills": "^4.0.0"
|
||||||
},
|
},
|
||||||
"time": "2025-07-28T19:49:50+00:00",
|
"time": "2025-09-15T14:36:53+00:00",
|
||||||
"type": "composer-plugin",
|
"type": "composer-plugin",
|
||||||
"extra": {
|
"extra": {
|
||||||
"class": "Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin",
|
"class": "Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin",
|
||||||
@@ -64,7 +64,7 @@
|
|||||||
"wordpress"
|
"wordpress"
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/Automattic/jetpack-autoloader/tree/v5.0.9"
|
"source": "https://github.com/Automattic/jetpack-autoloader/tree/v5.0.10"
|
||||||
},
|
},
|
||||||
"install-path": "../automattic/jetpack-autoloader"
|
"install-path": "../automattic/jetpack-autoloader"
|
||||||
},
|
},
|
||||||
|
18
vendor/composer/installed.php
vendored
18
vendor/composer/installed.php
vendored
@@ -1,9 +1,9 @@
|
|||||||
<?php return array(
|
<?php return array(
|
||||||
'root' => array(
|
'root' => array(
|
||||||
'name' => 'woocommerce/woocommerce-subscriptions',
|
'name' => 'woocommerce/woocommerce-subscriptions',
|
||||||
'pretty_version' => 'dev-release/7.8.2',
|
'pretty_version' => 'dev-release/7.9.0',
|
||||||
'version' => 'dev-release/7.8.2',
|
'version' => 'dev-release/7.9.0',
|
||||||
'reference' => '07e1321a082f8114c8b480d9ae8d7f1f4eb56922',
|
'reference' => '9114ff6422e5a37b9ccca8c6954172b07ffd9cae',
|
||||||
'type' => 'wordpress-plugin',
|
'type' => 'wordpress-plugin',
|
||||||
'install_path' => __DIR__ . '/../../',
|
'install_path' => __DIR__ . '/../../',
|
||||||
'aliases' => array(),
|
'aliases' => array(),
|
||||||
@@ -11,9 +11,9 @@
|
|||||||
),
|
),
|
||||||
'versions' => array(
|
'versions' => array(
|
||||||
'automattic/jetpack-autoloader' => array(
|
'automattic/jetpack-autoloader' => array(
|
||||||
'pretty_version' => 'v5.0.9',
|
'pretty_version' => 'v5.0.10',
|
||||||
'version' => '5.0.9.0',
|
'version' => '5.0.10.0',
|
||||||
'reference' => 'c9e9b82cc515d9ed093fa0ff21245f277aeceb4e',
|
'reference' => 'f7e2142139b925fac0a167ed0cbc71e2592bd9a0',
|
||||||
'type' => 'composer-plugin',
|
'type' => 'composer-plugin',
|
||||||
'install_path' => __DIR__ . '/../automattic/jetpack-autoloader',
|
'install_path' => __DIR__ . '/../automattic/jetpack-autoloader',
|
||||||
'aliases' => array(),
|
'aliases' => array(),
|
||||||
@@ -29,9 +29,9 @@
|
|||||||
'dev_requirement' => false,
|
'dev_requirement' => false,
|
||||||
),
|
),
|
||||||
'woocommerce/woocommerce-subscriptions' => array(
|
'woocommerce/woocommerce-subscriptions' => array(
|
||||||
'pretty_version' => 'dev-release/7.8.2',
|
'pretty_version' => 'dev-release/7.9.0',
|
||||||
'version' => 'dev-release/7.8.2',
|
'version' => 'dev-release/7.9.0',
|
||||||
'reference' => '07e1321a082f8114c8b480d9ae8d7f1f4eb56922',
|
'reference' => '9114ff6422e5a37b9ccca8c6954172b07ffd9cae',
|
||||||
'type' => 'wordpress-plugin',
|
'type' => 'wordpress-plugin',
|
||||||
'install_path' => __DIR__ . '/../../',
|
'install_path' => __DIR__ . '/../../',
|
||||||
'aliases' => array(),
|
'aliases' => array(),
|
||||||
|
86
vendor/composer/jetpack_autoload_classmap.php
vendored
86
vendor/composer/jetpack_autoload_classmap.php
vendored
@@ -7,35 +7,35 @@ $baseDir = dirname($vendorDir);
|
|||||||
|
|
||||||
return array(
|
return array(
|
||||||
'Autoloader' => array(
|
'Autoloader' => array(
|
||||||
'version' => '5.0.9',
|
'version' => '5.0.10',
|
||||||
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-autoloader.php'
|
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-autoloader.php'
|
||||||
),
|
),
|
||||||
'Autoloader_Handler' => array(
|
'Autoloader_Handler' => array(
|
||||||
'version' => '5.0.9',
|
'version' => '5.0.10',
|
||||||
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-autoloader-handler.php'
|
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-autoloader-handler.php'
|
||||||
),
|
),
|
||||||
'Autoloader_Locator' => array(
|
'Autoloader_Locator' => array(
|
||||||
'version' => '5.0.9',
|
'version' => '5.0.10',
|
||||||
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-autoloader-locator.php'
|
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-autoloader-locator.php'
|
||||||
),
|
),
|
||||||
'Automattic\\Jetpack\\Autoloader\\AutoloadFileWriter' => array(
|
'Automattic\\Jetpack\\Autoloader\\AutoloadFileWriter' => array(
|
||||||
'version' => '5.0.9',
|
'version' => '5.0.10',
|
||||||
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadFileWriter.php'
|
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadFileWriter.php'
|
||||||
),
|
),
|
||||||
'Automattic\\Jetpack\\Autoloader\\AutoloadGenerator' => array(
|
'Automattic\\Jetpack\\Autoloader\\AutoloadGenerator' => array(
|
||||||
'version' => '5.0.9',
|
'version' => '5.0.10',
|
||||||
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadGenerator.php'
|
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadGenerator.php'
|
||||||
),
|
),
|
||||||
'Automattic\\Jetpack\\Autoloader\\AutoloadProcessor' => array(
|
'Automattic\\Jetpack\\Autoloader\\AutoloadProcessor' => array(
|
||||||
'version' => '5.0.9',
|
'version' => '5.0.10',
|
||||||
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadProcessor.php'
|
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/AutoloadProcessor.php'
|
||||||
),
|
),
|
||||||
'Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin' => array(
|
'Automattic\\Jetpack\\Autoloader\\CustomAutoloaderPlugin' => array(
|
||||||
'version' => '5.0.9',
|
'version' => '5.0.10',
|
||||||
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/CustomAutoloaderPlugin.php'
|
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/CustomAutoloaderPlugin.php'
|
||||||
),
|
),
|
||||||
'Automattic\\Jetpack\\Autoloader\\ManifestGenerator' => array(
|
'Automattic\\Jetpack\\Autoloader\\ManifestGenerator' => array(
|
||||||
'version' => '5.0.9',
|
'version' => '5.0.10',
|
||||||
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/ManifestGenerator.php'
|
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/ManifestGenerator.php'
|
||||||
),
|
),
|
||||||
'Composer\\Installers\\AglInstaller' => array(
|
'Composer\\Installers\\AglInstaller' => array(
|
||||||
@@ -435,143 +435,143 @@ return array(
|
|||||||
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/ZikulaInstaller.php'
|
'path' => $vendorDir . '/composer/installers/src/Composer/Installers/ZikulaInstaller.php'
|
||||||
),
|
),
|
||||||
'Container' => array(
|
'Container' => array(
|
||||||
'version' => '5.0.9',
|
'version' => '5.0.10',
|
||||||
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-container.php'
|
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-container.php'
|
||||||
),
|
),
|
||||||
'Hook_Manager' => array(
|
'Hook_Manager' => array(
|
||||||
'version' => '5.0.9',
|
'version' => '5.0.10',
|
||||||
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-hook-manager.php'
|
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-hook-manager.php'
|
||||||
),
|
),
|
||||||
'Latest_Autoloader_Guard' => array(
|
'Latest_Autoloader_Guard' => array(
|
||||||
'version' => '5.0.9',
|
'version' => '5.0.10',
|
||||||
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-latest-autoloader-guard.php'
|
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-latest-autoloader-guard.php'
|
||||||
),
|
),
|
||||||
'Manifest_Reader' => array(
|
'Manifest_Reader' => array(
|
||||||
'version' => '5.0.9',
|
'version' => '5.0.10',
|
||||||
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-manifest-reader.php'
|
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-manifest-reader.php'
|
||||||
),
|
),
|
||||||
'PHP_Autoloader' => array(
|
'PHP_Autoloader' => array(
|
||||||
'version' => '5.0.9',
|
'version' => '5.0.10',
|
||||||
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-php-autoloader.php'
|
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-php-autoloader.php'
|
||||||
),
|
),
|
||||||
'Path_Processor' => array(
|
'Path_Processor' => array(
|
||||||
'version' => '5.0.9',
|
'version' => '5.0.10',
|
||||||
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-path-processor.php'
|
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-path-processor.php'
|
||||||
),
|
),
|
||||||
'Plugin_Locator' => array(
|
'Plugin_Locator' => array(
|
||||||
'version' => '5.0.9',
|
'version' => '5.0.10',
|
||||||
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-plugin-locator.php'
|
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-plugin-locator.php'
|
||||||
),
|
),
|
||||||
'Plugins_Handler' => array(
|
'Plugins_Handler' => array(
|
||||||
'version' => '5.0.9',
|
'version' => '5.0.10',
|
||||||
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-plugins-handler.php'
|
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-plugins-handler.php'
|
||||||
),
|
),
|
||||||
'Shutdown_Handler' => array(
|
'Shutdown_Handler' => array(
|
||||||
'version' => '5.0.9',
|
'version' => '5.0.10',
|
||||||
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-shutdown-handler.php'
|
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-shutdown-handler.php'
|
||||||
),
|
),
|
||||||
'Version_Loader' => array(
|
'Version_Loader' => array(
|
||||||
'version' => '5.0.9',
|
'version' => '5.0.10',
|
||||||
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-version-loader.php'
|
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-version-loader.php'
|
||||||
),
|
),
|
||||||
'Version_Selector' => array(
|
'Version_Selector' => array(
|
||||||
'version' => '5.0.9',
|
'version' => '5.0.10',
|
||||||
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-version-selector.php'
|
'path' => $vendorDir . '/automattic/jetpack-autoloader/src/class-version-selector.php'
|
||||||
),
|
),
|
||||||
'WCSG_Admin' => array(
|
'WCSG_Admin' => array(
|
||||||
'version' => 'dev-release/7.8.2',
|
'version' => 'dev-release/7.9.0',
|
||||||
'path' => $baseDir . '/includes/gifting/class-wcsg-admin.php'
|
'path' => $baseDir . '/includes/gifting/class-wcsg-admin.php'
|
||||||
),
|
),
|
||||||
'WCSG_Admin_Order' => array(
|
'WCSG_Admin_Order' => array(
|
||||||
'version' => 'dev-release/7.8.2',
|
'version' => 'dev-release/7.9.0',
|
||||||
'path' => $baseDir . '/includes/gifting/admin/class-wcsg-admin-order.php'
|
'path' => $baseDir . '/includes/gifting/admin/class-wcsg-admin-order.php'
|
||||||
),
|
),
|
||||||
'WCSG_Admin_System_Status' => array(
|
'WCSG_Admin_System_Status' => array(
|
||||||
'version' => 'dev-release/7.8.2',
|
'version' => 'dev-release/7.9.0',
|
||||||
'path' => $baseDir . '/includes/gifting/class-wcsg-admin-system-status.php'
|
'path' => $baseDir . '/includes/gifting/class-wcsg-admin-system-status.php'
|
||||||
),
|
),
|
||||||
'WCSG_Admin_Welcome_Announcement' => array(
|
'WCSG_Admin_Welcome_Announcement' => array(
|
||||||
'version' => 'dev-release/7.8.2',
|
'version' => 'dev-release/7.9.0',
|
||||||
'path' => $baseDir . '/includes/gifting/class-wcsg-admin-welcome-announcement.php'
|
'path' => $baseDir . '/includes/gifting/class-wcsg-admin-welcome-announcement.php'
|
||||||
),
|
),
|
||||||
'WCSG_Blocks_Integration' => array(
|
'WCSG_Blocks_Integration' => array(
|
||||||
'version' => 'dev-release/7.8.2',
|
'version' => 'dev-release/7.9.0',
|
||||||
'path' => $baseDir . '/includes/gifting/class-wcsg-blocks-integration.php'
|
'path' => $baseDir . '/includes/gifting/class-wcsg-blocks-integration.php'
|
||||||
),
|
),
|
||||||
'WCSG_Cart' => array(
|
'WCSG_Cart' => array(
|
||||||
'version' => 'dev-release/7.8.2',
|
'version' => 'dev-release/7.9.0',
|
||||||
'path' => $baseDir . '/includes/gifting/class-wcsg-cart.php'
|
'path' => $baseDir . '/includes/gifting/class-wcsg-cart.php'
|
||||||
),
|
),
|
||||||
'WCSG_Checkout' => array(
|
'WCSG_Checkout' => array(
|
||||||
'version' => 'dev-release/7.8.2',
|
'version' => 'dev-release/7.9.0',
|
||||||
'path' => $baseDir . '/includes/gifting/class-wcsg-checkout.php'
|
'path' => $baseDir . '/includes/gifting/class-wcsg-checkout.php'
|
||||||
),
|
),
|
||||||
'WCSG_Download_Handler' => array(
|
'WCSG_Download_Handler' => array(
|
||||||
'version' => 'dev-release/7.8.2',
|
'version' => 'dev-release/7.9.0',
|
||||||
'path' => $baseDir . '/includes/gifting/class-wcsg-download-handler.php'
|
'path' => $baseDir . '/includes/gifting/class-wcsg-download-handler.php'
|
||||||
),
|
),
|
||||||
'WCSG_Email' => array(
|
'WCSG_Email' => array(
|
||||||
'version' => 'dev-release/7.8.2',
|
'version' => 'dev-release/7.9.0',
|
||||||
'path' => $baseDir . '/includes/gifting/class-wcsg-email.php'
|
'path' => $baseDir . '/includes/gifting/class-wcsg-email.php'
|
||||||
),
|
),
|
||||||
'WCSG_Email_Completed_Renewal_Order' => array(
|
'WCSG_Email_Completed_Renewal_Order' => array(
|
||||||
'version' => 'dev-release/7.8.2',
|
'version' => 'dev-release/7.9.0',
|
||||||
'path' => $baseDir . '/includes/gifting/emails/class-wcsg-email-completed-renewal-order.php'
|
'path' => $baseDir . '/includes/gifting/emails/class-wcsg-email-completed-renewal-order.php'
|
||||||
),
|
),
|
||||||
'WCSG_Email_Customer_New_Account' => array(
|
'WCSG_Email_Customer_New_Account' => array(
|
||||||
'version' => 'dev-release/7.8.2',
|
'version' => 'dev-release/7.9.0',
|
||||||
'path' => $baseDir . '/includes/gifting/emails/class-wcsg-email-customer-new-account.php'
|
'path' => $baseDir . '/includes/gifting/emails/class-wcsg-email-customer-new-account.php'
|
||||||
),
|
),
|
||||||
'WCSG_Email_Processing_Renewal_Order' => array(
|
'WCSG_Email_Processing_Renewal_Order' => array(
|
||||||
'version' => 'dev-release/7.8.2',
|
'version' => 'dev-release/7.9.0',
|
||||||
'path' => $baseDir . '/includes/gifting/emails/class-wcsg-email-processing-renewal-order.php'
|
'path' => $baseDir . '/includes/gifting/emails/class-wcsg-email-processing-renewal-order.php'
|
||||||
),
|
),
|
||||||
'WCSG_Email_Recipient_New_Initial_Order' => array(
|
'WCSG_Email_Recipient_New_Initial_Order' => array(
|
||||||
'version' => 'dev-release/7.8.2',
|
'version' => 'dev-release/7.9.0',
|
||||||
'path' => $baseDir . '/includes/gifting/emails/class-wcsg-email-recipient-new-initial-order.php'
|
'path' => $baseDir . '/includes/gifting/emails/class-wcsg-email-recipient-new-initial-order.php'
|
||||||
),
|
),
|
||||||
'WCSG_Memberships_Integration' => array(
|
'WCSG_Memberships_Integration' => array(
|
||||||
'version' => 'dev-release/7.8.2',
|
'version' => 'dev-release/7.9.0',
|
||||||
'path' => $baseDir . '/includes/gifting/class-wcsg-memberships-integration.php'
|
'path' => $baseDir . '/includes/gifting/class-wcsg-memberships-integration.php'
|
||||||
),
|
),
|
||||||
'WCSG_Privacy' => array(
|
'WCSG_Privacy' => array(
|
||||||
'version' => 'dev-release/7.8.2',
|
'version' => 'dev-release/7.9.0',
|
||||||
'path' => $baseDir . '/includes/gifting/privacy/class-wcsg-privacy.php'
|
'path' => $baseDir . '/includes/gifting/privacy/class-wcsg-privacy.php'
|
||||||
),
|
),
|
||||||
'WCSG_Privacy_Erasers' => array(
|
'WCSG_Privacy_Erasers' => array(
|
||||||
'version' => 'dev-release/7.8.2',
|
'version' => 'dev-release/7.9.0',
|
||||||
'path' => $baseDir . '/includes/gifting/privacy/class-wcsg-privacy-erasers.php'
|
'path' => $baseDir . '/includes/gifting/privacy/class-wcsg-privacy-erasers.php'
|
||||||
),
|
),
|
||||||
'WCSG_Privacy_Exporters' => array(
|
'WCSG_Privacy_Exporters' => array(
|
||||||
'version' => 'dev-release/7.8.2',
|
'version' => 'dev-release/7.9.0',
|
||||||
'path' => $baseDir . '/includes/gifting/privacy/class-wcsg-privacy-exporters.php'
|
'path' => $baseDir . '/includes/gifting/privacy/class-wcsg-privacy-exporters.php'
|
||||||
),
|
),
|
||||||
'WCSG_Product' => array(
|
'WCSG_Product' => array(
|
||||||
'version' => 'dev-release/7.8.2',
|
'version' => 'dev-release/7.9.0',
|
||||||
'path' => $baseDir . '/includes/gifting/class-wcsg-product.php'
|
'path' => $baseDir . '/includes/gifting/class-wcsg-product.php'
|
||||||
),
|
),
|
||||||
'WCSG_Query' => array(
|
'WCSG_Query' => array(
|
||||||
'version' => 'dev-release/7.8.2',
|
'version' => 'dev-release/7.9.0',
|
||||||
'path' => $baseDir . '/includes/gifting/class-wcsg-query.php'
|
'path' => $baseDir . '/includes/gifting/class-wcsg-query.php'
|
||||||
),
|
),
|
||||||
'WCSG_Recipient_Addresses' => array(
|
'WCSG_Recipient_Addresses' => array(
|
||||||
'version' => 'dev-release/7.8.2',
|
'version' => 'dev-release/7.9.0',
|
||||||
'path' => $baseDir . '/includes/gifting/class-wcsg-recipient-addresses.php'
|
'path' => $baseDir . '/includes/gifting/class-wcsg-recipient-addresses.php'
|
||||||
),
|
),
|
||||||
'WCSG_Recipient_Details' => array(
|
'WCSG_Recipient_Details' => array(
|
||||||
'version' => 'dev-release/7.8.2',
|
'version' => 'dev-release/7.9.0',
|
||||||
'path' => $baseDir . '/includes/gifting/class-wcsg-recipient-details.php'
|
'path' => $baseDir . '/includes/gifting/class-wcsg-recipient-details.php'
|
||||||
),
|
),
|
||||||
'WCSG_Recipient_Management' => array(
|
'WCSG_Recipient_Management' => array(
|
||||||
'version' => 'dev-release/7.8.2',
|
'version' => 'dev-release/7.9.0',
|
||||||
'path' => $baseDir . '/includes/gifting/class-wcsg-recipient-management.php'
|
'path' => $baseDir . '/includes/gifting/class-wcsg-recipient-management.php'
|
||||||
),
|
),
|
||||||
'WCSG_Template_Loader' => array(
|
'WCSG_Template_Loader' => array(
|
||||||
'version' => 'dev-release/7.8.2',
|
'version' => 'dev-release/7.9.0',
|
||||||
'path' => $baseDir . '/includes/gifting/class-wcsg-template-loader.php'
|
'path' => $baseDir . '/includes/gifting/class-wcsg-template-loader.php'
|
||||||
),
|
),
|
||||||
'WCS_Gifting' => array(
|
'WCS_Gifting' => array(
|
||||||
'version' => 'dev-release/7.8.2',
|
'version' => 'dev-release/7.9.0',
|
||||||
'path' => $baseDir . '/includes/gifting/class-wcs-gifting.php'
|
'path' => $baseDir . '/includes/gifting/class-wcs-gifting.php'
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
5
vendor/composer/platform_check.php
vendored
5
vendor/composer/platform_check.php
vendored
@@ -19,8 +19,7 @@ if ($issues) {
|
|||||||
echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
|
echo 'Composer detected issues in your platform:' . PHP_EOL.PHP_EOL . str_replace('You are running '.PHP_VERSION.'.', '', implode(PHP_EOL, $issues)) . PHP_EOL.PHP_EOL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
trigger_error(
|
throw new \RuntimeException(
|
||||||
'Composer detected issues in your platform: ' . implode(' ', $issues),
|
'Composer detected issues in your platform: ' . implode(' ', $issues)
|
||||||
E_USER_ERROR
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package automattic/jetpack-autoloader
|
* @package automattic/jetpack-autoloader
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Automattic\Jetpack\Autoloader\jp32625eaf0064549a4f20b6231a37a93c\al5_0_9;
|
namespace Automattic\Jetpack\Autoloader\jp32625eaf0064549a4f20b6231a37a93c\al5_0_10;
|
||||||
|
|
||||||
// phpcs:ignore
|
// phpcs:ignore
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package automattic/jetpack-autoloader
|
* @package automattic/jetpack-autoloader
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Automattic\Jetpack\Autoloader\jp32625eaf0064549a4f20b6231a37a93c\al5_0_9;
|
namespace Automattic\Jetpack\Autoloader\jp32625eaf0064549a4f20b6231a37a93c\al5_0_10;
|
||||||
|
|
||||||
// phpcs:ignore
|
// phpcs:ignore
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package automattic/jetpack-autoloader
|
* @package automattic/jetpack-autoloader
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Automattic\Jetpack\Autoloader\jp32625eaf0064549a4f20b6231a37a93c\al5_0_9;
|
namespace Automattic\Jetpack\Autoloader\jp32625eaf0064549a4f20b6231a37a93c\al5_0_10;
|
||||||
|
|
||||||
// phpcs:ignore
|
// phpcs:ignore
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package automattic/jetpack-autoloader
|
* @package automattic/jetpack-autoloader
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Automattic\Jetpack\Autoloader\jp32625eaf0064549a4f20b6231a37a93c\al5_0_9;
|
namespace Automattic\Jetpack\Autoloader\jp32625eaf0064549a4f20b6231a37a93c\al5_0_10;
|
||||||
|
|
||||||
// phpcs:ignore
|
// phpcs:ignore
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package automattic/jetpack-autoloader
|
* @package automattic/jetpack-autoloader
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Automattic\Jetpack\Autoloader\jp32625eaf0064549a4f20b6231a37a93c\al5_0_9;
|
namespace Automattic\Jetpack\Autoloader\jp32625eaf0064549a4f20b6231a37a93c\al5_0_10;
|
||||||
|
|
||||||
// phpcs:ignore
|
// phpcs:ignore
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package automattic/jetpack-autoloader
|
* @package automattic/jetpack-autoloader
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Automattic\Jetpack\Autoloader\jp32625eaf0064549a4f20b6231a37a93c\al5_0_9;
|
namespace Automattic\Jetpack\Autoloader\jp32625eaf0064549a4f20b6231a37a93c\al5_0_10;
|
||||||
|
|
||||||
// phpcs:ignore
|
// phpcs:ignore
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package automattic/jetpack-autoloader
|
* @package automattic/jetpack-autoloader
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Automattic\Jetpack\Autoloader\jp32625eaf0064549a4f20b6231a37a93c\al5_0_9;
|
namespace Automattic\Jetpack\Autoloader\jp32625eaf0064549a4f20b6231a37a93c\al5_0_10;
|
||||||
|
|
||||||
// phpcs:ignore
|
// phpcs:ignore
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package automattic/jetpack-autoloader
|
* @package automattic/jetpack-autoloader
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Automattic\Jetpack\Autoloader\jp32625eaf0064549a4f20b6231a37a93c\al5_0_9;
|
namespace Automattic\Jetpack\Autoloader\jp32625eaf0064549a4f20b6231a37a93c\al5_0_10;
|
||||||
|
|
||||||
// phpcs:ignore
|
// phpcs:ignore
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package automattic/jetpack-autoloader
|
* @package automattic/jetpack-autoloader
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Automattic\Jetpack\Autoloader\jp32625eaf0064549a4f20b6231a37a93c\al5_0_9;
|
namespace Automattic\Jetpack\Autoloader\jp32625eaf0064549a4f20b6231a37a93c\al5_0_10;
|
||||||
|
|
||||||
// phpcs:ignore
|
// phpcs:ignore
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package automattic/jetpack-autoloader
|
* @package automattic/jetpack-autoloader
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Automattic\Jetpack\Autoloader\jp32625eaf0064549a4f20b6231a37a93c\al5_0_9;
|
namespace Automattic\Jetpack\Autoloader\jp32625eaf0064549a4f20b6231a37a93c\al5_0_10;
|
||||||
|
|
||||||
// phpcs:ignore
|
// phpcs:ignore
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package automattic/jetpack-autoloader
|
* @package automattic/jetpack-autoloader
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Automattic\Jetpack\Autoloader\jp32625eaf0064549a4f20b6231a37a93c\al5_0_9;
|
namespace Automattic\Jetpack\Autoloader\jp32625eaf0064549a4f20b6231a37a93c\al5_0_10;
|
||||||
|
|
||||||
// phpcs:ignore
|
// phpcs:ignore
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package automattic/jetpack-autoloader
|
* @package automattic/jetpack-autoloader
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Automattic\Jetpack\Autoloader\jp32625eaf0064549a4f20b6231a37a93c\al5_0_9;
|
namespace Automattic\Jetpack\Autoloader\jp32625eaf0064549a4f20b6231a37a93c\al5_0_10;
|
||||||
|
|
||||||
// phpcs:ignore
|
// phpcs:ignore
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package automattic/jetpack-autoloader
|
* @package automattic/jetpack-autoloader
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Automattic\Jetpack\Autoloader\jp32625eaf0064549a4f20b6231a37a93c\al5_0_9;
|
namespace Automattic\Jetpack\Autoloader\jp32625eaf0064549a4f20b6231a37a93c\al5_0_10;
|
||||||
|
|
||||||
// phpcs:ignore
|
// phpcs:ignore
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
* @package automattic/jetpack-autoloader
|
* @package automattic/jetpack-autoloader
|
||||||
*/
|
*/
|
||||||
|
|
||||||
namespace Automattic\Jetpack\Autoloader\jp32625eaf0064549a4f20b6231a37a93c\al5_0_9;
|
namespace Automattic\Jetpack\Autoloader\jp32625eaf0064549a4f20b6231a37a93c\al5_0_10;
|
||||||
|
|
||||||
// phpcs:ignore
|
// phpcs:ignore
|
||||||
|
|
||||||
|
@@ -5,11 +5,11 @@
|
|||||||
* Description: Sell products and services with recurring payments in your WooCommerce Store.
|
* Description: Sell products and services with recurring payments in your WooCommerce Store.
|
||||||
* Author: WooCommerce
|
* Author: WooCommerce
|
||||||
* Author URI: https://woocommerce.com/
|
* Author URI: https://woocommerce.com/
|
||||||
* Version: 7.8.2
|
* Version: 7.9.0
|
||||||
* Requires Plugins: woocommerce
|
* Requires Plugins: woocommerce
|
||||||
*
|
*
|
||||||
* WC requires at least: 9.8.5
|
* WC requires at least: 10.0.0
|
||||||
* WC tested up to: 9.9.5
|
* WC tested up to: 10.2.0
|
||||||
*
|
*
|
||||||
* License: GNU General Public License v3.0
|
* License: GNU General Public License v3.0
|
||||||
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
||||||
@@ -74,7 +74,7 @@ class WC_Subscriptions {
|
|||||||
public static $plugin_file = __FILE__;
|
public static $plugin_file = __FILE__;
|
||||||
|
|
||||||
/** @var string */
|
/** @var string */
|
||||||
public static $version = '7.8.2'; // WRCS: DEFINED_VERSION.
|
public static $version = '7.9.0'; // WRCS: DEFINED_VERSION.
|
||||||
|
|
||||||
/** @var string */
|
/** @var string */
|
||||||
public static $wc_minimum_supported_version = '7.7';
|
public static $wc_minimum_supported_version = '7.7';
|
||||||
|
Reference in New Issue
Block a user