This commit is contained in:
Prospress Inc
2018-06-01 08:52:43 +02:00
committed by Remco Tolsma
parent a4ae134191
commit 0ff6d53f17
281 changed files with 1139 additions and 67 deletions

0
assets/css/about.css Normal file → Executable file
View File

0
assets/css/admin.css Normal file → Executable file
View File

0
assets/css/checkout.css Normal file → Executable file
View File

0
assets/css/dashboard.css Normal file → Executable file
View File

0
assets/css/view-subscription.css Normal file → Executable file
View File

0
assets/css/wcs-upgrade.css Normal file → Executable file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 58 KiB

0
assets/images/ajax-loader.gif Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 885 B

After

Width:  |  Height:  |  Size: 885 B

0
assets/images/ajax-loader@2x.gif Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 133 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 172 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 90 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 KiB

0
assets/images/woocommerce_subscriptions_logo.png Normal file → Executable file
View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

0
assets/js/admin/admin-pointers.js Normal file → Executable file
View File

0
assets/js/admin/admin.js Normal file → Executable file
View File

0
assets/js/admin/jquery.flot.axislabels.js Normal file → Executable file
View File

0
assets/js/admin/jquery.flot.axislabels.min.js vendored Normal file → Executable file
View File

0
assets/js/admin/jquery.flot.orderBars.js Normal file → Executable file
View File

0
assets/js/admin/jquery.flot.orderBars.min.js vendored Normal file → Executable file
View File

0
assets/js/admin/jstz.js Normal file → Executable file
View File

0
assets/js/admin/jstz.min.js vendored Normal file → Executable file
View File

0
assets/js/admin/meta-boxes-subscription.js Normal file → Executable file
View File

0
assets/js/admin/moment.js Normal file → Executable file
View File

0
assets/js/admin/moment.min.js vendored Normal file → Executable file
View File

0
assets/js/admin/reports.js Normal file → Executable file
View File

0
assets/js/admin/wcs-meta-boxes-order.js Normal file → Executable file
View File

0
assets/js/wcs-upgrade.js Normal file → Executable file
View File

14
changelog.txt Normal file → Executable file
View File

@@ -1,5 +1,19 @@
*** WooCommerce Subscriptions Changelog *** *** 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 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 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 * 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
View File

0
includes/abstracts/abstract-wcs-cache-manager.php Normal file → Executable file
View File

View File

0
includes/abstracts/abstract-wcs-hook-deprecator.php Normal file → Executable file
View File

0
includes/abstracts/abstract-wcs-retry-store.php Normal file → Executable file
View File

0
includes/abstracts/abstract-wcs-scheduler.php Normal file → Executable file
View File

30
includes/admin/class-wc-subscriptions-admin.php Normal file → Executable file
View 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. * Outputs the contents of the "Renewal Orders" meta box.
* *

0
includes/admin/class-wcs-admin-meta-boxes.php Normal file → Executable file
View File

0
includes/admin/class-wcs-admin-post-types.php Normal file → Executable file
View File

0
includes/admin/class-wcs-admin-reports.php Normal file → Executable file
View File

View File

View File

View File

View File

View File

View File

0
includes/admin/meta-boxes/views/html-retries-table.php Normal file → Executable file
View File

View File

View File

0
includes/admin/reports/class-wcs-report-dashboard.php Normal file → Executable file
View File

View File

View File

View File

View File

View File

0
includes/admin/views/html-report-by-period.php Normal file → Executable file
View File

0
includes/admin/wcs-admin-functions.php Normal file → Executable file
View File

View File

View File

View File

0
includes/api/legacy/class-wc-api-subscriptions.php Normal file → Executable file
View File

View File

View File

0
includes/class-wc-order-item-pending-switch.php Normal file → Executable file
View File

0
includes/class-wc-product-subscription-variation.php Normal file → Executable file
View File

0
includes/class-wc-product-subscription.php Normal file → Executable file
View File

0
includes/class-wc-product-variable-subscription.php Normal file → Executable file
View File

0
includes/class-wc-subscription.php Normal file → Executable file
View File

0
includes/class-wc-subscriptions-addresses.php Normal file → Executable file
View File

0
includes/class-wc-subscriptions-cart.php Normal file → Executable file
View File

View File

0
includes/class-wc-subscriptions-checkout.php Normal file → Executable file
View File

0
includes/class-wc-subscriptions-coupon.php Normal file → Executable file
View File

0
includes/class-wc-subscriptions-email.php Normal file → Executable file
View File

0
includes/class-wc-subscriptions-manager.php Normal file → Executable file
View File

66
includes/class-wc-subscriptions-order.php Normal file → Executable file
View File

@@ -74,6 +74,8 @@ class WC_Subscriptions_Order {
// Autocomplete subscription orders when they only contain a synchronised subscription or a resubscribe // 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_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; 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 */ /* Deprecated Functions */
/** /**

0
includes/class-wc-subscriptions-product.php Normal file → Executable file
View File

0
includes/class-wc-subscriptions-renewal-order.php Normal file → Executable file
View File

0
includes/class-wc-subscriptions-switcher.php Normal file → Executable file
View File

0
includes/class-wc-subscriptions-synchroniser.php Normal file → Executable file
View File

0
includes/class-wcs-action-scheduler.php Normal file → Executable file
View File

0
includes/class-wcs-api.php Normal file → Executable file
View File

0
includes/class-wcs-auth.php Normal file → Executable file
View File

0
includes/class-wcs-cache-manager-tlc.php Normal file → Executable file
View File

0
includes/class-wcs-cached-data-manager.php Normal file → Executable file
View File

0
includes/class-wcs-cart-initial-payment.php Normal file → Executable file
View File

0
includes/class-wcs-cart-renewal.php Normal file → Executable file
View File

0
includes/class-wcs-cart-resubscribe.php Normal file → Executable file
View File

0
includes/class-wcs-cart-switch.php Normal file → Executable file
View File

0
includes/class-wcs-change-payment-method-admin.php Normal file → Executable file
View File

0
includes/class-wcs-download-handler.php Normal file → Executable file
View File

0
includes/class-wcs-failed-scheduled-action-manager.php Normal file → Executable file
View File

0
includes/class-wcs-limiter.php Normal file → Executable file
View File

Some files were not shown because too many files have changed in this diff Show More