2.2.21


0
assets/css/about.css
Normal file → Executable file
0
assets/css/admin.css
Normal file → Executable file
0
assets/css/checkout.css
Normal file → Executable file
0
assets/css/dashboard.css
Normal file → Executable file
0
assets/css/view-subscription.css
Normal file → Executable file
0
assets/css/wcs-upgrade.css
Normal file → Executable file
BIN
assets/images/add-edit-subscription-screen.png
Executable file
After Width: | Height: | Size: 39 KiB |
BIN
assets/images/admin-change-payment-method.jpg
Executable file
After Width: | Height: | Size: 58 KiB |
0
assets/images/ajax-loader.gif
Normal file → Executable file
Before Width: | Height: | Size: 885 B After Width: | Height: | Size: 885 B |
0
assets/images/ajax-loader@2x.gif
Normal file → Executable file
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
BIN
assets/images/billing-schedules-meta-box.png
Executable file
After Width: | Height: | Size: 38 KiB |
BIN
assets/images/checkout-recurring-totals.png
Executable file
After Width: | Height: | Size: 67 KiB |
BIN
assets/images/drip-downloadable-content.jpg
Executable file
After Width: | Height: | Size: 69 KiB |
BIN
assets/images/gift-subscription.png
Executable file
After Width: | Height: | Size: 122 KiB |
BIN
assets/images/renewal-retry-settings.png
Executable file
After Width: | Height: | Size: 109 KiB |
BIN
assets/images/subscribe-all-the-things.png
Executable file
After Width: | Height: | Size: 82 KiB |
BIN
assets/images/subscription-reports.png
Executable file
After Width: | Height: | Size: 133 KiB |
BIN
assets/images/subscription-suspended-email.jpg
Executable file
After Width: | Height: | Size: 172 KiB |
BIN
assets/images/subscriptions-importer-exporter.png
Executable file
After Width: | Height: | Size: 90 KiB |
BIN
assets/images/view-subscription.png
Executable file
After Width: | Height: | Size: 250 KiB |
0
assets/images/woocommerce_subscriptions_logo.png
Normal file → Executable file
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
0
assets/js/admin/admin-pointers.js
Normal file → Executable file
0
assets/js/admin/admin.js
Normal file → Executable file
0
assets/js/admin/jquery.flot.axislabels.js
Normal file → Executable file
0
assets/js/admin/jquery.flot.axislabels.min.js
vendored
Normal file → Executable file
0
assets/js/admin/jquery.flot.orderBars.js
Normal file → Executable file
0
assets/js/admin/jquery.flot.orderBars.min.js
vendored
Normal file → Executable file
0
assets/js/admin/jstz.js
Normal file → Executable file
0
assets/js/admin/jstz.min.js
vendored
Normal file → Executable file
0
assets/js/admin/meta-boxes-subscription.js
Normal file → Executable file
0
assets/js/admin/moment.js
Normal file → Executable file
0
assets/js/admin/moment.min.js
vendored
Normal file → Executable file
0
assets/js/admin/reports.js
Normal file → Executable file
0
assets/js/admin/wcs-meta-boxes-order.js
Normal file → Executable file
0
assets/js/wcs-upgrade.js
Normal file → Executable file
14
changelog.txt
Normal file → Executable file
@@ -1,5 +1,19 @@
|
||||
*** WooCommerce Subscriptions Changelog ***
|
||||
|
||||
2018.05.29 - version 2.2.21
|
||||
* Tweak: Update WooCommerce tested up to compatibility flag.
|
||||
* Fix: [GDPR] While processing erasure requests anonymise all user subscriptions with any status. PR#2720
|
||||
* Fix: Fix PHP warnings which appear on the WooCommerce > Settings > Accounts & Privacy page and while exporting user personal data. PR#2719
|
||||
|
||||
2018.05.25 - version 2.2.20
|
||||
* New: [GDPR] Export and erase subscription personal data when processing user export and erasure requests. PR#2692
|
||||
* New: [GDPR] Add an automatic data removal system for ended subscriptions and their related orders. PR#2702
|
||||
* New: [GDPR] Add details about the personal data the plugin collects to the privacy policy guide. PR#2700
|
||||
* Tweak: Reorder wcs_get_subscriptions_for_order logic to be more performance friendly. PR#2697
|
||||
* Tweak: Replace remote image sources with an internal asset. PR#2690
|
||||
* Fix: [WC3.4] Prevent subscription related orders from being trashed/anonymised by WC's automatic clean up system. PR#2698
|
||||
* Fix: [WC3.4] Only trigger the woocommerce_before_add_to_cart_button action hook once on variable subscription single product pages. PR#2706
|
||||
|
||||
2018.04.04 - version 2.2.19
|
||||
* Fix: With Mixed Checkout disabled, only remove the add to cart notice when redirected straight to checkout. Fixes issue where error notices are removed incorrectly. PR#2541
|
||||
* Fix: With Mixed Checkout disabled, only empty cart when the variation ID is the same but with different attributes. PR#2540
|
||||
|
0
composer.lock
generated
Normal file → Executable file
0
includes/abstracts/abstract-wcs-cache-manager.php
Normal file → Executable file
0
includes/abstracts/abstract-wcs-dynamic-hook-deprecator.php
Normal file → Executable file
0
includes/abstracts/abstract-wcs-hook-deprecator.php
Normal file → Executable file
0
includes/abstracts/abstract-wcs-retry-store.php
Normal file → Executable file
0
includes/abstracts/abstract-wcs-scheduler.php
Normal file → Executable file
30
includes/admin/class-wc-subscriptions-admin.php
Normal file → Executable file
@@ -1724,6 +1724,36 @@ class WC_Subscriptions_Admin {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Insert a setting or an array of settings after another specific setting by its ID.
|
||||
*
|
||||
* @since 2.2.20
|
||||
* @param array $settings The original list of settings.
|
||||
* @param string $insert_after_setting_id The setting id to insert the new setting after.
|
||||
* @param array $new_setting The new setting to insert. Can be a single setting or an array of settings.
|
||||
* @param string $insert_type The type of insert to perform. Can be 'single_setting' or 'multiple_settings'. Optional. Defaults to a single setting insert.
|
||||
*/
|
||||
public static function insert_setting_after( &$settings, $insert_after_setting_id, $new_setting, $insert_type = 'single_setting' ) {
|
||||
if ( ! is_array( $settings ) ) {
|
||||
return;
|
||||
}
|
||||
|
||||
$original_settings = $settings;
|
||||
$settings = array();
|
||||
|
||||
foreach ( $original_settings as $setting ) {
|
||||
$settings[] = $setting;
|
||||
|
||||
if ( isset( $setting['id'] ) && $insert_after_setting_id === $setting['id'] ) {
|
||||
if ( 'single_setting' === $insert_type ) {
|
||||
$settings[] = $new_setting;
|
||||
} else {
|
||||
$settings = array_merge( $settings, $new_setting );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Outputs the contents of the "Renewal Orders" meta box.
|
||||
*
|
||||
|
0
includes/admin/class-wcs-admin-meta-boxes.php
Normal file → Executable file
0
includes/admin/class-wcs-admin-post-types.php
Normal file → Executable file
0
includes/admin/class-wcs-admin-reports.php
Normal file → Executable file
0
includes/admin/meta-boxes/class-wcs-meta-box-payment-retries.php
Normal file → Executable file
0
includes/admin/meta-boxes/class-wcs-meta-box-related-orders.php
Normal file → Executable file
0
includes/admin/meta-boxes/class-wcs-meta-box-subscription-data.php
Normal file → Executable file
0
includes/admin/meta-boxes/class-wcs-meta-box-subscription-schedule.php
Normal file → Executable file
0
includes/admin/meta-boxes/views/html-related-orders-row.php
Normal file → Executable file
0
includes/admin/meta-boxes/views/html-related-orders-table.php
Normal file → Executable file
0
includes/admin/meta-boxes/views/html-retries-table.php
Normal file → Executable file
0
includes/admin/meta-boxes/views/html-subscription-schedule.php
Normal file → Executable file
0
includes/admin/reports/class-wcs-report-cache-manager.php
Normal file → Executable file
0
includes/admin/reports/class-wcs-report-dashboard.php
Normal file → Executable file
0
includes/admin/reports/class-wcs-report-retention-rate.php
Normal file → Executable file
0
includes/admin/reports/class-wcs-report-subscription-by-customer.php
Normal file → Executable file
0
includes/admin/reports/class-wcs-report-subscription-by-product.php
Normal file → Executable file
0
includes/admin/reports/class-wcs-report-subscription-events-by-date.php
Normal file → Executable file
0
includes/admin/reports/class-wcs-report-subscription-payment-retry.php
Normal file → Executable file
0
includes/admin/reports/class-wcs-report-upcoming-recurring-revenue.php
Normal file → Executable file
0
includes/admin/views/html-report-by-period.php
Normal file → Executable file
0
includes/admin/wcs-admin-functions.php
Normal file → Executable file
0
includes/api/class-wc-rest-subscription-notes-controller.php
Normal file → Executable file
0
includes/api/class-wc-rest-subscriptions-controller.php
Normal file → Executable file
0
includes/api/legacy/class-wc-api-subscriptions-customers.php
Normal file → Executable file
0
includes/api/legacy/class-wc-api-subscriptions.php
Normal file → Executable file
0
includes/api/legacy/class-wc-rest-subscription-notes-controller.php
Normal file → Executable file
0
includes/api/legacy/class-wc-rest-subscriptions-controller.php
Normal file → Executable file
0
includes/class-wc-order-item-pending-switch.php
Normal file → Executable file
0
includes/class-wc-product-subscription-variation.php
Normal file → Executable file
0
includes/class-wc-product-subscription.php
Normal file → Executable file
0
includes/class-wc-product-variable-subscription.php
Normal file → Executable file
0
includes/class-wc-subscription.php
Normal file → Executable file
0
includes/class-wc-subscriptions-addresses.php
Normal file → Executable file
0
includes/class-wc-subscriptions-cart.php
Normal file → Executable file
0
includes/class-wc-subscriptions-change-payment-gateway.php
Normal file → Executable file
0
includes/class-wc-subscriptions-checkout.php
Normal file → Executable file
0
includes/class-wc-subscriptions-coupon.php
Normal file → Executable file
0
includes/class-wc-subscriptions-email.php
Normal file → Executable file
0
includes/class-wc-subscriptions-manager.php
Normal file → Executable file
66
includes/class-wc-subscriptions-order.php
Normal file → Executable file
@@ -74,6 +74,8 @@ class WC_Subscriptions_Order {
|
||||
|
||||
// Autocomplete subscription orders when they only contain a synchronised subscription or a resubscribe
|
||||
add_filter( 'woocommerce_payment_complete_order_status', __CLASS__ . '::maybe_autocomplete_order', 10, 2 );
|
||||
|
||||
add_filter( 'woocommerce_order_data_store_cpt_get_orders_query', array( __CLASS__, 'add_subscription_order_query_args' ), 10, 2 );
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -1083,6 +1085,70 @@ class WC_Subscriptions_Order {
|
||||
return $new_order_status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Map subscription related order arguments passed to @see wc_get_orders() to WP_Query args.
|
||||
*
|
||||
* @since 2.2.20
|
||||
* @param array $query WP_Query arguments.
|
||||
* @param array $args @see wc_get_orders() arguments.
|
||||
* @return array The WP_Query query arguments.
|
||||
*/
|
||||
public static function add_subscription_order_query_args( $query, $args ) {
|
||||
$order_type_meta_key_map = array(
|
||||
'subscription_renewal' => '_subscription_renewal',
|
||||
'subscription_switch' => '_subscription_switch',
|
||||
'subscription_resubscribe' => '_subscription_resubscribe',
|
||||
);
|
||||
|
||||
// Add meta query args when querying by subscription related orders.
|
||||
foreach ( $order_type_meta_key_map as $order_type => $meta_key ) {
|
||||
if ( ! isset( $args[ $order_type ] ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$value = $args[ $order_type ];
|
||||
$meta_query = array(
|
||||
'key' => $meta_key,
|
||||
'value' => $value,
|
||||
);
|
||||
|
||||
// Map the value type to the appropriate compare arg.
|
||||
if ( empty( $value ) ) {
|
||||
$meta_query['compare'] = 'NOT EXISTS';
|
||||
unset( $meta_query['value'] );
|
||||
} elseif ( true === $value ) {
|
||||
$meta_query['compare'] = 'EXISTS';
|
||||
unset( $meta_query['value'] );
|
||||
} elseif ( is_array( $value ) ) {
|
||||
$meta_query['compare'] = 'IN';
|
||||
} else {
|
||||
$meta_query['compare'] = '=';
|
||||
}
|
||||
|
||||
$query['meta_query'][] = $meta_query;
|
||||
}
|
||||
|
||||
// Add query args when querying by subscription parent orders.
|
||||
if ( isset( $args['subscription_parent'] ) ) {
|
||||
$value = $args['subscription_parent'];
|
||||
|
||||
// Map the value type to post_in/post__not_in arg
|
||||
if ( empty( $value ) ) {
|
||||
$query['post__not_in'] = array_values( wcs_get_subscription_orders() );
|
||||
} elseif ( true === $value ) {
|
||||
$query['post__in'] = array_values( wcs_get_subscription_orders() );
|
||||
} elseif ( is_array( $value ) ) {
|
||||
$query['post__in'] = array_keys( array_flip( array_filter( array_map( 'wp_get_post_parent_id', $value ) ) ) );
|
||||
} else {
|
||||
if ( $parent = wp_get_post_parent_id( $value ) ) {
|
||||
$query['post__in'] = array( $parent );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/* Deprecated Functions */
|
||||
|
||||
/**
|
||||
|