*** WooCommerce Subscriptions Changelog *** 2020-09-29 - version 3.0.9 * Fix: Offset subscription next payment date calculations based on site time. All dates still remain in UTC, but calculations on the 1st and last day of the month will now take into account the site timezone. PR#3708 * Fix: Only attempt to display the customer notice when updating the default token from the My Account page. PR#3799 * Fix: Prefix variation attributes with `attribute_` when setting up renewal carts. PR#3809 * Dev: Add a new hook to the change_users_subscription() function - this hook is triggered before the status change. PR#3787 2020-09-24 - version 3.0.8 * Tweak: Remove the '$X now' from price string when synced product sign up date is today. PR#3797 * Fix: Treat a subscription with a cancelled parent order as "needing payment". This ensures cancelling the subscription will go right to cancelled, rather than pending-cancellation. PR#3784 * Fix: Remove code responsible for hiding/showing the WC order totals meta box. This fixes the deprecated jQuery.fn.load() warnings. PR#3786 * Fix: Fix updating status and end dates via the REST API. PR#3796 * Dev: Add an action hook to edit subscription admin payment meta inputs. Enables third-parties to display custom fields for each gateway. PR#3798 * Dev: Opt-in tracking data for Subscriptions Reports PR#3738 Data sent to WooCommerce: Subscriptions report views Subscriptions report filter usage - clicks and report range Number of subscriptions, orders, products Plugin version To disable this tracking, opt-out of WooCommerce tracking, see https://woocommerce.com/usage-tracking/ 2020-08-11 - version 3.0.7 * Fix: Prevent possible errors caused by inaccessible get_current_screen() function. PR#3678 * Fix: Decouple single_add_to_cart_text() from add_to_cart_text() and remove double and incorrect filtering. PR#3705 * Fix: Account for the pre-paid term when canceling a subscription which is on-hold without a required payment. PR#3726 * Fix: [WC4.4] Replace uses of `get_product_from_item()` with `$item->get_product()`. PR#3769 * Fix: [WC4.4] Deprecate use of the WC_Cart::tax_display_cart. PR#3741 * Fix: [WC4.4] Update WC_Product_Variable_Subscription::get_available_variations() function signature. PR#3761 * Fix: [WC4.0] Use the WC version appropriate hook to override the text explaining uneditable subscriptions. PR#3678 * Fix: [WP5.5] Add permission callback for the REST statuses endpoint. PR#3765 * Fix: [WP5.5] Remove the post box header from edit subscription meta boxes #3771 * Performance: Validate product type changes on large sites to avoid running queries on edit product page loads. PR#3699 * Tweak: [WC Code Standards] Fixes for i18n-related issues. PR#3757 2020-07-29 - version 3.0.6 * Tweak: Add placeholder explanation for the upcoming recurring report. PR#3655 * Tweak: Add a link to QuickForget.com in the IPN error notice. PR#3744 * Fix: Fix COD gateway availability for trial subscriptions. PR#3740 * Fix: Fetch customer error notice messages on the change payment method page in WC post 3.9 version compatible way. PR#3730 * Fix: Don't reduce stock for items added to a subscription manually via admin screen. PR#3725 * Fix: Only display the automatic renewal note in emails when there's a next payment. PR#3679 * Fix: Use the interval to calculate first payment date for synced products. Fixes an issue that caused a purchase outside the sync grace period to not account for the subscription interval. PR#3303 * Dev: Add two new action hooks before and after change payment submit button. PR#3718 * Dev: Add a new helper function wcs_trial_has_passed(). PR#3289 * Dev: Replace uses of cal_days_in_month() with a date() equivalent. PR#3734 * Dev: Make various changes to improve coding standards. PRs#3748, #3749, #3753 2020-06-16 - version 3.0.5 * Fix: Ensure the mixed checkout setting correctly prevents mixed carts after customer login. PR#3696 * Fix: Translate the automatic subscription recurring note in emails. PR#3684 * Fix: Account for limited coupon use across recurring carts. Fixes an issue which leads to limited coupons applying beyond the limit. PR#3552 * Fix: Copy the item usage limit to coupons applied to manual renewal carts. PR#3686 * Dev: Add a filter to control access to the early renewal modal. PR#3675 2020-04-28 - version 3.0.4 * Fix: Save changes to payment method meta on the edit subscription screen. PR#3666 * Fix: Grant Shop Managers edit capabilities over subscriber users. PR#3669 * Fix: Remove original item from switched subscription during a multiple line item, different billing schedule switch. PR#3659 * Fix: Use strict conditionals when comparing results of as_next_scheduled_action. Fixes rescheduling of actions which were ran manually. PR#3661 * Tweak: To comply with Visa's changes to rules governing free trial subscriptions, add additional subscription details to email templates. PR#3664 2020-04-01 - version 3.0.3 * Fix: Only set the payment method if it has changed via admin edit. PR#3646 * Fix: Performance issue in WCS_Payment_Tokens::get_subscriptions_from_token. PR#3649 * Fix: Exclude empty nonce. 2020-03-11 - version 3.0.2 * New: Add WC Admin Compatibility. PR#3628 * Fix: Restore the trial end date after reactivating a subscription which was cancelled. PR#3572 * Fix: Hide the order again button for orders which contain limited products. PR#3612 * Fix: Don't show recurring cart taxes when no taxes apply. PR#3633 * Fix: Prevent autocompleting orders which contain free, simple, non-digital products. PR#3621 * Fix: Remove redundant double line from customer report query. PR#3640 * Fix: [PayPal] Modify WC payload regex to account for alphanumeric chars. PR#3629 * Fix: Hide the free shipping label for free shipping and free local pickup options. PR#3618 * Fix: Prevent fatal errors when getting price for variable products which aren't synced. PR#3616 * Fix: Don't send WC core emails for subscription related orders when in Staging mode. PR#3576 * Fix: Update PayPal settings URL used in admin notices. PR#3617 * Tweak: Update wording in warning when attempting to change the subscription product type. PR#3623 2020.01.17 - version 3.0.1 * Fix: Support multiple modals on the customer's view subscription page. Fixes an issue where preventing the early renewal modal being displayed was preventing all modals on the page from being displayed. PR#3571 * Fix: Silence PHP warning in events by date report caused by empty set of data. PR#3577 * Fix: [WC3.7] Copy the rate percent meta to tax line items during renewal meta copy. PR#3578 * Fix: Introduce a user permissions check for the auto-renewal toggle. PR#3579 * Fix: Update Action Scheduler library to 3.0.1. This release includes a database tables schema version bump. PR#3593 2020.01.06 - version 3.0.0 * New: Update Action Scheduler to 3.0. * New: Apply WC styling to subscription statuses, subscription related order and retry meta table statuses. PR#3467, PR#3506 * New: Introduce new Renewal Order On-hold Emails. PR#3475 * Fix: Display gateway specific errors on the subscription change payment method page. PR#3278 * Fix: Order the results from WCS_Retry_Manager::store()->get_retries() correctly according to the orderby arg. Previously this function would always return results ordered by ascending ID. PR#3498 * Fix: Send customer Renewal Order Processing Emails on the correct status transitions. PR#3475 * Fix: Only update the subscription status once when processing $0 renewals orders. Fixes race condition caused by updating two instances of the same order. PR#3531 * Fix: Adjust admin CSS and data metabox for recent changes in WP and WC. PR#3540 * Fix: Fix admin notice error link for failed scheduled action when using WC_Log_Handler_DB. PR#3544 * Fix: Correctly calculate inclusive line item taxes when paying for manual renewal orders. PR#3545 * Fix: Add customer note details to renewal order email templates. PR#3536 * Fix: Validate the subscription start date during admin manual subscription creation. PR#3556 * Fix: Only display the WC Subscriptions activation notice on sites without a subscription product. PR#3558 * Fix: [WC 3.9] Ensure WCS_Retry_Manager::check_order_statuses_for_payment() has default value for the $order parameter. PR3565 * Fix: [WP 5.3] Fix variable subscription product admin field CSS. PR#3564 * Tweak: [WooCommerce dashboard widget] tweak media screen size breakpoints to avoid misalignment issues. PR#3553 * Tweak: Use product object rather than ID when validating mixed checkout setting. Improves compatibility with plugins like Mix and Match and Product Bundles. PR#3551 * Tweak: Display the cart and checkout recurring totals included taxes in a more readable way. PR#3546 * Dev: Allow 3rd party developers using the 'woocommerce_subscriptions_allow_switching_options' filter to add tooltip content. PR#3542 2019.11.14 - version 2.6.5 * Fix: Account for prorated switch sign up fees in multi-switches. PR#3519 * Fix: Tooltip content displayed on WooCommerce > Subscriptions administration screen. * Dev: Add additional hooks in My Account Subscription Details table template. PR#3523 2019.11.12 - version 2.6.4 * Tweak: Update the My Account customer has no subscriptions notice to match WC core. PR#3516 * Fix: Add hidden class to subscription_pricing and subscription_sync edit product fields. Fixes a bug when the subscription product types are removed from the edit product type drop-down. PR#3514 * Fix: error on My Account > Payment Methods for non credit card tokens and allow deleting tokens with clear alternative. PR#3482 * Fix: Allow only number of days in specific month for synchronize renewals. PR#3470 * Fix: Save subscription meta box data via set_props(). Fixes fatal error when saving invalid data. PR#3524 * Fix: Use update_option() rather than add_option() to record WC Subscriptions activation. Fixes infinitely running activation hook under some circumstances. PR#3525 * Dev - Opt-in tracking data for Subscriptions PR#3504 Data sent to WooCommerce: Staging or live site Live URL WooCommerce Subscriptions Settings Dates of the first and last created subscriptions Number of subscriptions Number of subscriptions with each status Gross totals for switch, renewal, resubscribe, and initial totals Order counts for for switch, renewal, resubscribe, and initial orders To disable this tracking, opt out of WooCommerce tracking, see https://woocommerce.com/usage-tracking/ 2019.10.29 - version 2.6.3 * Fix: use dashicon over fa icon. PR#3497 * Fix: remove button type from close modal link. PR#3497 * Fix: Remove double filtering of the meta label through the woocommerce_attribute_label filter. PR#3476 * Fix: Restore the subscription's end date after reactivation. PR#3399 * Fix: Tooltip content displayed on WooCommerce > Subscriptions administration screen. * Tweak: Allow modals to be displayed on admin screens. PR#3497 * Tweak: Redirect the customer to checkout after failed early renewal attempt. PR#3494 * Dev: Allow third parties to filter the switch cart item object properties. PR#3484 2019.10.10 - version 2.6.2 * Tweak: Add the switch direction the switch data stored in _subscription_switch_data order meta. PR#3440 * Tweak: Add an order note to manual renewal order to note the order is awaiting customer payment. PR#3456 * Tweak: Add note on the renewal order when a manual payment retry is ran. PR#3477 * Fix: Hide sync meta data on the edit order and subscription screen. PR#3454 * Fix: Fix an issue that led to missing _switched_subscription_item_id line item meta which caused incorrect multi-switch upgrade costs among other issues. PR#3461 * Fix: Store the full set of current subscription counts not just the last element. Fixes issues when exporting subscription report data. PR#3455 * Fix: Add the manually admin requested renewal order notes in the correct order. PR#3462 * Fix: Display the customer facing subscription dates in site time. Fixing display inconsistencies. PR#3469 * Fix: Updated the link in the staging site admin notice. PR#3473 * Fix: Only get return retries from the post store which are retry posts. Fixes an issue where it would return a retry object for other post types. PR#3481 * Fix: Load renewal order fee items to manual renewal carts. PR#3480 * Dev: Fixed WC_Subscription::get_date() returning dates in the site time if the site was using GMT offsets in their site settings. PR#3469 2019.09.04 - version 2.6.1 * Fix a bug that would lead to switch log entries not including all information. PR#3441 * Fix fatal errors that would occur on the admin edit order screen on staging sites. PR#3443 * Performance: Sort using subscription related order IDs on the application layer with rsort() instead of MySQL orderby clause. PR#3442 2019.09.02 - version 2.6.0 * New: New option to allow customers with automatically renewing subscriptions to renew early via a modal rather than going through the checkout. PR#3293 * New: Link subscription report counts in the 'by date' report to order and subscription listing page. PR#3318 * New: Add different message and link to documentation for store managers when no payment methods available on checkout. PR#3340 * New: Add a note and a tooltip explaining locked manual subscriptions on staging sites. PR#3327 * New: Use the switching flow to enable items to be added to existing subscriptions. PR#3394 * New: Log switch debug information when a switch order is processed. PR#3424 * Tweak: Use sentence case for table and section headings in customer facing templates. PR#3392,#3407,#3412,#3432 * Tweak: Make improvements to the subscription admin dashboard reports. Fixes misalignment issues on certain display sizes. PR#3401 * Tweak: Update the PayPal admin notices to be more correct based on if Standard is enabled or not. PR#3393 * Tweak: Display PayPal type specific features in the System Status and feature tooltip. PR#3411 * Tweak: Display un-loadable orders in the subscriptions related order table. PR#3342 * Tweak: Always pass product instances to WC_Subscriptions_Product methods. PR#3396 * Tweak: Update the ended subscriptions report legend key for more grammatically correct option. PR#3415 * Tweak: Disable the auto-renewal toggle on staging sites. PR#3387 * Tweak: [REST API] Include 'removed line items' in subscription response. PR#3198 * Tweak: Replace self::class with php __CLASS__ constant in report classes. PR# * Tweak: Transform "Allow Switching" admin settings into to a multi-checkbox option. PR#3373 * Fix: Refactor the WC_Subscriptions_Switcher::calculate_prorated_totals() function and fix a number of switching issues in the process. PR#3250 * Fix: Keep the trial end when switching between two products with matching trial periods when the subscription is still on trial. PR#3409 * Fix: Use the last order's paid date in switching calculations when determining the number of days consumed in the current cycle. PR#3420 * Fix: Ignore the WP_SITEURL global on multisites when determining the site URL for staging sites. PR#3397 * Fix: Repair subscription line items with missing `_has_trial` line item meta. PR#3239 * Fix: Only retrieve subscriptions with the product as a line item - exclude switched and removed products while using `wcs_get_subscriptions_for_product()`. PR#3386 * Fix: Don't display tax values in recurring cart section when taxes aren't enabled under certain circumstances. PR#3408 * Fix: Trigger the `woocommerce_before\after_add_to_cart_quantity` actions on the subscription single product pages. PR#3388 * Fix: [WC 3.7] Include the "additional content" in subscription-related emails. #3416 * Fix: [WC 3.7] Remove uses of deprecated $order->get_used_coupons(). PR#3421 * Fix: Copy or replace fees from cart to subscription while switching. PR#3184 * Fix: Save subscription after setting payment meta via wcs_set_payment_meta(). Fixes issues after updating the payment meta before payment retry. PR#3425 * Fix: Don't allow users to partially pay for renewal orders if some products are out of stock. This was previously fixed by broke in Subscriptions 2.1. PR#3436 * Fix: Add filter which can be turned on to allow out of stock manual renewals to pass cart and checkout validations. PR#3435 * Fix: [WC Services] Fixed compatibility bug which caused coupons to be removed when automatic tax rates enabled with WC Services. PR#3376 * Fix: Remove uninitiated database transaction rollback in WC_Subscriptions_Switcher::process_checkout. PR#3307 * Fix: Validate cart contents after login when mixed checkout is disabled. PR#3151 * Fix: Fix issue which led to the 'save changes' button always being active on product variations tab. PR#3357 * Fix: Fix division by zero warning in subscriptions by customer report. PR#3371 * Fix: Use site time while adding a period to the first payment date so that last day of month is right. PR#3368 * Performance: Limit the "product has a subscription" query to just a single result to be more performant. PR#3389 * Dev: Deprecate get_completed_payment_count() in favor of get_payment_count(). PR#2971 * Dev: [WC 3.7] Only use deprecated woocommerce_before_cart_item_quantity_zero hooks on WC pre 3.7. PR#3377 * Dev: Introduce WCS_Dependent_Hook_Manager class to assist in attaching callbacks on specific WC versions. PR#3377 * Dev: Add BEM classes to templates and make general code improvements. PR#3135 * Dev: Always use get_date_types_to_schedule() to schedule dates. PR#3091 * Dev: Deprecate old and unused WC_Subscriptions_Manager::process_subscription_payments_on_order() and WC_Subscriptions_Manager::process_subscription_payment_failure_on_order() functions. PR#3378 2019.07.04 - version 2.5.7 * Fix: Check for any free shipping which has its requirements met - not just the first one. PR#3329 * Fix: Fix un-purchasability issues with limited subscriptions in manual renewal carts. PR#3358 * Tweak: Update email address to create support admin user with. PR#3363 * Tweak: Update the plugin headers to include Automattic. PR#3365 2019.05.30 - version 2.5.6 * Fix: Exclude core order properties from the meta copied from the subscription to early renewal orders. #PR3331 * Tweak: Add the 'is-active' class to My Account > My Subscription menu item when user is on View Subscription page. PR#3328 2019.05.13 - version 2.5.5 * New: Add support for admin users to re-display the staging site notice if it was previously hidden. PR#3321 * Fix: Revert a fix released in 2.5.4 which attempted to implement a workaround for SiteGround's staging sites. PR#3323 reverts: PR#3285 2019.05.08 - version 2.5.4 * Fix: Don't save empty product sale date ranges. Fixes an issue where the sale price appears in 1970 after a timezone offset change. PR#3283 * Fix: Validate subscription coupon types for non subscription and non-signup fee products. Fixes an issue where subscription coupons limited to 1 use never apply to some mixed carts. PR#3280 * Fix: Fix the PHP warnings that occur on the WP Dashboard page caused by incorrect use of args in a sprintf string. PR#3290 * Fix: Maintain any cart coupons when emptying the cart because of the store's mixed checkout settings. PR#3291 * Fix: Fix fatal errors when calling wcs_get_objects_property with a non-object parameter. PR#3308 * Fix: Use the raw SERVER_ADMIN variable to generate site URL on SiteGround sites. This fixes issues where SiteGround hosted staging sites weren't being recognized as staging sites due to SiteGround's special handling of the site url stored in the DB. PR#3285 * Fix: Don't check subscription limitation purchasability on admin screens. PR#3311 * Fix: Pass the 4th param to callbacks on woocommerce_checkout_create_order_shipping_item. PR#3317 * Fix: Remove order-specific e-mail actions from "Subscription actions" drop-down. PR#3299 * Fix: Add the item subtotal tax when manually renewing where the prices included tax. Fixes an issue where if the store's tax rates change, customers renewing manually may get a strange item price. PR#3286 * Tweak: Keep renewal orders "created_via" meta as "subscription" when paid via the checkout. PR#3301 * Tweak: Remove cancelled PayPal Reference Transactions Billing Agreements from manual, non-PayPal, and ended subscriptions. Fixes an issue where a cancelled subscription is reactivated and attempts to use a cancelled billing agreement. PR#3263 * Tweak: Increase the WC tested version to 3.6.0. PR#3313 * Tweak: Update Action Scheduler to 2.2.4. PR#3312 * New: Add a filter to allow 3rd parties to disable auto-switching. PR#3316 2019.03.20 - version 2.5.3 * New: Update Action Scheduler to version 2.2.1. PR#3266 * Fix: Display the subscription status names (rather than the raw status) in the edit subscription related orders table. PR#3272 * Fix: Use the correct endpoint for redirecting to the only available subscription on My Account. PR#3273 * Fix: [WPML] Keep language request args in Subscription My Account endpoint URLs. PR#3068 * Fix: Save the sale price schedule dates in UTC time (like WooCommerce core). PR#3270 * Fix: Use site time when checking if payment date and trial end date are same. Fixes issues with synced products with a trial. PR#3264 * Fix: Update retry report queries to refer to new retry tables. PR#3237 * Fix: Do not display the PayPal Profile ID on the edit subscription screen when the subscription is Manual Renewal. PR#3259 * Fix: Exclude `pending-cancel` subscriptions from anonymisation. PR#3256 * Fix: Pass the user ID and gateway ID parameters in the right order. Fixes issues with bulk updating customer payment tokens. PR#3258 * Fix: Temporarily lock payment on parent orders paid with PayPal Standard. Prevents customers paying twice while waiting for PayPal to respond. PR#2974 * Fix: Remove HTML from strings passed through translation functions. PR#3067 * Fix: Prevent endpoint settings having the same value. PR#3211 * Fix: Remove `strtolower()` uses on translated text. Prevents lowercasing translated text which may have language specific capitalisation. PR#3251 * Fix: Prevent possible fatal errors while populating the checkout with customer order data. Refactors the wcs_get_objects_property function. PR#3225 * Fix: Removes use of absint for amounts/totals in reports. PR#3242 * Fix: Display correct placeholder values for 'subject' and 'heading' e-mail settings #3246 * Fix: Do not load the view-subscription scripts when subscription can't be viewed or doesn't exist. PR#3235 * Fix: [WC3.6] Use new helper function to generate cart hash. PR#3215 * Tweak: Use 'WC_Order_Item_Product::get_product' wherever possible in 'WC_Subscriptions_Synchroniser'. PR#3230 * Tweak: Clarify the meaning of certain count values in subscription reports tool tips. PR#3143 * Tweak: Fixes various typos. PR#3276 * Dev: Add $cart as a parameter for the woocommerce_cart_subscription_string_details hook. PR#3257 2019.02.21 - version 2.5.2 * Fix: Check if sale price is empty before returning it as the product price. Fixes compat. issues with Dynamic Pricing. PR#3213 * Fix: Copy subscription meta data to early renewal orders. PR#3221 * Fix: Add jquery-blockui as a dependency of the view-subscription JS file. PR#3227 * Fix: Validate the DOM object exists before applying styles. Fixes JS errors on the My Account View Subscription page. PR#3218 * Tweak: Escape line item names via wp_kses_post to allow safe html tags. PR#3224 * Dev: Filter the wcs_cart_totals_shipping_method_price_label function to allow third-parties to alter the free shipping label. PR#3228 * Dev: Add $variation parameter to 'woocommerce_subscriptions_product_needs_one_time_shipping' filter. PR#3197 2019.02.11 - version 2.5.1 * Fix: In report queries use WordPress prefixed table names. PR#3205 * Fix: Fix errors caused by calling WC_Gateway_Paypal::update_option() in early WooCommerce versions. PR#3208 * Tweak: Rename the 'uncancel' admin subscription action to 'reactivate'. PR#3209 * Enhancement: Add downloadable and virtual subscription options to the filter on the products admin page. PR#3199 2019.02.06 - version 2.5.0 * New: Add payment gateway feature support tooltips to the WooCommerce>Setting>Payments screen. PR#3013 * New: Add Subscriptions-related information to the WooCommerce Status Widget. PR#2980 * New: Add option to allow a $0 initial sign-up without payment method. PR#3015 * New: Update Action Scheduler to v2.2.0. PR#3187 * New: Allow customers to update all subscriptions' payment method. PRs#3064,#3080,#3041 * New: Display downloads in separate table on the customer's View Subscription page. PR#3128 * New: Add new option to filter Admin subscriptions table by manual subscriptions. PR#3144 * New: Add auto-renew toggle to Customer's View Subscription page. PR #3156 * New: Add option to disable PayPal Standard for subscription-related purchases. PR#3152 * New: Add change payment method link to the edit subscription screen. PR#3086 * New: Allow store managers and customers to uncancel a subscription while it's still in a pending-cancel status. PR#2993 * Fix: Prevent PHP warning in WC_Subscriptions_Cart::cart_needs_payment(). PR#3142 * Fix: Do not return non-order objects from WC_Subscription::get_related_orders( 'all' ). Prevents errors when the calling function expects an order but got false. PR#3140 * Fix: Don't display the subscriptions My Account menu item when endpoint is empty. PR#3146 * Fix: Fix rounding warnings with PayPal Reference Transactions. PR#3134 * Fix: Remove use of an invalid Exception object type. PR#3148 * Fix: Fallback to previous renewal when parent order is not define for PayPal Standard IPNs. PR#2855 * Fix: Update WC_Subscription::status_transition() method to be inline with WC_Order::status_transition(). PR#2777 * Fix: Skip non-orders objects when generating the related orders table to prevent fatal errors. PR#3161 * Fix: Redirect non-logged in users to login when handling requests to change a payment method. PR#3160 * Fix: Don't apply retry rules to manual renewal payment attempts. PR#3153 * Tweak: Revert subscription customer ID and post_author changes introduced for WC3.5. PR#3159 * Tweak: Update failed scheduled action notice content. PR#3170 * Tweak: Ignore all $0.01 PayPal Standard IPN transactions. PR#3178 * Tweak: Add installed plugin information to the log file during plugin upgrade. PR#3181 * Dev: Add WC_Subscription::get_change_payment_method_url() function. PR#3041 * Dev: Add a filter to allow custom relations to be supported by the related order store. PR#3089 * Dev: Update uses of woocommerce_order_item_meta_end to use add_action, remove_action - not filter APIs. #3163 * Dev: [WC 3.5.4] Subscription order key updates. PR#3171 * Dev: Deprecate WC_Subscriptions_Cart::pre_get_refreshed_fragments. PR#3173 2018.12.21 - version 2.4.7 * Fix: Fix an issue with the release date of 2.4.6. 2018.12.21 - version 2.4.6 * Dev: Add 'woocommerce_subscription_is_manual' filter. PR#3102 * Tweak: Add action attributes to the add to cart form on subscription product pages. PR#3105 * Fix: Remove "Your subscription will be activated when payment clears" on the order received page when the subscription is already active. PR#3099 * Fix: [WP 5.0.2] Fix an issue where the Admin Subscriptions table was empty. PR#3139 2018.11.28 - version 2.4.5 * Fix: Fix caching on data for the Upcoming Recurring Revenue and Subscriptions By Date reports. PR#3069. * Fix: Fix compatibility with Disable Report Cache Updates mini-plugin. PR#3069. * Fix: Make Stripe source ID unique while setting through REST API. PR#3090. * Fix: Display synced variation product's next payment date after the variation is selected by a customer on the product page. PR#3094. * Fix: Activate subscription after processing an IPN on parent orders previously processed by PDT. PR#3097. * Tweak: Update incomplete retry migration status label styling and wording to "In-Progress" to avoid confusing in-progress migrations as being a problem. PR#3088 2018.11.20 - version 2.4.4 * Fix: Prevent fatal errors when the retry migration doesn't receive a valid retry object. PR#3042 * Fix: Fix PHP notices in subscription events by date report. PR#3078 * Fix: Don't trigger payment gateways while processing retries on staging sites. PR#2870 * Fix: Apply coupons and discounts to initial payment and early renewal carts. PR#3048 * Fix: Use the correct `for` attribute in the variable_subscription_trial_period label element. PR#3081 * Fix: [PayPal Standard] Prevent creating multiple orders to record a single sign up transaction that was previously handled by a PDT request. PR#3074 * Tweak: Remove the nonce from early renewal urls. PR#3085 2018.11.13 - version 2.4.3 * Fix: Pass the quantity argument to woocommerce_add_cart_item_data filter. PR#3051 * Dev: Update Action Scheduler to 2.1.1. PR#3059 * Dev: Add a new filter (`wcs_remove_fees_from_initial_cart`) which can be used to override the removal of fees from the initial cart. PR#3046 2018.10.29 - version 2.4.2 * Fix: Always get the subscription's customer user from post meta. Fixes issues on sites running WC 3.5 where the subscription customer was incorrectly being set to an admin user. PR#3037 * Fix: Use the current timestamp of site's timezone for comparison during synchronisation first payment date calculations. PR#3003 * Fix: Sort the user subscriptions cache to ensure subscriptions appear in the correct order on the My Account > Subscriptions page. PR#2965 * Fix: Correctly account for tax inclusive sign up fees for synced products. PR#2818 * Fix: Fix PHP 7.1.x warnings related to get_sign_up_fee() and product variations. PR#3014 * Fix: Use the correct breadcrumbs on "change payment method" and "change address" pages. PR#3008 * Fix: Fix product purchasability issues when switching between limited variable products. PR#3007 * Fix: Remove the erasure tools link from the description of the erasure settings for users without the manage_privacy_options capability. PR#3004 * Dev: Add switch proration filters. PR#3011 * Dev: Use admin_created_subscription hook to generate download permissions. PR#3024 * Dev: Deprecated wcs_get_sites_timezone() fixes get_local_timezone() deprecated warnings. PR#3032 2018.10.16 - version 2.4.1 * Fix: Cache the retry data needs migration logic to avoid a get_posts() call on every request. PR#2994 * Fix: Load the retry store instance on WordPress init rather than on Subscriptions plugin load. Fixes errors with third-party plugins hooking into get post queries and calling undeclared WP functions. PR#3000 * Fix: Fix an undefined product ID error which could occur during a switch request when trying to access a product from the old subscription format. PR#2961 * Fix: Fix a missing closing `a` tag in the downgrade notice. PR#3002 * Dev: Add a new hook ('woocommerce_admin_created_subscription') which is triggered after a subscription is created manually via the admin screen. PR#2988 * Dev: Add new hooks to allow third-parties to customize subscription filtering behavior on the admin subscriptions table. PR#2989 2018.10.09 - version 2.4.0 * New: Update Action Scheduler to v2.1.0. * Fix: Remove the URL scheme when generating the site's duplicate lock URL. Fixes an issue where staging sites with a URL length equal the scheme would incorrectly not trigger staging mode. PR#2599 * Fix: Move callbacks attached specifically for renewal carts to the constructor so that all extended cart classes are not hooked on. PR#2963 * Fix: Allow products which are password protected to be manually renewed via the cart. PR#2912 * Fix: Remove unnecessary leading space in translation string. PR#2976 * Fix: Add group by clause to subscriber count reports query. PR#2970 * Fix: Fix an error which would occur when calling the deprecated get_related_orders_query(). PR#2954 * Tweak: Separate a subscription start from the creation date. PR#2594 * Tweak: Display the expected site URL in staging site notice and system status. PR#2950 * Dev: Implement an Autoloader for loading plugin class files. PR#2412 * Dev: Replace WC_Logger type hinting in function signatures to use lower level WC_Logger_Interface. PR#2902 * Dev: Remove switch_line_items_pre_2_1_2() and switch_shipping_line_items_pre_2_1_2() functions. PR#2900 * Dev: [WC 3.5] Move subscription customer ID's into the post author column on sites running WC 3.5 and above. PR#2559 * Dev: Move payment retry data to custom tables. PR#2753 * Dev: Update file inclusions to use relative paths. PR#2936 * Dev: Add an API for third-parties to register their custom subscription date types. PR#2840 * Dev: Update the hook used for adding Subscriptions Settings. PR#2939 * Dev: Add a 'wcs_payment_gateways_change_payment_method' filter to allow third-parties to filter which payment methods are displayed when changing payment methods. PR#2571 * Dev: Trigger a new 'wcs_before_replace_pay_shortcode' action before displaying the change payment shortcode. * Dev: Add the 'wcs_update_all_subscriptions_addresses_checked' filter to allow third-parties to filter the default checked status of the all_subscriptions_addresses field. PR#2948 2018.09.25 - version 2.3.7 * Fix: Don't apply subscription payment gateway filters while on the order-pay page. PR#2927 * Fix: Prevent admin users from changing product type when the product has active subscriptions. PR#2932 * Fix: Avoid calculating the initial order carts shipping without an address. PR#2923 * Fix: Remove unnecessary empty() check for PHP < 5.5 compat. PR#2940 * Fix: Reinstate switch orders being returned from WC_Subscription::get_related_orders() when called with the default $order_type param. This returns the behavior of this function to what it was pre v2.3. PR#2946 * Tweak: [WC 3.4] Dont escape the product attribute labels in the add-to-cart/variable-subscription.php template. PR#2914 * Tweak: Add a link to the subscription customer's profile on the admin edit subscription screen. PR#2911 * Tweak: [dev] Update calls of remove_action() and remove_filter() removing the unused 4th parameter. PR#2926 2018.09.10 - version 2.3.6 * New: Include subscription paid and completed UTC dates in REST API subscriptions response. PR#2895 * Fix: When switching during a free trial the days in the new cycle are equal to the days in the old cycle. This returns next payment date calculations to what it was pre 2.3.3. PR#2887 * Fix: Make sure to display the inactive plugin notice on sites running unsupported WC versions. PR#2878 * Fix: Reinstate the _customer_user admin subscriptions table filter by customer $_GET arg. PR#2884 * Tweak: Automatically add download permissions for manually created subscriptions. PR#2836 * Tweak: Modify renewal order staging note to include URLs of the live and staging site. PR#2881 * Tweak: Rename WC_Subscriptions_Change_Payment_Gateway::store_pay_shortcode_mesages(). PR#2899 * Tweak: Set "add to cart" and "place order" button text settings to default if no value is provided. PR#2676 2018.08.27 - version 2.3.5 * Fix: Exclude customers with at least 1 subscription from the WC inactivity user cleanup query. PR#2830 * Fix: Calculate PayPal trial args from the next payment date while resubscribing before the subscription's end date. PR#2828 * Fix: Only display the 2.3 upgrade notice after plugin upgrade, not after install. PR#2869 * Tweak: Add 'woocommerce_subscriptions_can_user_renew_early' filter to allow third-parties to filter renew early eligibility. PR#2859 * Tweak: Include resubscribe data in the subscription REST API response. PR#2863 * Tweak: Improve the performance of some queries by using cached customer subscriptions instead of meta queries. PR#2856 * Tweak: Improve the performance of the query which generates the data for the Subscriptions by Date report. PR#2788 * Tweak: Give customers the option to update their subscription tokens after changing their default method. PR#2819 2018.08.10 - version 2.3.4 * New: Add filter to bypass coupon removal for recurring carts. PR#2832 * Fix: Check if subscription is payable before populating the cart with a renewal order. PR#2838 * Fix: Add a margin to the bottom of subscription information email table to better align with other sections of the email. PR#2853 * Fix: Prevent infinite loops which can occur while trying to repair PayPal Standard subscriptions with `S-****` Profile IDs. PR#2848 * Fix: [WC3.4.4] Check refunded order totals in a WC version compatible way. Fixes an issue where limited coupons weren't removed after reaching their limit. PR#2850 * Tweak: Require payment for recurring carts which contain limited coupons which will expire and then require payment. PR#2850 2018.07.24 - version 2.3.3 * Fix: Prevent infinite loops while generating variable product min and max data. PR#2810 * Fix: Filter renewal order cart shipping packages, removing one time shipping products from shipping calculations. PR#2811 * Fix: Only generate persistent related order and customer subscription caches via the Transients API to avoid the possibility of retrieving out of date data stored in the option. PR#2823 * Fix: Update WC_Subscriptions_Order::maybe_autocomplete_order() to allow for it to handle orders before they have an ID (before they are inserted). PR#2784 * Fix: Adjust for possible differences in billing cycles because of rounding when calculating prorated totals for switch requests. PR#2617 * Tweak: Improve UX for variation selection when limited variable product is in cart. PR#2683 * Tweak: Remove code which supported for WC 2.5. PR#2806 * Tweak: Enforce array return value for `pre_get_users_subscriptions` filter. PR#2814 2018.07.10 - version 2.3.2 * Fix: Extend the next payment date after early renewal if there's no end date. PR#2804 * Fix: Prevent throwing type hinting errors when getting related orders from cache. RR#2805 * Tweak: Don't copying `_created_via` meta from subscriptions to related orders as this overrides the value set when the order was created. PR#2794 * Tweak: Make `wcs_get_subscriptions_for_order()` the canonical function for retrieving subscriptions for a given order (regardless of type). PR#2805 2018.07.06 - version 2.3.1 * Fix: Catchable fatal error from function parameter hinting. PR#2797 2018.07.04 - version 2.3.0 * New: Allow store managers to link an order with a subscription using the parent order relationship via a UI on the admin edit subscription screen. PR#2272 * New: Add an option to charge the full recurring amount at the time of sign up for synchronised subscription products. PR#2343 * New: Add new coupon setting which store managers to use to create recurring coupons which apply for a certain number of payments. PR * New: Add new sections to the system status. PR#2493 * New: Allow customers to renew subscriptions before their next payment date from their My Account Subscription page. PR#2544 * New: Add persistent cache of related order IDs in subscription meta. Improves performance when obtaining subscription related orders. PR#2572 * New: Add new sections to the system status. PR#2493 * New: Add persistent cache of customer subscriptions. PR#2635 * New: Add extra args ($order and $cart) to woocommerce_checkout_create_subscription filter. PR#2645 * New: Update Action Scheduler to v2.0.0. * New: Add a new admin upgrade notice helper class `WCS_Upgrade_Notice_Manager`. PR#2622 * New: Add WCS_INIT_TIMESTAMP constant and use it to time background updates. PR#2739 * New: Display an admin notice when a site is downgraded. PR#2743 * Fix: Repair subscriptions which have been suspended in PayPal but not in WooCommerce. PR#2407 * Fix: Make sure wcs_get_product_limitation() uses the parent product when determining variation product subscription limitations. PR#2513 * Fix: Remove non-recurring fees from renewal carts. PR#2642 * Fix: Don't autocomplete orders which have a subtotal greater than 0. PR#2665 * Fix: [Reports] Exclude trashed subscriptions from all calculations. Fixes inconsistencies between some subscription counts. PR#2674 * Fix: Check if the recurring_carts variable has been set before calling count() on it. PR#2688 * Fix: Issues caused by a loophole where trashed or non grouped products remain a valid subscription product parent for switching. PR#2682 * Fix: Check if there is no shipping method for a shipping zone before trying to access it when displaying cart HTML. PR#2701 * Fix: Correctly calculate switching sign-up fee proration when switching between synced products. PR#2722 * Fix: Indirect modification of WC_Checkout::$shipping_methods PHP errors. PR#2729 * Fix: Only allow switching between products which are visible to the customer. PR#2727 * Fix: [WC3.4] Only trigger the woocommerce_after_add_to_cart_button action hook once on variable subscription single product pages. PR#2750 * Fix: [WC3.4] Fix missing endpoint settings. PR#2767 * Fix: Remove unused chosen shipping methods for recurring packages. Fixes an issue where if the number of available shipping methods changes, the recurring carts hold onto their previously chosen method. PR#2782 * Fix: Protect against possible errors when getting the subscriptions my account endpoint url. PR#2781 * Tweak: Prevent bulk deletion of variations in use by at least one subscription. PR#2678 * Tweak: Add better support for custom order types via `WC_Subscription::get_last_order()`. PR#2644 * Tweak: Add `WCS_Admin_Post_Types::get_date_column_content()` helper function for displaying date content in post tables. PR#2643 * Tweak: Change the Edit Subscription Schedule meta box titles. PR#2649 * Tweak: Hide Recurring Coupons in the initial cart if they don't apply. PR#2616 * Tweak: Add a filter to allow third-parties to filter orders by custom order types. PR#2667 * Tweak: Don't schedule events for subscription start & last payment dates. PR#2669 * Tweak: Add new `wcs_create_subscription` action. PR#2732 * Tweak: Include variations in the "Subscriptions by product" reports. PR#2704 * Tweak: Improve performance of getting a variable product's min and max variation data. PR#2723 * Tweak: Add Subscription endpoints to the WC_Query endpoints. This allows our endpoints to be considered by functions like is_wc_endpoint_url() and also wc_body_class(). PR#2749 * Tweak: Add an order note to renewal orders processed under staging site conditions. PR#2773 * Tweak: Add a new badge to the subscriptions admin menu item when a site is operating as a staging site. PR#2773 * Tweak: Add note to guest checkout setting, noting that an account is required when purchasing subscription products. PR#2751 * Tweak: Deprecate the 'wcs_pre_get_users_subscriptions' filter. PR#2785 * Tweak: Increase minimum required WC version to 2.6. PR#2786 * Tweak: Remove TLC transient library and the cache manager which implemented it. PR#2614 * Tweak: On site's already running WC 3.0 ensure all subscriptions have address indexes via a background repair script. PR#2605 * Tweak: Require PHP 5.6 or newer. PR#2325 * Tweak: Change 'created_via' order property for subscription orders. PR#2389 * Tweak: Boost performance of admin subscription search by using billing and shipping indexes. PR#2409 * Tweak: Add filter to control the automatic redirect behaviour of the Subscriptions menu item on My Account. PR#2633 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 * Fix: Remove the "\n" character from variable subscription item tooltips in the admin subscriptions table. PR#2481 * Fix: Allow users to purchase limited to any status subscription products under circumstances where the customer is blocked from purchasing because of cancelled orders. PR#2485 * Fix: Prevent deletion of product variations in use by a subscription. PR#2507 * Fix: Get default product price when no price arg is passed into `get_price_string()`. PR#2558 * Fix: Avoid potential for division by zero errors when switching. PR#2574 * Fix: Only force payment method selection during switch if a new subscription will be created. PR#2567 * Fix: Remove trailing space from address_type variable. PR#2595 * Fix: Ensure the opening span tag is present for all args passed to get_price_string(). PR#2597 * Fix: Set the product's price to the sale price even if it's 0. Fixes display issues with subscription products on sale for $0. PR#2601 * Fix: While resubscribing, ensure subscriptions with multiple line items charge the correct amount for all line items, not just the 1st. PR#2585 * Fix: Hide product stock settings while editing variable products. PR#2563 * Fix: Allow subscription coupons to be applied while switching subscriptions. PR#1863 * Fix: Ensure subscriptions created via the API with an active status and a set_paid arg set to true are saved. PR#2609 * Fix: Ensure Net Gain/Loss calculations for subscription reports convert dates correctly to match the site's timezone. PR#2593 * Fix: Prevent the possibility for fatal errors caused by calling undeclared functions during the payment method change requests. PR#2613 * Tweak: Ensure sign up fees are numeric before attempting to use them in calculations. PR#2551 * Tweak: Only clear related order cache on renewal order changes. PR#2555 * Tweak: Improve checkout performance by avoiding related renewal orders query. PR#2550 * Tweak: Add the `$plain_text` arg to order item meta start and end hooks. PR#2515 * Tweak: Refactor the view subscription template. PR#2575 * Tweak: Add Subscription My Account endpoints to wpml-config.xml file. PR#2578 * Tweak: Add 'woocommerce_subscriptions_product_limited_for_user' filter. PR#2596 * Tweak: Clear the cart if the product being added to the cart is sold individually when mixed checkout is disabled. PR#2602 * Tweak: Use WC_DateTime objects and `getTimestamp()` rather than `format( 'U' )` to avoid possible issues in earlier PHP versions. PR#2588 * Tweak: Add pagination to the My Account Subscriptions table. PR#2537 * Tweak: Catch, log and display an admin notice after a scheduled subscription action timeout. PR#2484 2018.02.12 - version 2.2.18 * New: Provide custom options for subscription My Account endpoints. PR#2511 * Fix: Reinitialize tooltips after changing switching settings. PR#2517 * Fix: Only add inclusive tax rates to renewal cart items if product is taxable. PR#2524 * Fix: [WC3.3] Fix switching between grouped products by ensuring the switch request arguments are posted to the add to cart form. PR#2535 * Fix: Use correct meta key and compare argument when getting subscriptions with wcs_get_subscriptions() when ordered by end or trial date. PR#2528 2018.01.29 - version 2.2.17 * Fix: Use line item meta values in a WC version compatible way. PR#2469 * Fix: Only log cache manager messages if the logger has been loaded. PR#2468 * Fix: Init `WC()->mailer()` to make sure our retry email classes are available and loaded. PR#2476 * Fix: Update calls to 'woocommerce_payment_complete_order_status' to include order as 3rd argument. PR#2503 * Fix: Prevent wp_kses from stripping off the allow_clear attribute of Select2 elements. PR#2354 * Fix: Update `woocommerce_cart_totals_coupon_html` filter to include an extra arg introduced in WC 3.0. PR#2447 * Fix: Ensure the Upcoming Revenue report correctly calculates revenue in periods beyond the next payment date. PR#2461 * Fix: [WC3.2] Print the order downloads table in renewal order emails. PR#2522 * Fix: [WC3.3] Replace uses of deprecated `woocommerce_params` with 'woocommerce_get_script_data'. PR#2509 * Fix: [WC3.3] Get the active set of PayPal API credential depending on the gateway mode. PR#2514 * Fix: [WC3.3] Display the filter by customer on the admin subscriptions table. PR#2521 * Tweak: Add Subscriptions template overrides to system status. PR#2422 * Tweak: Do not empty cart when adding additional units of a subscription product when mixed checkout is disabled. PR#2464 * Tweak: Trigger a `do_action` when customers remove and readd line items to their subscription. PR#2458 * Tweak: Untrash subscriptions when parent order is untrashed. PR#2472 * Tweak: Skip the My Account Subscriptions table, linking directly to the subscription if customer only has one. PR#2474 * Tweak: Change the subscription product length/expiration label from 'Expire after' to Subscription length. PR#2483 * Tweak: Reword the Mixed Checkout setting description. PR#2490 * Tweak: Cache user subscriptions to improve performance of limitation queries and user API functions. PR#2388 * Tweak: Pass the `$number` parameter to callbacks hooked onto `woocommerce_subscription_periods` and `woocommerce_subscription_trial_periods`. PR#2520 2017.12.07 - version 2.2.16 * Fix: Update PayPal doc links. PR#2414 * Fix: [WC3.2] Make sure Subscriptions checks if the PayPal credentials have changed on correct hook. PR#2430 * Fix: Only allow subscription line items to be removed from the My Account page when they should be allowed. PR#2440 * Fix: Fix subscription ranges transient key when user has different language/locale than site default. PR#2286 * Fix: Replace use of deprecated function with wc_get_cart_url(). PR#2442 * Fix: Force payment method selection when switching when manual renewals are disabled. PR#2348 * Tweak: Deprecate WC_Subscriptions::add_notice() and WC_Subscriptions::print_notices(). PR#2453 * Tweak: Display "Free" for shipping that costs 0 only. PR#2437 * Tweak: Format PayPal totals as strings when comparing. PR#2271 * Tweak: Improve recurring fee support. PR#2462 2017.11.07 - version 2.2.15 * Fix: Don't include auto-draft subscriptions in the current subscriptions count in reports. PR#2414 * Fix: Reset cart item prorated amounts between calculations to avoid displaying double prorated prices. PR#2413 * Fix: Fix typo in "wcs_api_subscription_updated" hook - previously "wc_api_subscription_updated". PR#2364 * Fix: [WC3.2] Replace use of deprecated function with wc_get_checkout_url(). PR#2421 * Fix: Fix fatal error thrown while copying coupon line item meta between orders and subscriptions. PR#2426 * Tweak: [WC3.2] Add WC tested up to plugin header args. PR#2424 * Tweak: Introduce filter to give third-parties the ability to prevent customers from removing individual subscription line items. PR#2419 2017.11.01 - version 2.2.14 * Fix: [WC3.2] Update use of deprecated cart fee functions to use new APIs introduced in WC 3.2. PR#2397 * Fix: [WC3.2] Ensure line item download links are included in subscription related order emails. PR#2396 * Fix: Copy coupon line items from subscriptions to renewal orders. PR#2374 * Fix: Only apply recurring coupons to subscription products in parent orders #2375 * Fix: Allow for custom field IDs when saving subscription shipping and billing fields. PR#2392 * Tweak: Only save the order once when copying meta data between subscription and order objects - improves performance. PR#2383 * Tweak: Trigger a do_action when an error occurs during the renewal order creation process. PR#2403 * Tweak: Improve PayPal Standard error handling of IPNs which refer to subscriptions created with other systems. PR##2384 2017.10.13 - version 2.2.13 * Fix: Ensure wcs_get_subscriptions() returns the correct results when called with the 'customer_id' and 'product_id' arguments PR#2337 * Fix: Always set the order key when manually creating subscriptions from the admin dashboard PR#2350 * Fix: Delay granting download permissions until after the switch is complete - fixes missing download permissions after a switch PR#2339 * Tweak: Display subscription IDs in date update exceptions PR#2342 * Tweak: Cache the flag used to determine if subscriptions exist for a slight performance improvement PR#2360 * Tweak: [WC3.2] Add support for applying subscription coupon types to subscriptions and orders via admin edit subscription/order screens PR#2371 2017.09.15 - version 2.2.12 * Fix: Add missing argument number to filter for print_switch_link() - fixes PHP Warning: Missing argument 2 for WC_Subscriptions_Switcher::print_switch_link() PR#2266 * Fix: Store decimal price values in dot separated format in the database PR#2242 * Fix: Maintain backwards compatibility by triggering woocommerce_add_order_item_meta hooks when adding line items to a subscription from checkout PR#2267 * Fix: PayPal RT: Fix rounding errors and undefined index notice PR#2216 * Fix: Fix empty needle PHP notice when empty strings are returned from WC()->countries->inc_tax_or_vat() PR#1745 * Fix: Ensure updated subscription billing and shipping names are searchable in admin subscriptions table PR#2278 * Fix: Fix PayPal Standard cancellation IPN handling after paying for a failed PayPal Standard renewal order PR#2284 * Fix: Add the billing interval to trial period expiration to fix issues with calculating Upcoming Recurring Revenue report data PR#2245 * Fix: Allow payment on a subscription's most recent order for all order types not just renewal and/or parent orders PR#2295 * Fix: Ensure switch cart items form a separate recurring cart - switch items are processed through the checkout separately so should have separate recurring carts PR#2313 * Fix: [API] Save the subscription object before updating the dates PR#2308 * Fix: Fix the including of the WCS_Report_Dashboard class to ensure it's only included once PR#2300 * Fix: Never trigger gateway renewal payment hook on a subscription with an ended status PR#2318 * Fix: Only get parent order where a parent id exists PR#2322 * Fix: Set switch order item legacy values property correctly PR#2329 * Fix: Don't throw exception when an old PayPal Standard is suspended after a switch PR#2335 * Fix: Don't duplicate download permissions by checking for pre-existing download permissions on subscription when new download files are added to a product PR#2317 * Fix: Make WCS options translatable PR#2302 * Fix: Add wcs_update_order_item_type() to fix all the order item type change issues PR#2338 * Fix: Only display/add shipping if the recurring cart needs shipping PR#2269 * Tweak: Add a link to the wcs-ipn-failures log file on the failed IPN admin notice PR#2321 * Tweak: Update subscriptions shortcode PR#2306 * Tweak: Group payment method meta in subscription billing metabox by gateway ID PR#2305 * Tweak: Disable subscription report caching after errors PR#2297 * Tweak: Permanently delete subscriptions when an order is deleted PR#2288 * Tweak: Add wcs_renewal_order_payment_update_date_created filter PR#2289 * Tweak: Update WooCommerce.com support form links PR#2291 * Tweak: Refactor WC_Subscriptions_Manager::prepare_renewal() and add process_renewal() PR#2280 * Tweak: Apply Select2 to country fields on Edit Subscription screen PR#1745 2017.08.01 - version 2.2.11 * Fix: Do not save subscription product meta data on other post types, including WooCommerce Tab Manager and Jetpack post types. PR#2203 * Fix: Do not apply 'woocommerce_get_price' or 'woocommerce_product_get_price' filters to tax inclusive/exclusive prices to avoid ever applying them twice or to non price prices, like sign-up fees. Introduced in Subscriptions v2.2.5. PR#2261 * Fix: Copy custom and third-party order line item meta to cart line items during the renewal/resubscribe process so that the meta persists on the renewal/resubscribe orders and subscription. PR#2258 * Fix: Always use correct minimum variation price when generating variable price HTML, even if there is a free trial on one variation. PR#2254 * Fix: Never apply 'woocommerce_order_formatted_line_subtotal' filter twice. PR#2239 * Fix: Format plain text email for Subscription renewals correctly. PR#2255 * Tweak: Add Woo plugin header to be compatible with WooCommerce 3.1's updater. PR#2252 * Tweak: Add base composer.json for using Subscriptions with Composer. PR#2229 2017.07.20 - version 2.2.10 * Fix: Do not attempt to call WC 3.0 only method when WC 2.6 is active by fixing version check from 2.6 to 3.0. Props @lkraav. PR#2236 * Fix: Display "Limit Subscription" option on Edit Product screen even when Reviews are disabled. PR#2233 * Fix: Hide "from" price html string if all variations have identical price and billing schedule. PR#2142 * Fix: Guard against proration miscalculation in double switching within one billing period. PR#2225 * Tweak: Log old version and WooCommerce versions on update. PR#2230 2017.07.12 - version 2.2.9 * Fix: WooCommerce 3.1: Notices when loading the WooCommerce > Subscriptions administration page. PR#2206 * Fix: WooCommerce 3.1: Notices on cart redrection hook becuase of use of 'add_to_cart_fragments' hook. PR#2221 * Fix: WooCommerce 3.0: Fix download links in first (processing order) email. PR#2185 * Fix: WooCommerce 3.0: Repair subscriptions with missing _contains_synced_subscription meta not set when WooCommerce 3.0 was active with Subscriptions 2.2.0 through to 2.2.7. PR#2183 * Fix: WooCommerce 3.0: Fix inactive role being assigned to users when subscriptions are suspended with WooCommerce 3.0. PR#2195 * Tweak: New hook to allow feees to be modified on renewals and resubscribes: 'woocommerce_adjust_order_fees_for_setup_cart_for_renewal'. PR#2208 * Tweak: Truncate cache files after a threshold (50MB) to avoid growing indefinitely. PR#1774 * Fix: Set default recurring shipping method when initial shipping method is not available in the recurring options. PR#2214 * Fix: Get active price instead of only subscription price product meta to honour sale prices. Fixes prorated switching costs as well as incorrect price being displayed for variable products where one variation was cheaped because it was on sale. PR#2215 * Fix: Allow payment on only most recent order relating to a subscription that is pending payment to avoid assorted issues stemming from paying for older orders. PR#2209 * Fix: Remove old PayPal IPN payload handling to match changes in WooCommerce 3.1.1 and fix potential exploit. PR#2220 * Fix: Fix default value for product limitations for products which do not have the product limitation value saved or set on them. PR#2219 * Fix: Ignore URL scheme in duplicate site check to avoid incorrectly identifying site as a staging site with v2.2.8 when running on a site with WP_SITEURL set, but being overridden, either by a host like WP Engine, or by some other constant, like FORCE_SSL_ADMIN. PR#2227 2017.06.22 - version 2.2.8 * Fix: WooCommerce 3.0: Update use of deprecated 'woocommerce_stock_html' filter by using new wc_get_stock_html() method. PR#2175 & PR#2193 * Fix: Make sure subscriptions suspended at PayPal.com are also correctly suspended in WooCommerce. PR#2199 * Fix: Do not display manual gateways when paying for failed renewal with an automatic retry. PR#2177 * Fix: Compare the site URL stored by Subscriptions against the WP_SITEURL constant when that constant is set, instead of always comparing against the 'siteurl' option value. PR#2167 * Fix: Apply discounts from renewal orders rather than subscriptions for renewal carts so that any code or manual application of a discount to the renewal order is applied correctly. PR#2156 * Fix: Do not cancel auto-draft subscriptions before post deletion as they do not need to be cancelled and cancellation emails can cause confusion. PR#2173 * Fix: Add 3rd param to 'woocommerce_order_item_name' filter calls to make sure they match parameters on WooCommerce filters. PR#2159 * Fix: Only return parent product IDs if a parent product exists. Fixes broken switch URLs for grouped products. PR#2160 * Fix: Update subscription payment method when renewal has been paid and has pending status and retry. PR#2141 * Fix: Make sure trial calculations for synced variation products are correct with PayPal Standard. PR#2168 * Fix: Set correct PHPDoc for returned type in WC_Subscription::get_parent(). Props @davefx. PR#2169 * Fix: Set correct PHPDoc return type in wcs-renewal-functions.php. PR#2198 * Fix: Copy custom, non-prefixed, subscription meta data to renewal orders. PR#2157 * Fix: Take sale price into account when displaying "From" price for variable products. PR#2176 * Fix: Take sale price into account when switching. PR#2171 * Fix: Fix undefined var $switched_subscriptions. PR#2192 2017.05.26 - version 2.2.7 * Tweak: Integrate with My Account > Payment Methods actions to make sure when a customer deletes a payment method, subscriptions using that payment method are automatically updated to use a different token. Or if there are no other payment methods on the customer's account, a customer can't delete the payment method used for automatic payments. PR#1866 * Tweak: Do not display 'Free' on free shipping methods to improve compatibility with the approached used in WooCommerce 2.6 and newer. PR#1766 * Tweak: Call 'wcs_get_retry_rule_raw' even if no rule is defined so that it can be used to add additional rules beyond default rule set. PR#2138 * Tweak: Do not get products for non product post IDs to save performance overhead. PR#2034 * Fix: WooCommerce 3.0: Repair pending cancelled subscriptions that have not got a scheduled action or been correctly transitioned to cancelled as part of the 2.2.7 upgrade process. PR#2129 * Fix: WooCommerce 3.0: Fixes infinite loops when using a coupon for manual renewal via cart by storing coupon properties rather than full coupon objects in the session. PR#2116 * Fix: WooCommerce 3.0: Fix updating a subscription address after paying manual renewal that uses a different address to avoid addresses being incorrectly deleted and not udpated. PR#2145 * Fix: Register subscription report scripts on top level Reports admin screens for uses without store manage capability, but with capability to view reports. PR#2153 * Fix: Make sure login is required when purchasing subscriptions products and "Registration on checkout" is disabled. PR#1822 * Fix: Use more than 'ipn_track_id' for different PayPal IPN messages now that PayPal has suddently begun to use the same 'ipn_track_id' for different IPN messages. PR#2090 * Fix: Trigger order.created webhook when creating renewal orders by Subscriptions with WC < 3.0. PR#1793 * Fix: Lookup one time shipping setting value on the parent product on variations rather than on the variations to make sure we find the correct value. PR#2125 * Fix: Do not cancel subscriptions that are not using PayPal as the payment method when a PayPal Billing Agreement is cancelled (including subscriptions using manual renewal). PR#2127 * Fix: Allow single payment subscriptions to be cancelled by customer if that single payment is still in future (because there was a free trial). PR#2060 * Fix: Avoid errors by making sure deleted subscriptions are not returned in set of switched and users subscriptions by respective functions for getting those subscriptions. PR#2075 and PR#2131 * Fix: Change Edit Subscriptions admin screen "This order is no longer editable" text to avoid confusion. PR#2128 * Fix: Do not ignore variations with empty prices during min/max calculations to improve compatibility with 3rd party plugins, like Name Your Price. PR#2120 * Fix: Check status can be changed on payment failure to avoid throwing exceptions/errors when the status can't be changed, which is also almost always signifies that the status doesn't need to be changed to reflect the failure. PR#2140 * Fix: Make it is possible to change payment method to PayPal Standard for subscriptions imported or manually added (meaning they do not have a parent order). PR#1956 * Fix: Restore previous v3 customer/{id}/subscriptions response structure to REST API. PR#2150 * Fix: Add support for filtering subscriptions by customer ID in v3 legacy REST API. PR#2144 * Fix: Show General tab for variable subscription product edit page on page load. PR#2044 * Fix: Delete the retry date after subscription status changed. PR#2143 2017.05.05 - version 2.2.6 * Fix: WooCommerce 3.0: Guard against infinite loops caused by 3rd party code calling order methods with a post object by making sure we have an order object, not just an object. PR#2100 * Fix: WooCommerce 3.0: Improve compatibility with 3rd party code that adds custom address fields by making sure we check address method is callable before calling it, and falling back to meta data if that method doesn't exist. PR#2102 * Fix: WooCommerce 3.0: Set correct line item meta names when paying for a renewal or resubscribe order by not relying on WooCommerce 3.0's array access implementation. PR#2105 * Fix: WooCommerce 3.0: Assorted issues with dates not being scheduled and/or not being set at the correct time when running WooCommerce 3.0 by making sure we only save date properties after updating or deleting dates rather than also saving status transitions. PR#2091 * Fix: WooCommerce 3.0: Match WooCommerce 3.0 approach to adding variation attributes to cart/order line item name by making sure we use the line item name rather than product title to alter renewal cart item names. PR#2109 * Fix: WooCommerce 3.0: Match WooCommerce 3.0 filters for sign-up fee prices. Fixes compatibility with sign-up fees and Memberships. PR#2110 * Fix: Make sure a variable product is purchasable even if the variations tab wasn't loaded before saving the product, and make sure we sync the variable product's prices even if the variation's tabe wasn't loaded. PR#2111 * Fix: Make sure subscription is seen as having a zero total when customer completes the Change Payment Method flow to avoid charging anything at the time of changing payment method. PR#2082 * Fix: Fix resubscribing to products for 1 payment cuased by inconsistent variable type being returned by WC_Subscription::get_billing_interval(). PR#2098 * Fix: "Trying to get property of non-object" notice by checking order_type property exists before trying to access it. PR#2099 * Fix: Correct subscription variation field alignmenton WooCommerce > Edit Product screen. PR#2104 * Tweak: Improve upgrade logging by recording version at upgrade and not deleting logs after 6 weeks so we can trace time and day of upgrades in support and better diagnose issues. PR#2070 * Tweak: Adds more flexibility to next payment date recalculation on activation of a subscription with new 'woocommerce_subscription_activation_next_payment_date_threshold' hook. PR#1860 * Tweak: Improve when variations are saved by moving them to save on the 'woocommerce_save_product_variation' hook. PR#2111 * Tweak: Update Action Scheduler to v1.5.3. PR#2113 2017.04.21 - version 2.2.5 * Fix: WooCommerce 3.0: Only call get_id() if product is an object and has not been deleted. PR#2071 * Fix: WooCommerce 3.0: Do not attempt to access WC()->payment_gateways->payment_gateways() when reading the subscription object and setting the payment method, because there is no guarantee WC() will be setup yet (and we only need to do it when the method is called not when it is being instantiated. PR#2084 * Fix: WooCommerce 3.0: Do not set payment method title in set payment method function when instantiating subscription (i.e. prior to it being read). PR#2084 * Fix: WooCommerce 3.0: Calculate the next payment date using either last order paid date or the last order date, whichever is the later, to maintain backward compatiblity with versions prior to WooCommerce 3.0 support. PR#2087 * Fix: WooCommerce 3.0: Replace use of deprecated WooCommerce function removed in WC 3.0. PR#2088 * Fix: PHP 7.1 notices with products with empty signup fees and other properties after WooCommerce 3.0 changes for getting meta on products. PR#2064 * Fix: Allow dynamically setting properties on a subscription via WC_Subscription::__set() for backwards compatibility. PR#2079 * Fix: Do not validate admin payment method changes which will not result in a change to allow for changing meta on a payment method that is not active. PR#2085 * Tweak: Add wc_input_price class to subscription product price inputs to make sure they use decimal separator and other store settings for validation. PR#2068 2017.04.12 - version 2.2.4 * Fix: WooCommerce 3.0: Correctly handle switching between grouped products in WooCommerce 3.0 where a product can have more than one parent grouped product. PR#2063 * Fix: Do not incorrectly create pending renewal orders and suspend PayPal Standard Subscriptions at the time their payment is due. PayPal controls the billing schedule for these subscriptions. PR#2069 * Tweak: Add 'woocommerce_subscriptions_order_type_dropdown' filter. PR#2065 * Tweak: Include only Subscriptions strings in POT file. 2017.04.07 - version 2.2.3 * Fix: WooCommerce 3.0: Improve backward compatibility of get_date( 'start' ) calls for subscriptions without a date created set by WooCommerce 3.0 (which happens when manually adding a new subscriptions). PR#2047 * Fix: WooCommerce 3.0: Prevent saving subscriptions with a 0 start date/date created by making sure we set a default date created value when manually adding a new subscription. PR#2048 * Fix: WooCommerce 3.0: Remove the correct 3.0 core function responsible for sending order emails to avoid sending both WooCommerce order emails and Subscriptions order emails. PR#2045 * Fix: WooCommerce 3.0: Make sure synchronised product meta data is set correctly on subscription line items by using WooCommerce 3.0 compatible hook. PR#2049 * Fix: Make sure filters are applied when getting customer subscriptions with REST API endpoints by using WC_API_Subscriptions::get_subscriptions() instead of a custom query to get customer subscriptions. PR#1806 * Fix: Display correct variable subscription product "From" prices and grouped subscription products prices to match tax settings. PR#2054 * Fix: Don't attempt to save shipping and billing fields which aren't set when submitting the Edit Subscription screen to avoid notices. PR#2053 * Fix: Don't use method return value in write context in REST API to avoid errors on certain versions of PHP. PR#2051 2017.04.04 - version 2.2.2 * Fix: WooCommerce 3.0: Fix using $this when in a static context on newer versions of PHP affecting Edit Subscription and Edit Order screens. PR#2043 * Fix: WooCommerce 3.0: Grant new product download permissions to all subscriptions because WooCommerce no longer does it for orders (and subscriptions are a custom order type). PR#2039 * Fix: WooCommerce 3.0: Display subscription related System Status fields in the System Status page on 3.0 which removed old hooks. PR#2039 * Fix: WooCommerce 3.0: Fix updating payment method and elsewhere via the Edit Subscription administration screen. PR#2037 * Fix: WooCommerce 3.0: Store correct prorated price for switches against the order line item so it can be used for future switches. PR#2032 2017.04.04 - version 2.2.1 * Fix: WooCommerce 3.0: Add subscription shipping line item tax the same way WooCommerce 3.0 does it. PR#2023 * Fix: WooCommerce 3.0: Fix division by zero error when manually paying for renewal with offsite payment methods like PayPal. PR#2036 * Fix: Send customer renewal invoice emails for manual renewals and when creating a pending renewal. PR#2035 * Fix: Replace use of undefined variable within WC_Subscription::get_failed_payment_count(). PR#2025 2017.04.03 - version 2.2.0 * WooCommerce 3.0 Compatibility Release * Tweak: add new getters for subscription related product meta data to conform to WooCommerce 3.0's new CRUD system and also prepare for subscription related product meta data to be moved to schemes that can be applied to any product instead of only subscription product types * Tweak: add new subscription data store to abstract data storage of subscription data from the subscription class, matching WooCommerce 3.0's new approach to data abstraction. * Tweak: add new subscription getters and setters for all subscription data to conform to WooCommerce 3.0's new CRUD architecture * Tweak: add new subscription date APIs to work with dates as date/time objects and with nomclementure that aligns with WooCommerce 3.0 * Tweak: deprecate subscription last payment date APIs because they actual returned the last order date, forcing us to also update the last order date whenever a payment was processed. Two new APIs can now be used: last order date and last order date paid. * Tweak: improve variable subscription product sync performance by using cache. Also align it with the approach WooCommerce takes. * Tweak: update Select2 to version 4 to work with the version used by WooCommerce 3.0. * Tweak: show recurring fees in the recurring totals section on Cart & Checkout pages if 3rd party extensions, like Checkout Add Ons, are adding fees to recurring carts. (PR#2005) * Fix: don't show Subscription Data metabox title div on WooCommerce > Edit Subscription administration screen with WordPress 4.4. (PR#1998) * Fix: remove option to order the WooCommerce > Subscriptions administration screen by Status, because this option is not supported. (PR#1996) 2017.03.06 - version 2.1.4 * Tweak: Lengthen PayPal IPN lock to 5 days to prevent creating duplicate renewal orders when a fatal error occurs in processing the IPN. Prevoiusly the lock was set to 5 minutes, meaning on the 2nd IPN would be ignored. Given fatal errors will rarely be fixed within 5 minutes, Subscriptions will now ignore 5 days worth of IPN retries.(PR#1838 * Tweak: Log exceptions caught while updating subscription statuses to make it easier to diagnose issues with 3rd party code and hosting environment that occur during status transitions. PR#1842 * Tweak: Remove lingering compatibility code for WooCommerce prior to version 2.4 as version 2.3 and older have not been supported since v2.1. PR#1750 * Fix: Changing payment method on manually added subscriptions. When manually creating a subscription via the WooCommerce > Add Subscription administration screen, make sure the order key meta data is set so its available when changing payment methods on that subscription. PR#1849 * Fix: Make sure customer and admin retry emails are always sent after the initial retry by making sure the WooCommerce mailer has be setup. PR#1840 * Fix: Do not suspend subscriptions using PayPal Standard as the payment method when switching using PayPal Reference Transactions as the payment method. PR#1831 * Fix: Calculate correct next payment date for subscriptions suspended for more than 30 billing periods e.g. 1 month for a daily subscription, 2.5 years for a month subscription etc. PR#1846 * Fix: Do not update the status of a failed or pending renewal order when changing the payment method on a subscription. PR#1720 * Fix: Make sure free shipping is available as a recurring shipping method for subscription products with a free trial or synced to a date in the future if the recurring total exceeds the Minimum Order Amount required for free shipping. PR#1830 * Fix: Do not incorrectly double slash some JavaScript file URLs. Fixes JavaScript on the WooCommerce > Edit Subscription administration screen with some hosts. PR#1853 * Fix: Do not copy backorder line item meta data to subscriptions or renewal orders for in-stock products. PR#1855 * Fix: Do not apply dynamic discounts from the WooCommerce Dynamic Pricing extension to renewal or resubcribe carts to avoid discounts being compounded when manually renewing or resubscribing. PR#1852 * Fix: Do not switch to staging mode when site is using the WP_SITEURL constant to set the site URL to a value that differs to the URL stored in the database. Uses WP_SITEURL constant now for site url when it is set, and get_site_url() only its not set. PR#1717 * Fix: Correct typo on the Customer Suspensions tooltip on the WooCommerce > Settings > Subscriptions > Miscellaneous administration screen. PR#1868 * Fix: Only setup automatic payments after switching if automatic payments are enabled. PR#1865 2017.01.24 - version 2.1.3 * Tweak: Set renewal order's status to 'pending' before payment retry to make sure that the status change hooks are triggered by WC_Order::update_status(). Fixes compatibility with custom retry rules that use an order status other than pending. (PR#1818) * Tweak: Automatically transition resubscribe orders for $0 to 'complete' rather than 'processing', because the existing subscription had the pending-cancellation status and the new subscriptions first renewal will be when the first shipment is due to be sent. (PR#1796) * Tweak: Update Action Scheduler to v1.5.2. (PR#1773) * Tweak: Exclude Action Scheduler comments from comments RSS feed. (PR#1773 & Prospress/action-scheduler#66) * Fix: Never reschedule single actions in Action Scheduler, even if the action has a scheduled date in the future. Fixes a duplicate payment processed when PHP's default timezone was being set to a time other than UTC, and Subscriptions < 2.1 scheduled the next payment in that timezone, then when the payment becomes due, PHP's default timezone has been changed back to UTC. (PR#1773 & Prospress/action-scheduler#69) * Fix: Update renewal order line item cart data when renewal line item IDs are updated. Fixes assorted PHP warnings and notices that resulted from outdated item IDs, including "Division by zero" and "Undefined offset" notices. (PR#1814) * Fix: Cancel & trash retries when corresponding renewal order is trashed/deleted to make sure the retry is not attempted (with no ill effect). (PR#1768) * Fix: Undefined variable notice on occasion when viewing WooCommerce > Add Order screen when the retry system is enabled. (PR#1803) * Fix: Display correct "New Subscription Details" in emails sent when switching (upgrading/downgrading) a subscription. (PR#1819) * Fix: Responsiveness of recurring totals sections of checkout table. (PR#1809) 2016.12.12 - version 2.1.2 * Tweak: Reword the description on the Disable Automatic Payments option to make it clear it does not change existing subscriptions. (PR#1771) * Fix: Renewal issues with servers running Memcached, which does not handle expiration times greater than 30 days, by no longer using TLC transients, which sets all transient expiration dates to 1 year in future. (PR#1776) * Fix: Do not require InnoDB/SQL transactions for switching. Fixes "The original subscription item being switched cannot be found" errors when a customer attempts to upgrade or downgrade on servers without InnoDB active. (PR#1779) * Fix: Pass entire product object from cart to check whether it is a subscription when removing subscription products from the cart. Fixes compatibility with 3rd party extensions with custom subscription product types. (PR#1778) * Fix: Make sure all 'woocommerce_valid_order_statuses_for_payment' calls include an order object as the 2nd parameter for callbacks to match current WooCommerce behaviour. (PR#1789) * Fix: Incorrect template displayed when browsing to a page with URL /subscriptions/ when using WooCommerce prior to version 2.6. (PR#1660) * Fix: Do not add '_synced' to recurring cart keys if 3rd party code is calling calculate totals again, only add it once. (PR#1780) * Fix: Display "Retry Payment" option in the "Order Actions" menu if the payment is due, even if the order has a status applied by customer Retry Rules. (PR#1767) * Fix: Compatibility with switching and WPML. (PR#1780) 2016.11.26 - version 2.1.1 * Tweak: Delete Subscriptions transients when using the "Clear Transients" tool via the WooCommerce > System Status > Tools administration screen. (PR#1758) * Tweak: Avoid infinite loops with old versions of the Shipping Multiple Addresses extension and potentially other extension that may manually instantiate the WC_Checkout object, which is normally a singleton accessed via WC()->checkout, WC()->checkout or WC_Checkout::instance(). (PR#1757) * Tweak: When a subscription's date or status is updated, unschedule all corresponding scheduled actions, not just the first to ensure duplicate scheduled actions that may have been added by 3rd party code or manually are also unscheduled. (PR#1764) * Fix: Do not require timestamps to be an integer in some date functions to fix issues where a string representation of a timestamp is used. Fixes issues with PayPal Standard Checkout & compatibility with the Groups for WooCommerce extension. (PR#1763) 2016.11.12 - version 2.1.0 * New: Subscription Reports to get insights into the performance of your subscription business: https://docs.woocommerce.com/document/subscriptions/reports/ * New: Failed Recurring Payment Retry System to help recover revenue that would otherwise be lost: https://docs.woocommerce.com/document/subscriptions/failed-payment-retry/ * New: More subscription emails to help you keep on top of important events, like customer suspension and expiration: https://docs.woocommerce.com/document/subscriptions/version-2-1/#section-4 * New: Cancellation date to keep track of when customers cancel subscriptions, not just when they end after being cancelled: https://docs.woocommerce.com/document/subscriptions/version-2-1/#section-5 * New: Allow resubscribing to subscriptions Pending Cancellation: https://docs.woocommerce.com/document/subscriptions/version-2-1/#resubscribe-to-subscriptions-pending-cancellation * New: REST API Endpoints for Subscriptions built on WordPress REST API infrastructure: https://docs.woocommerce.com/document/subscriptions/version-2-1/#wp-rest-api-endpoints * New: Additional order type filters on the WooCommerce > Orders administration screen to filter orders to show only subscription parent, renewal, resubscribe or switch orders: https://docs.woocommerce.com/document/subscriptions/version-2-1/#additional-order-type-filters * Tweak: Always use Renewal Order totals and data for renewal payments, making it possible to easily add one-time fees or discounts to renewals: https://docs.woocommerce.com/document/subscriptions/version-2-1/#renewal-orders-always-used-for-renewal-data * Tweak: Improved responsiveness and layout of the subscription pricing fields on the Edit Product screen: https://docs.woocommerce.com/document/subscriptions/version-2-1/#edit-product-interface-improvements * Tweak: Use renewal order/subscription addresses as the default address fields loaded on checkout for renewal, resubscribe and switch checkouts. https://docs.woocommerce.com/document/subscriptions/version-2-1/#use-renewal-order-or-subscription-address-on-checkout * Tweak: Process switches (upgrades and downgrades) on order status change instead of when the customer completes checkout: https://docs.woocommerce.com/document/subscriptions/version-2-1/#process-upgrades-and-downgrades-on-order-status-change * Tweak: Small performance improvements by no longer calling deprecated hooks and caching some queries: https://docs.woocommerce.com/document/subscriptions/version-2-1/#performance-improvements * Tweak: Apply add-to-cart validation to renewals and resubscribes (using the 'woocommerce_add_to_cart_validation' hook): https://docs.woocommerce.com/document/subscriptions/version-2-1/#add-to-cart-validation-applied-to-renewal-and-resubscribe-process * Tweak: Link to the My Account > Subscriptions page on the Order Received/Thank you page when using WooCommerce 2.6 so that the customer can see all their subscriptions if they purchased multiple subscriptions in the transaction. * Tweak: Use the 'pay_for_order' user capability check to determine whether a user can pay for a renewal and resubscribe rather than checking their ID against the customer ID on the subscription. (PR#1692 / PR#1716) * Tweak: Increase next payment date threshold for end date to safeguard against payments being processed on the last day of a subscription. (PR#1689) * Tweak: Only check for PayPal Reference Transaction support once per week instead of daily. * Tweak: Consistently use the same tooltips in the store admin area as WooCommerce. * Tweak: Initiate auto-switch process when loading the Grouped product page. (PR#1641) * Tweak: New 'woocommerce_subscriptions_after_recurring_shipping_rates' hook. * Tweak: Update scheduling system (Action Scheduler) to version 1.5. * Fix: Do not create new orders when processing a renewal and resubscribe payment with different details to the original order by ensuring the cart hash used by WooCommerce is updated when creating the order. (PR#1687) * Fix: Prevent My Account > Subscriptions endpoint page title overriding custom menus and other items on the page calling 'the_title' filter. (PR#1737) * Fix: Do not change the status of subscriptions using PayPal Standard when the request to update the status at PayPal.com fails because of incorrect API credentials. (PR#1743) * Fix: Display incorrect PayPal API credentials notice after a status change request or reference transaction check returns incorrect credentials error. (PR#1743) * Fix: Calculate switching next payment date calculations for a free product to a non-free product correctly. (PR#1661) * Fix: Process renewals with PayPal Reference Transactions correctly when the ALTERNATE_WP_CRON constant is defined. (PR#1733) * Fix: Prevent grouped subscription products being switched to non-subscription product in the same grouped product. (PR#1666) * Fix: Treat empty subscription suspension count option value as 0, meaning no suspensions are allowed. (PR#1728) * Fix: Only attempt to get paid renewal orders if there are renewal orders. (PR#1718) 2016.09.23 - version 2.0.20 * Tweak: add new 'woocommerce_subscription_before_actions' and 'woocommerce_subscription_after_actions' hooks to the view-subscription.php template. (PR#1608) * Tweak: use WC_Subscriptions_Product::is_subscription() when checking if a product is sync'd instead of checking the product type directly so that the 'woocommerce_is_subscription' filter is applied and additional product types can add support for synchronisation. (PR#1635) * Tweak: warn administrators when trashing subscription parent orders from row actions that the related subscriptions will also be trashed. (PR#1647) * Tweak: add new 'woocommerce_subscriptions_admin_related_orders_to_display' filter to make it easier to manipulate the list of related orders on the Edit Subscription and Edit Order screens. (PR#1631) * Tweak: add new 'woocommerce_subscriptions_switch_is_identical_product ' filter provide a simple way for 3rd party extensions to determine whether a product should be considered as identical or not, for the purposes of a switch. (PR#1659) * Tweak: add new 'wcs_paypal_ipn_note' filter to make it easier to modify the order notes logged when processing PayPal IPN requests. @props David MarÃn (PR#1657) * Tweak: display a link to Paypal's subscription page in the Subscription Billing Information section of the Edit Subscription administration screen. @props David MarÃn (PR#1658) * Fix: display tax correctly for carts with only sync/trials products. (PR#1599) * Fix: calcaulte tax correctly for prorated sign-up fee during 2...n switch. (PR#1607) * Fix: remove duplicate call to get items from a subscription on the view-subscription.php template. (PR#1615) * Fix: guard against fatal errors when 3rd party code calls WordPress' current_user_can() function with invalid parameters. (PR#1652) * Fix: replace show_hidden_panels Javascript function which was inadvertently displaying 3rd party panels on Edit Product screen. (PR#1637) * Fix: add the chosen recurring shipping method variable to the parameters passed to callbacks on 'woocommerce_subscriptions_after_recurring_shipping_rates'. (PR#1643) * Fix: make sure non-logged in users can buy limited subscriptions by avoiding the call to get_posts() in wcs_get_users_subscriptions() when no user ID is specified and no user is logged in. (PR#1649) * Fix: recalculate free shipping availability based on recurring cart object when applicable to fix issues with free shipping being available for the initial order but not recurring order, either becuase of price requirements or coupons. (PR#1549) * Fix: make sure 'woocommerce_scheduled_subscription_end_of_prepaid_term' hook is unscheduled when a subscription with the pending cancellation status is trashed. (PR#1589) * Fix: only get downloadable files from directly related subscriptions, not old subscriptions for subscriptions created by resubscribing. (PR#1612) * Fix: variable subscription "From:" price when one variation with a higher ID has a longer free trial than the lower priced variation. (PR#1602) * Fix: remove unused "Email Subject (paid)" and "Email Heading (paid)" fields from the Customer Renewal Invoice email settings page. (PR#1601) 2016.08.12 - version 2.0.19 * Tweak: require new manually added subscriptions to have a customer to avoid issues with subscriptions created without a customer. (PR#1486) * Tweak: set expiration on caching transients to avoid them being autoloaded on every request and unnecessarily using memory on those requests. (PR#1540) * Fix: update Action Scheduler to apply timezone fixes and avoid dupilcate payments when a store's timezone is changed: https://github.com/Prospress/action-scheduler/pull/43 (PR#1569) * Fix: incompatibility with WooCommerce 2.6.2+ which prevented the General tab on the WooCommerce > Edit Product administration screen from being displayed correctly. (PR#1571) * Fix: shipping rate caching introduced in v2.0.18 for carts containing only products which are synchronised or have a free trial. (PR#1584) * Fix: displaly appropriate notice when there is no recurring shipping method available because the customer's location has not been set. (PR#1579) * Fix: page title conflict with bbPress subscription pages. (PR#1581) * Fix: undefined index error when using variation bulk actions (PR#1561) * Fix: redirect loop on product page when auto-switching a limited subscription that is on-hold. (PR#1557) * Fix: issues on WP Engine and potentially other hosts when filtering orders displayed on the WooCoommerce > Orders administration screen to only show renewal orders as a result of WP Engine limiting query length. (PR#1555) * Fix: undefined variable notice when checking if a product is limited. (PR#1552) 2016.07.22 - version 2.0.18 * Tweak: cache shipping package rates to prevent multiple re-calculations per request. (PR#1485) * Tweak: remove multiple, redundant calls to $subscription->get_items() and WP_Posts_List->__construct() on admin subscriptions screen. (PR#1524) * Tweak: support translation for subscription shortcode. (PR#1504) * Tweak: add new 'woocommerce_subscriptions_after_recurring_shipping_rates' hook after displaying recurring shipping rates. (PR#1517) * Tweak: use default nonce action for change payment URL so 3rd party code can use custom URLs is needed. (PR#1529) * Tweak: remove duplicate PayPal log calls. (PR#1527) * Tweak: slightly improve efficiency of wcs_can_user_resubscribe_to(). (PR#1501) * Tweak: refactor wcs_user_has_subscription() to accept an array for statuses. (PR#1496) * Tweak: update _paid_date post meta flag for manual / failed payment original / renewal orders. (PR#1488) * Tweak: use WooCommerce's decimal place setting for rounding switch prorations. (PR#1483) * Fix: recurring coupons with WooCommerce 2.6.3 (issue does not exist with WC 2.6.2 or 2.6.4+). (PR#1546) * Fix: grant new product download file permissions to existing subscriptions for product which were not marked as downloadable or did not have downloadable files associated with them at the time the subscription was created. (PR#1533) * Fix: show cancel button for on-hold subscriptions with empty next payment. (PR#1515) * Fix: select the correct way to apply tax rates based on the 'woocommerce_adjust_non_base_location_prices' filter. (PR#1500) * Fix: display price string for one payment subscriptions consistently between cart/checkout and my account. e.g. display "$100 for 1 year" everywhere, instead of "$100 for 1 year" on cart/checkout and "$100 / year" on My Account. (PR#1451) * Fix: do not allow a customer with an active and cancelled subscription to a product limited to active status to resubscribe to the inactive subscription. (PR#1482) * Fix: updates resubscribe button displayed on the limited simple subscriptoin product pages text from the old "Renew" terminology. (PR#1487) * Fix: calculate correct renewal/resubscribe cart item taxes rates. (PR#1476) * Fix: honour chosen shipping method as default method. (PR#1480) * Fix: remove the mock trial added to switches with no prorated inital switch costs when creating the grouping key dates to fix incorrect "the next_payment date must occur after the trial end date" error in the rare case where the first renewal payment for the new subscription is scheduled less than 1 billing period in the future. (PR#1519) * Fix: always allow subscription status updates while processing PayPal IPNs to avoid issues when processing renewals for PayPal accounts issuing out-of-odate subscription IDs that begin with S-. (PR#1526) * Fix: responsiveness of Subscriptions administration screen list table to improve display on small screens. (PR#1502) * Fix: do not use variable references ot fix 'nested by-reference foreach loop' notice with PHP7. (PR#1522) * Fix: tab order of billing period and interval on Edit Product screen for subscription variations. (PR#1543) * Fix: deviation calculations in wcs_estimate_period_between(). (PR#1455) 2016.06.24 - version 2.0.17 * Tweak: add support for bulk editing subscription variation prices using relative increase or decrease from existing price (either fixed amount or per cent). (PR#1425) * Tweak: use filterable helper function when validating switch request to improve compatibilty with Name Your Price and other plugins. (PR#1453) * Tweak: require payment when switching from $0 / period subscriptions to a non-zero / period subscription if the store is not disabling automatic payments so that future payments on the new subscription can be processed automatically. (PR#1420) * Tweak: use new WooCommerce 2.6 hook to load the View Subscription template to so the view-subscription.php template does not require addition WC version checks. (PR#1459) * Tweak: add tooltip to the next payment date displayed on the Subscriptions administration screen to indiciate that the date is only a guide when the payment gateway controls the billing schedule (like PayPal Standard). (PR#1445) * Fix: make sure PayPal Standard subscriptions are cancelled at PayPal when switching a subscription with PayPal Standard as the payment method but using a different payment method for the switch transaction. (PR#1419) * Fix: do not generate a renewal order for the PayPal Standard IPN message for $0.01 payments, which is used to get two trial periods on a subscription to align a synchronised payment date, not to actually process a $0.01 payment. (PR#1413) * Fix: calculate correct next payment date when paying for old failed or manual renewal orders by updating the post dates on the order when the order's status is changed to indicate payment is completed. (PR#1435) * Fix: do not reduce stock for initial order of synchronised products when no initial payment (like sign-up fee or prorated amount) is charged, as nothing is shipped for that order. (PR#1438) * Fix: use new WooCommerce 2.6 hook to load the View Subscription template to prevent a PHP notice about deprecated my-account.php template. (PR#1459) * Fix: provide empty default when accessing chosen shipping methods from the session to fix 'Invalid argument supplied for foreach()' PHP notice when no default shipping method is set. (PR#1456) * Fix: update subscriptions using PayPal Reference Transactions to "pending-cancelation" status rather than "cancelled" when a PayPal Billing Agreement is cancelled to account for pre-paid time. (PR#1468) * Fix: escape the style attribute for synchronisation fields on the Edit Product screen correctly to avoid escaping attribute quotes. (PR#1464) * Fix: do not allow switching using PayPal Standard as the payment method for the switch. (PR#1461) * Fix: do not unnecessarily copy switch related line item meta data to renewal orders. (PR#1423) * Fix: display correct order date on hover in the Related Orders meta box. (PR#1442) 2016.06.10 - version 2.0.16 * Tweak: display recurring shipping selection fields on cart page instead of notice to select recurring shipping on checkout page (when unique recurring shipping methods are required). (PR#1431) * Tweak: update cart hash creation for latest logic used in WooCommerce 2.6. (PR#1426) * Tweak: throw an exception if a scheduled next payment or expiration hook is triggered for a subscription ID that no longer exists (due to a corrupted database). (PR#1429) * Tweak: add order type parameter to WC_Subscription::get_last_order() so it can be used to return switch orders. (PR#1398) * Fix: only validate recurring shipping for carts that have future recurring payments. (PR#1440) * Fix: trigger subscription.created webhook for subscriptions purchased via checkout. (PR#1428) * Fix: function declaration incompatible with WooCommerce 2.6 release candidate (specifically: WC_Subscription::set_payment_method()). (PR#1434) * Fix: duplicate My Account navigation with WooCommerce 2.6 release candidate. (PR#1437) * Fix: incorrect recurring shipping amount being applied to subscription products that do not require recurring shipping if a product with an identical billing schedule that required shipping was added then removed from the cart. (PR#1394) * Fix: remove unused global variable in WCS_Query. (PR#1424) * Fix: remove redundant in_the_loop() call in WCS_Query. (PR#1424) 2016.05.28 - version 2.0.15 * Tweak: WooCommerce 2.6 Compatibility. * Tweak: with the upcoming WooCommerce 2.6, add a Subscriptions tab to the My Account tabs and display subscriptions on that page instead of the My Account page, which is now a "Dashboard" in WooCommerce 2.6. (PR#1377) * Tweak: with the upcoming WooCommerce 2.6, display the new My Account tabs on the My Account > View Subscription page. (PR#1396) * Tweak: improve display of the My Account > View Subscription page on small screens. (PR#1396) * Tweak: pass $args param to 'woocommerce_new_subscription_data' filter. (PR#1410) * Tweak: use pretty date on hover for Subscription admin screen dates. (PR#1416) * Tweak: remove WooCommerce < 2.3 compatibility code as this versions are no longer supported. (PR#1395) * Fix: do not attempt to validate recurring shipping methods when no recurring shipping is required, for example, if the subscription is for one payment or using a Subscribe All the Things product. (PR#1404) * Fix: do not require payment for switches with $0 switching cost unless the subscription was using PayPal Standard as the payment method and when that's the case, update the subscription payment method after the switch payment is processed if the new payment method is not PayPal. (PR#1412) * Fix: display of related orders meta box on administration Edit Order and Edit Subscription screens with WooCommerce 2.6. (PR#1387) * Fix: always trigger subscription renewal payment hooks (i.e. 'woocommerce_subscription_renewal_payment_complete' and 'woocommerce_subscription_renewal_payment_failed') for the first renewal payment, even if there was no initial order for the subscription. Previously, the first payment was not considered a renewal payment, even if it was on a renewal order. (PR#1390) * Fix: prioritise sign-up fee and trial length filters in cart calculations over value set on cart item. (PR#1378) * Fix: display correct "Total" row heading for the Related Subscriptions table shown on the My Account > View Order page on small screens. (PR#1396) * Fix: with the upcoming WooCommerce 2.6, do not create a new order instead of completing payment on the renewal order when completing renewal payment via cart/checkout. (PR#1407) * Fix: with the upcoming WooCommerce 2.6, do not depend on the 'wc-admin-order-meta-boxes-modal' JavaScript, as it no longer exists. (PR#1407) 2016.05.14 - version 2.0.14 * Tweak: add automatic install plugin URL for WooCommerce when it's not installed. (PR#1345) * Tweak: add new 'wcs_pre_get_users_subscriptions' filter for custom caching. (PR#1360) * Fix: make sure shipping line items are added to subscriptions for subscription purchases where the recurring packages are different to the initial packages (i.e. subscriptions with free trial, sync'd or multiple subscription purchases with different shipping classes) and there is only one shipping method available and a customer had previously chosen a different method front end of the store, but that method has since been disabled. (PR#1319) * Fix: don't empty the cart if adding a product already in the cart when there are no payment gateways which support multiple subscriptions and manual renewals are disabled. (PR#1347) * Fix: calculate correct next payment and end date for synchronised subscriptions with a `0` trial period value (i.e. not empty or ''). (PR#1348) * Fix: set default values for subscriptions dropdown fields when bulk adding variations. (PR#1350) * Fix: rather than using the trial period and interval to determine when to calculate a product's expiration date from, use the date returned by WC_Subscriptions_Product::get_trial_expiration_date() to honour any 3rd party code attaching to the 'woocommerce_subscriptions_product_trial_expiration_date' hook. (PR#1339) * Fix: display the correct recurring shipping price when store is using tax inclusive pricing. (PR#1367) * Fix: only apply recurring percent coupons when there is no free trial. (PR#1365) * Fix: make sure a recurring shipping method has been selected before allowing checkout for products with a free trial or synchronised. (PR#1358) * Fix: display shipping addresses on the Order Received page and in order emails for orders that do not require shipping but are to purchase a subscription which does require shipping in future because they have a free trial or are synchronised. (PR#1358) * Fix: potential fatal error when a customer views the View Subscription page for a subscription with a line item that can be switched but has been deleted. (PR#1376) 2016.04.22 - version 2.0.13 * Tweak: make recurring shipping packages globally available by storing them in WC()->shipping->packages. (PR#1294) * Tweak: add new 'use_per_slash' param in wcs_price_string() function to allow code calling wcs_price_string() to choose whether to use a "/" or longer from "every" for subscriptions which renew each period. (PR#1297) * Tweak: improve performance of POST requets to /wc-api/subscriptions/ to create a new subscription by only calculating customer's total spent amount once, instead of when creating the order and subscription. (PR#1316) * Tweak: improve performance when loading the front-end product page for a variable subscription product that is limited for logged in users with a subscription to one of the variations of that product. (PR#1324) * Fix: compatibility with Local Pickup Plus. (PR#1291 PR#1292 PR#1293 PR#1329) * Fix: only modify shipping packages when cart contains a subscription. Fixes display of shipping methods selection fields when a customer attempts to pay for a failed or manual renewal order that contains a synced subscription product. (PR#1291) * Fix: pass correct shipping package key to callbacks on the 'woocommerce_add_shipping_order_item' hook for recurring shipping fields (PR#1292) * Fix: pass the recurring package key as index value to the cart-recurring-shipping.php template to fix compatibility with shipping extensions that hook into that, namely Local Pickup Plus. (PR#1293) * Fix: incorrect tax rate applied to recurring totals when using Local Pickup Plus as the shipping method. (PR#1329) * Fix: incorrect admin email being sent when paying for a failed renewal order. (PR#1310) * Fix: make sure translations are ready before attempting to use them. Also load plugin text domain on 'init' instead of 'plugins_loaded' to improve compatibility with localisation extension. (PR#1303) * Fix: display of inventory settings on the Edit Product admin screen when loading or changing to a subscription product type. (PR#1322) * Fix: ensure sign up fee paid includes the paid tax if tax inclusive so that it is consistent with the sign up fee due amount and the prorated sign-up fee amount is calculated correctly when upgrading/downgrading. (PR#1312) * Fix: do not discount sign-up fees with recurring coupons. (PR#1325) * Fix: allow end date for a subscription to be the same as the last payment date. Fixes subscriptions with an abandonded PayPal order being able to be suspended/activated if that pending order is cancelled. (PR#1330) * Fix: calculate correct end date for synchronised subscription products with a free trial. (PR#1327) * Fix: prorated upgrade/downgrade amount when switching a synchronised subscription before the first payment date. (PR#1308) * Fix: set correct number of installments when signing up for a synchronised subscription with an end date at PayPal Standard. (PR#1313) * Fix: only allow one variation of a limited variable product to be added to the cart to avoid the customer being able to buy multiple variations of a limited product. (PR#1332) * Fix: "The next_payment date must occur after the trial end date" error notice sometimes dislpayed on checkout when purchasing a synchronised product with a free trial period. (PR#1324) * Fix: add fees applied to a renewal, initial order or subscription to the cart when paying for renewal, an initial sign-up or resubscribe. (PR#1334) 2016.03.18 - version 2.0.12 * Tweak: new 'woocommerce_my_subscriptions_actions' hook in the My Subscriptions table * Fix: shipping bug when the packages for recurring orders were different to those for the initial order. Fixes compatibility with Table Rate shipping and occasional issues with manual renewals for products with a free trial or synchronised renewal date. Refactoring of shipping selection required to address the issue: shipping method selection fields are now displayed on checkout in the Recurring Totals section when the available recurring shipping rates are different to the rates for the initial order (either because the methods are different, the costs are different, or the package contents is different). * Fix: error on WooCommerce > Edit Subscription admin screen for subscriptions with recurring coupons caused by attempting to use WC()->session on backend/admin requests * Fix: search customer/user email address when searching via the WooCommerce > Subscriptions administration screen * Fix: 404's of the "My Account > View Subscription" page after updating WooCommerce * Fix: include up-to-date pot file 2016.03.03 - version 2.0.11 * Fix: activation issue with v2.0.10 on some sites due to get_editable_roles() function not being defined * Tweak: don't allow subscribers to cancel subscriptions with pending cancellation status 2016.02.27 - version 2.0.10 * Tweak: large improvements to internationalisation of strings after a full audit of all strings made available for localisation. Subscriptions now makes use of string context more often, uses numbered placeholders for strings passed through sprintf/printf, consolidated strings with same context and added more comments for translators. * Tweak: display details of product, shipping and tax line items at PayPal for subscription sign-ups via Express Checkout Reference Transactions instead of only displaying the billing agreement description. * Tweak: add new wcs_get_address_type_to_display() method to have a single source for all localised address type display names * Tweak: a number of small security improvements around validation of printing strings * Tweak: new 'woocommerce_subscription_use_pending_cancel' filter to allow stores to switch off the use of the Pending Cancellation status applied until the end of any prepaid term on a subscription once it has been cancelled * Tweak: use wp_json_encode() when possible (with WordPress v4.1 and newer) instead of PHP's json_encode(), the use of which is discouraged * Tweak: move user role filter to after the default roles section and introduce wcs_get_new_user_role_names() to allow custom code to more easily customise the role assigned to a user for subscription events. * Fix: Product add-on incompatibility: make sure product add-ons are only applied once for manual renewal payments for a previously failed automatic renewal payment. * Fix: Checkout Add-ons incompatibility: add subscription fee line items to the cart for manual renewal and resubscribe to make sure Checkout Add-ons are applied to manual renewals and resubscribes * Fix: compatibility with remote updaters, like WP Remote, Jetpack Manage by activating subscriptions on 'init' not 'admin_init' because remote udpaters won't trigger that hook. * Fix: apply recurring coupons to manual renewals by making sure they are set in the cart at the time of renewal. Introduces the use of the following new psuedo coupons for carrying over recurring coupons to renewals: 'renewal_fee', 'renewal_percent' & 'renewal_cart'. * Fix: make sure it is possible to link a subscription with a parent order by passing a 'order_id' argument when creating or updating a subscription via the REST API endpoints (i.e. /wc-api/v4/subscriptions/) * Fix: don't show synchronisation fields on the Edit Product screen for a subscription that renews daily when toggling the downloadable or virtual checkboxes * Fix: make sure you can bulk edit variations before a variable product is saved with WooCommerce v2.5 by using the product type field * Fix: don't incorrectly log the "Free trial commenced for subscription" order note on a subscription when applying coupons to make the initial payment free. Instead, log the more general "Sign-up complete" order note whenever a subscription without an initial payment receives the first payment complete function call. * Fix: don't allow resubscribing to subscriptions with a $0 / period price, because generally, this is done to charge the full cost of the subscription in the sign-up fee, and we don't charge sign-up fees on a resubscribe. * Fix: occassional error when updating a subscription via the Edit Subscription screen: "Error updating subscription: A valid PayPal Billing Agreement ID value is required" caused by using disabled payment method meta fields (Subscriptions now uses readonly fields). * Fix: send cancelled subscription emails to store managers when a subscription is deleted early in the process of deletion to ensure billing meta fields are still available to include in the email. * Fix: log correct next payment date when processing a PayPal IPN payment request for a subscription that has a payment in the future. Also fixes an undefined index notice for these IPN requests for subscriptions with no free trial. * Fix: allow disabled payment gateways that are still active as plugins to be treated as a valid payment method when saving a subscription via the Edit Subscription screen to avoid switching the subscription to use Manual renewals. * Fix: always display order numbers not IDs to improve compatibility with plugins like Sequential Order numbers * Fix: when a switch order's status is changed, don't cancel, suspend or mark the corresponding subscription as failed. Only do that on those status changes for the original order. * Fix: display all subscriptions on the Subscriptions list table when filtering by payment method (previously the default posts per page value would be used, which is 5). * Fix: leap year issues when creating subscription terms with PayPal Standard that can lead to prolonged free trial or subscription duration for subscripions that have an annual free trial or billing period. * Fix: set correct subscription length options for subscription variations on the Edit Product screen when first loading the page (affects subscriptions with a billing interval other than 1) * Fix: duplicate PayPal IPN blocking on sites running PHP prior to version 5.4.0. 2016.01.30 - version 2.0.9 * Notice: if you have customisations to the /add-to-cart/variable.php template you wish to apply to variable subscription products, you will need to create a new /add-to-cart/variable-subscription.php template in your theme as this version introduces a new template specifically for variable subscription products * Tweak: display customer as recipient on WooCommerce > Settings > Email screen with WooCommerce 2.5+ * Tweak: automatically cancel a subscription with the 'pending-cancellation' status if the last renewal order is refunded * Tweak: flush rewrite rules on activation / deactivation rather than just on upgrade to ensure /view-subscription/ rewrites are always available * Tweak: use variation ID to test if a subscription's product line item can be switched (helps extensions, like Name Your Price, override if specific variations can be switched) * Tweak: delete subscriptions on user deletion instead of simply trashing them * Tweak: new filters for 3rd party developers to use for renewal/resubscribe: 'wcs_cart_contains_renewal', 'wcs_cart_contains_failed_renewal_order_payment', 'wcs_users_resubscribe_link_for_product', 'wcs_cart_contains_resubscribe' * Tweak: display a notice on limited variable subscription products that can not be switched by introducing a new variable subscription template * Fix: after the last payment a subscription with an end date, clear the next payment date instead of leaving it as the date of the last payment * Fix: only display resubscribe notice if a subscription resubscribe was added to cart successfully * Fix: remove download permissions when product line items are switched to make sure customer only has access to line items of the product they are currently subscribed to * Fix: when checking whether to apply a discount, only call is_valid_for_product() with WooCommerce 2.5+ because it will always return false in prior versions * Fix: make sure subscriptions are cancelled before being deleted by using the correct hook name (they were already being correctly cancelled when trashed) * Fix: do not redirect for auto-switching on limited subscriptions if switching has been disabled in the store * Fix: always create a failed renewal order for PayPal IPN messages relating to a failure when the subscription is active because PayPal may send the subscription suspended message before the payment failed message and therefore, we'd mark the old renewal order as failed instead of a new renewal order * Fix: make sure resubscribe orders do not incorrectly charge signup fees after a failed or pending payment on the resubscribe order * Fix: ignore suspended payment PayPal IPN messages for subscriptions with any status other than 'active' to avoid exceptions when attempting to suspend a subscription pending-cancellation or custom status that can't be suspended * Fix: display the # symbol before subscription numbers/IDs in all places where WooCommerce displays the # symbol before the order number/ID * Fix: make sure subscriptions created with PayPal Standard are correctly cancelled when changing the customer changes the payment method to PayPal but the store now supports PayPal Reference Transactions * Fix: set the correct end date for a synchronised subscription by ensuring that no mock trial period in included in its date * Fix: make sure correct totals are used for manual renewals (and manual payments for failed automatic renewals) when store is using tax inclusive pricing (by making sure the correct tax amount is added to the renewal item's price) 2016.01.07 - version 2.0.8 * Happy new year! * Tweak: WooCommerce 2.5 email template compatibility * Tweak: Use "Change Payment Method" as the default button text on the customer facing Change Payment method form instead of the payment gateways's order button text as often gateways will use something like "Place Order". * Tweak: Move hardcoded # symbols used for Subscription ID inside translation functions so they can be localised. * Fix: Display PayPal Subscription Profile ID for PayPal Standard Subscriptions on the Edit Subscription administration screen (but disable the input so that it is not editable by default). * Fix: When changing a subscription's payment method via the Edit Subscription administration screen, make sure the status updated hook is trigger for the old payment method to allow gateways to cancel/suspend it as needed. * Fix: When changing a subscription's payment method from PayPal to a different gateway via the Edit Subscription administration screen, suspend the existing subscription at PayPal to ensure no future payments are processed on it. * Fix: Apply recurring cart discount coupons to products not excluded from that coupon even if the cart contains other products which are excluded from that coupon. Requires WooCommerce 2.5. * Fix: Remove renewal/resubscribe cart items from cart when the renewal/resubscribe order or original subscription has been deleted to prevent errors. * Fix: Correctly cache a subscriptions payment gateway rather than instantiating it again every time it is accessed for a small performance improvement. * Fix: Display the View Subscription page when My Account page is set as the site's front page. * Fix: Allow unlimited subscription suspension by customer from their My Account page * Fix: Display "Total" row heading for My Subscriptions table on small displays 2015.12.16 - version 2.0.7 * New: Add a payment gateway filter to the dashboard admin subscriptions table * New: Implement soft caching for get_related_orders() * Tweak: Better "Name Your Price" extension switching compatibility * Tweak: Trash a user's subscriptions when a user is deleted * Tweak: Limit the `wcs_do_subscriptions_exist()` query to 1 result * Tweak: Mention subscription string methods in code comments/doc to help avoid some confusion * Fix: Fix for limiting and paging with the /subscriptions/ API endpoint * Fix: Use `esc_url_raw()` for redirect url instead of `esc_url()`. Fixes an issue where the return from paypal displays checkout page again instead of order received/details * Fix: Replaces `parse_str()` with `wp_parse_str()` to fix an issue with incorrectly escaped responses from PayPal in early PHP versions * Fix: Prevent renewal orders being cancelled when clicking the "Cancel and return to .." link from PayPal * Fix: Check whether an order needs payment before processing initial payments. Prevents a difficult to reproduce scenario where initial payments were processed multiple times * Fix: Check if a cart contains a subscription AND the subtotal is 0 before removing any non subscriptions coupons if there is nothing for the coupon to be applied to. Fixes a compatibility issue with extensions like URL coupons. * Fix: Fixes some php errors when a switch order fails * Fix: Removes subscriptions from being calculated in reports. Fixes an issue where failed parent orders were incorrectly showing up in reports * Fix: Filter needs_payment when processing change payment method requests. Fixes an issue with some payment gateways displaying duplicate fields on the change payment method form * Fix: Paypal IPN tweaks for slow servers & popular stores - port of existing 1.5.x fixes * Fix: Add additional cart item data when setting up resubscribe and renewal carts so that subscriptions with multiple line items of the same product don't get merged into the one line item with an incorrect quantity. Fixes an issue where if a subscription had 2 line items for the same product, on resubscribe, one of them would disappear * Fix: Check if $this->payment_gateway property exists. Fixes an issue when subscriptions used on sites served using HHVM * Fix: Prevent partially paying for a renewal order if not all renewal items are added to cart * Fix: Changes the $subscription->needs_payment() function to also include switch order meta in the get get_posts query so the latest switch order or renewal order is checked if it needs payment. Fixes customer self reactivating subscription after prorated switch * Fix: Zero the subscription order shipping value so that we have a clean slate to add to when we add_shipping() when switching. Fixes incorrect/double shipping order tax when switching * Fix: Other minor misc spelling fixes and fixes to incorrect variable names 2015.11.16 - version 2.0.6 * New: Add a new `woocommerce_subscriptions_switched_item` callback for switching * Tweak: Move `subscription_expired` and `subscription_end_of_prepaid_term` to the action deprecator * Tweak: Deprecate WC_Subscriptions_Manager::subscription_trial_end() * Fix: Add the correct `subscription_switch` meta to all subscription switches when there are multiple switches in the same order * Fix: Allow autocomplete of orders that have multiple switches in the same order. Fixes an issue where switch emails were not being sent when multiple switched items were processed in the same order * Fix: Adjust logic around switch label so that switching to $0 per period displays "Downgrade". Fixes an issue where "Crossgrade" was incorrectly displayed when downgrading to $0 per period * Fix: Don't initiate auto-switch when a subscription needs payment * Fix: Use the 'wc-pending' status rather than 'pending' (default WordPress) status when manually creating a subscription. Fixes an issue with display of pending subscriptions on the admin subscription list table * Fix: Replace use of `__DIR__` with `dirname( __FILE__ )` to maintain compatibility with PHP 5.2.4 * Fix: Fix the logic checking for sync day in future by comparing the full date not just the day then the month/year if that day is after the current day. This ensures we don't see a day in the future with a month and year in the past or same as today as being a date in the future * Fix: Display the resubscribe relationship in the admin edit order and subscription related orders table * Fix: Directly access the `$_REQUEST['action']` variables instead of using `$wp_list_table->current_action()`. Fixes an issue where while filtering the admin subscriptions list table by customer, attempting to update a subscription status using the provided suspend, cancel and reactivate actions wouldn't actually update the status * Fix: Honour previous filters applied to the admin subscription list table after updating an individual subscription status using the provided actions 2015.11.07 - version 2.0.5 * Tweak: the "Suspend" button is no longer displayed on a store manager's View Subscription page when 0 suspensions are allowed, to avoid confusion (store managers can always suspend subscriptions from the Manage Subscriptions screen) * Tweak: use both order status and paid date meta data to find the completed payment count on a subscription because some payment gateways don't set the paid date and some stores may run custom code or 3rd party plugins using a custom order status other than "completed" * Tweak: add new 'woocommerce_subscriptions_switch_error_message' filter and improve params on 'woocommerce_subscriptions_is_switch_valid' to allow 3rd party code, like Name Your Price, to allow their products to be switched * Tweak: add new 'woocommerce_subscriptions_paid_order_statuses' filter for 3rd party code to declare what custom order status should be considered as marking an order as paid * Fix: update the trial, next payment and end dates as well as the start date when changing the status of a order used to purchase a subscription (for stores which use manual payment methods which can take days before payment is received) * Fix: incorrect tax calculation when resubscribing or manually renewing to a subscription when prices are tax inclusive * Fix: always setting subscription start date to 1 minute in past when manually adding a subscription via the Edit Subscription screen (by updating the post cache) * Fix: handling of 'recurring_payment_suspended_due_to_max_failed_payment' and 'recurring_payment_suspended' PayPal IPN requests which send a PayPal Express Checkout IPN payload for PayPal Standard Subscriptions * Fix: incorrectly removing any non-Subscriptions role from a user when purchasing or deactivating a subscription (by removing and adding only the default role) * Fix: PHP notice about undefined index 'txn_type' for PayPal IPNs relating to a refund * Fix: errors relating to an order awaiting payment that has been set to false or deleted instead of being unset in the WooCommerce session * Fix: incorrect transition of orders (including renewal orders) for $0 amounts to "completed", instead make sure they are transitioned to the default completed status (i.e. "processing") 2015.11.02 - version 2.0.4 * Tweak: cache available subscription lengths to improve performance of the WooCommerce > Subscriptions list table page * Tweak: add safeguards to prevent a next payment within 2 hours when activating a subscription, or a new next payment date be calculated within 2 hours in the future. Works around issues with 3rd party code using date_default_timezone_set() and a daylight savings bug that will be fixed in a future release * Tweak: add new filters to allow 3rd party extensions to make their product types switchable (specifically to allow Name Your Price products to be switchable without any changes other than price). Props @helgatheviking * Tweak: display subscription details on customer facing change payment method process for gateways which use the Checkout > Pay page a 2nd time * Tweak: when deleting a user, make a note on the subscriptions that user was associated with (which will automatically be cancelled) * Fix: accumulated proration of sign-up fees when the customer switches a subscription multiple times (e.g. when sign-up fee proration is enabled and a customer upgrade from a product with a $100 fee to a $200 fee, then again to a $300 fee, only charge a $100 sign-up fee, not $200) * Fix: don't suspend then reactivate subscriptions at PayPal on a renewal (introduced with 2.0.3) because store manager don't like the extra status change entries logged at PayPal and also PayPal doesn't sent a Subscription reactivated IPN, but does send a Subscription suspended IPN, which could lead to subscriptions remaining on-hold incorrectly if IPN handling code for PayPal Express Checkout/Digital Goods was handling it * Fix: customer facing change payment method process for gateways which need to use the Checkout > Pay page a 2nd time, for example, to collect credit card details * Fix: JavaScript pop-up notices relatd to invalid billing schedule modifications on the Edit Subscription screen, broken with v2.0.3 * Fix: don't attempt to cancel an expired, trashed or cancelled subscription when deleting a user (the subscription has already been deleted) * Fix: don't record failed payment twice on a subscription with code calling WC_Subscription->payment_failed() with an unpaid renewal order * Fix: handling of PayPal IPN for first payment that is sent before the payment is due for a subscription with a free trial date * Fix: handling of PayPal IPN for subscription failure for a subscription has has previously been cancelled (not sure why PayPal sends this IPN when the subscriptoin has already been cancelled) * Fix: don't send Customer Invoice email when using the the "Create Pending Renewal Order" action from the Edit Subscription screen for a subscription that uses manual renewals * Fix: don't automatically complete a pending renewal order for $0 when using the "Create Pending Renewal Order" action from the Edit Subscription screen * Fix: fix PHP notices dislpayed when removing multiple cart items from the cart which relate to a failed initial payment * Fix: don't prorate sign-up fees for synchronised subscriptions when proration is enabled for the first renewal payment * Fix: allow customers to pay failed parent orders which contain a subscription product limited to one of any status * Fix: fatal errors when 3rd party code is calling WC_Subscriptions_Product::is_subscription() on a deleted product * Fix: don't generate subscription renewal order for subsc_failed PayPal IPN messages * Fix: increase PayPal IPN logging to help diagnose issues faster * Fix: download links in the "download your files" email 2015.10.27 - version 2.0.3 * New: One Time Shipping feature: https://docs.woocommerce.com/document/subscriptions/store-manager-guide/#one-time-shipping * Tweak: redirect to View Subscription page after changing payment method for payment methods redirecting back to My Account page * Fix: reactivation of subscriptions using PayPal Standard as the payment method after a subscription renewal payment IPN message is sent (introduced with 2.0.2) * Fix: use of start date in based on current GMT/UTC offset instead of GMT/UTC offset at the time the subscription was created to handle daylight savings time and changes to a site's timezone * Fix: notices when saving a manually added subscription with the pending status via the WooCommerce > Add Subscription administration interface * Fix: increase specificity of JS selector on Edit Product screen to make sure subscription pricing fields are only inserted once, even when other code is adding additional pricing sections * Fix: return estimated subscription length instead of null for 3rd party code calling deprecated API functions * Fix: always use WC_API_Subscriptions->get_subscription() to construct the API response for WC-API endpoints 2015.10.21 - version 2.0.2 * New: create pending renewal order action from the Edit Subscriptions screen * New: process renewal action from the Edit Subscriptions screen * New: 'woocommerce_subscriptions_validate_coupon_type' filter to improve compatibility with Free Gift Coupons extension * Tweak: display HTTP errors that occur during upgrade * Tweak: always allow a store manager to change a subscription to use "Manual" renewal method on the Edit Subscription screen, even if manual renewals are not enabled for checkout * Fix: repair data not migrated correctly from Subscriptions 1.n, especially important for repairing incorrect dates for stores that upgraded with 2.0.0. Data repaired is dates, customer notes and line tax data. * Fix: repair subscrpitions incorrectly expired due to incorrect expirate date set during the 2.0.0 upgrade process * Fix: bug in upgrade process preventing line tax date being copied correctly * Fix: bug in upgrade process preventing customer notes on subscription orders being copied to subscriptions * Fix: bug in upgrade process where incorrect dates could be set on subscriptions (only affecting upgrades run with 2.0.0 not 2.0.1 and dates will be repaired on upgrade to this version) * Fix: infinite loop during upgrade process if store had subscription order item meta data but the corresponding order item had been deleted * Fix: call deprecated status change hooks: 'activated_subscription', 'suspended_subscription', 'subscription_put_on-hold', 'cancelled_subscription' and 'reactivated_subscription' to improve compatibility with plugins that have not been updated for Subscriptions 2.0 yet * Fix: hide refund button on Edit Subscriptions screen: subscriptions can not be refunded, only orders * Fix: handling of PayPal IPN recurring_payment_suspended_due_to_max_failed_payment messages - correctly create renewal order on failure instead of simply suspending the subscription * Fix: occassional "Invalid argument supplied for foreach" notices on cart page when attempting to get shipping methods * Fix: do not show "Free!" for grouped products with a free trial on the grouped product's page when product is in the cart * Fix: paying for renewal of a limited subscription product * Fix: customer changing payment method with PayPal RT * Fix: [subscriptions] shortcode 2015.10.09 - version 2.0.1 * Tweak: add a log entry when processing an IPN request completes * Fix: PayPal IPN handling for subscriptions purchased with older versions of WooCommerce * Fix: renewal failure on stores running code attached to the deprecated 'woocommerce_subscriptions_renewal_order_created' hook and not returning the renewal order (which wasn't required previously because it was an action) * Fix: checkout errors on stores running code calling the deprecated WC_Subscriptions_Order::get_recurring_total_tax() method * Fix: upgrade error when upgrading a sync'd subscription that has been trashed for a product that has been permanently deleted 2015.10.05 - version 2.0.0 * New: purchase different subscription products in the same transaction: https://docs.woocommerce.com/document/subscriptions/version-2/#section-2 * New: administration interface for Adding or Editing a subscription: https://docs.woocommerce.com/document/subscriptions/version-2/#section-3 * New: downloadable content dripping: https://docs.woocommerce.com/document/subscriptions/version-2/#section-4 * New: customer facing View Subscription page: https://docs.woocommerce.com/document/subscriptions/version-2/#section-5 * New: support for PayPal Reference Transactions: https://docs.woocommerce.com/document/subscriptions/version-2/#section-8 * New: Pending Cancellation status applied to a subscription after it has been cancelled but the customer or store manager until the prepaid term ends: https://docs.woocommerce.com/document/subscriptions/version-2/#pending-cancellation * Tweak: Subscriptions administration list table now includes recurring total, payment method and all search/sorting features for stores with a large number of subscriptions: https://docs.woocommerce.com/document/subscriptions/version-2/#list-table * Tweak: Improved flow on renewal - create renewal orders before processing the payment: https://docs.woocommerce.com/document/subscriptions/version-2/#section-7 * Tweak: one end date is now used to refer to the date on which a subscription did or will expire or was cancelled: https://docs.woocommerce.com/document/subscriptions/version-2/#one-end-date * Tweak: the renewal of a cancelled or expired subscription is now called "Resubscribe" to avoid confusion with normal renewal process: https://docs.woocommerce.com/document/subscriptions/version-2/#resubscribe-not-renew 2015.09.29 - version 1.5.31 * Tweak: introduce a new transient lock at the start of PayPal IPN handling to prevent duplicate IPN handling on sites taking more than a minute to process an IPN message and set the permanent lock * Fix: handling of PayPal's 'recurring_payment_suspended_due_to_max_failed_payment' IPN message for subscriptions purchased with PayPal Standard * Fix: infinite loop and memory exhaustion when attempting to switch a limited subscription product 2015.08.28 - version 1.5.30 * Fix: redundant pricing elements in subtotal and cart widget totals * Fix: never given an additional free trials when renewing a cancelled subscription * Fix: always set an end date for the a switched subscription * Fix: don't copy over download permissions meta from initial order to renewal order/s 2015.07.28 - version 1.5.29 * Tweak: WooCommerce v2.4 compatibility * Tweak: improve Javascript show/hide field logic on Edit Product to make it easier for 3rd party extensions to work with Subscriptions * Fix: first renewal of synchronised subscriptions that are purchased within 23 hours of the first renewal payment being due * Fix: fix cart calculations thrown off by a simple product that used to be a subscription * Fix: copy multiple meta data values for the same key to renewal orders * Fix: restrict switching if force http setting is enabled in WooCommerce as moving from https to http will log the user out. Switching relies on an ownership check, which will always fail, and will strip the query arguments from switching making people sign up for new subscriptions instead of switching the one they already have. * Fix: manual payment flag being incorrect set on an order initial paid for via a manual payment method, then changed to "Pending" and paid for via a payment method that can process automatic renewals 2015.06.10 - version 1.5.28 * Fix: add compatibility for JSON encoded data in the 'custom' field passed to PayPal being changed in WC 2.3.11 to fix an exploit with serialized data * Fix: enforce an array with only two values and no objects in the 'custom' field passed to PayPal to fix an exploit with serialized data * Fix: only apply the price HTML string if there is a price (i.e. not 0 or empty) 2015.06.01 - version 1.5.27 * Fix: make sure subscriptions that were manual activated and do not have a corresponding next payment date can not be switched (i.e. upgraded/downgraded) to ensure proration calculations are correct * Fix: make sure the next payment date is calculated properly for variable synced subscriptions. 2015.05.25 - version 1.5.26 * Tweak: remove reference to "free trial" in coupon error message when attempting to apply a product, cart or sign-up fee coupon to a a synchronised subscription with no initial payment but no free trial * Tweak: Use WordPress's SSL verification settings when communicating with PayPal to change a subscription's status to improve compatibility with Windows and Yosemite OS X servers * Fix: make sure coupon error message is displayed when attempting to apply product, cart or sign-up fee coupon to a synchronised subscription with no initial payment * Fix: fix auto-switch process for subscriptions products which are grouped and limited * Fix: properly use offset value in $args array sent to WC_Subscriptions::get_subscriptions() * Fix: PayPal: set a flag in cases where IPN message arrives before PDT redirect happens so first renewal IPN messages aren't ignored in this corner case 2015.04.27 - version 1.5.25 * Fix: WordPress 4.2 compatibility issue with post statuses on the Manage Subscriptions screen * Fix: incorrectly clearing cache by Action Scheduler 2015.04.21 - version 1.5.24 * Fix: incorrect renewal order created when a customer switches with PayPal, the switch includes a gap payment and PayPal sends the 'subscr_signup' IPN before the 'subscr_payment' (which only appears to happen on some PayPal accounts) * Fix: variable subscription product's "From:" price displayed on the shop/product pages. * Fix: order totals for renewal order created after a subscription was manually reactivated by a store manager after a failed payment left it on-hold * Fix: only variables should be passed by reference error on some PHP installations when purchasing with PayPal * Fix: undefined index 'txn_id' notice on PayPal IPN handler for subscription sign-ups on a switch or subscription with a free trial * Fix: make sure when initiating auto-switch from a limited subscription product's page that the newest subscription is switched (not the oldest, in case the customer has multilpe subscriptions to the same limited product) 2015.04.21 - version 1.5.23 * Fix - Potential XSS with add_query_arg 2015.04.10 - version 1.5.22 * Fix: use of $this in static context error introduced with v1.5.21 2015.04.09 - version 1.5.21 * Fix: notice displayed on limited subscription products that are part of a Group when not logged in * Fix: notice displayed on limited subscription products when switching is disabled completely * Fix: upgrade process on some servers where site is running on SSL but $_SERVER['HTTPS'] is not set and server port is something other than the default SSL port (443), causing WordPress' is_ssl() method to return false (this is fixed by WooCommerce's fix_server_vars() method, but that runs on the 'after_setup_theme' hook, while Subscriptions used 'plugins_loaded' for the upgrade process, which occured prior to it) * Fix: correctly display the discount string on the Order Received page when a recurring coupon is applied to the purchase. * Fix: proration calculations for switching costs when store sets prices tax inclusive and displays prices including tax * Fix: proration calculations for switching costs when customer had or is purchasing multiple quantities of a subscription 2015.03.13 - version 1.5.20 * Fix: shipping line tax row display for renewal orders by ensuring that taxes are saved for recurring shipping items or derived from the tax on the shipping line items of the original order if no recurring shipping items are present (for backward compatibility) 2015.03.03 - version 1.5.19 * Tweak: make sure get_current_screen() function exists to fix compatibility with any extensions that trigger the 'woocommerce_get_formatted_order_total' hook before it is loaded * Tweak: allowing recurring cart coupons to be applied to renewal of an expired of cancelled subscription (which creates a new subscription) * Tweak: support recurring line tax data rows * Fix: do not allow a limited subscription to be switched from the single product page when switching is disabled on the site or not enabled for that product type * Fix: after adding a subscription product to the cart, if the customer would not be redirected to checkout or the cart page, redirect them to whichever page they added the product from to ensure the cart widget loads correctly * Fix: cart widget with WC 2.3.2+ when a subscription product is in the cart with a $0 recurring total * Fix: line tax row display for automatic renewals orders by ensuring that any serialized line item meta data is unserialized before adding it to renewal orders, to avoid it being serialized twice * Fix: applying cart or product discount coupon to subscription with $0 in WooCommerce 2.3 via the Checkout page 2015.02.20 - version 1.5.18 * Tweak: Improve compatibility with Dynamic Pricing (by using each subscription product object's get_price_html() method to build the price string instead of the generic filters) * Fix: only apply product and cart coupons to the first payment on a subscription with WooCommerce 2.3 * Fix: correctly set schedule for subscriptions with an expiration date as soon as it is purchased rather than waiting until the next payment date is displayed * Fix: generate renewal orders for PayPal subscriptions created to fix up a subscription that was suspended previously due to a failed payment 2015.02.02 - version 1.5.17 * WooCommerce 2.3 Compatibility * Tweak: If the initial order for a synchronised subscription is for $0, mark it as complete immediately as nothing needs to be shipped * Tweak: Slight improvement to responsive My Subscriptions table based on WooCommerce 2.3 styles * Tweak: do not allow a cancelled or expired subscription with a $0 recurring total to be renewed as these are most commonly used to charge the total of a subscription up-front in the sign-up fee and renewals of cancelled/expired subscriptions do not charge the sign-up fee * Fix: allow Subscriptions Core to handle renewal orders with a recurring order amount of $0. This means that the Payment Gateways only be involved in transactions that exceed the $0 amount. * Fix: proration of recurring amount when subscription product has Product Addons - use total cart item's price (including add-ons) for new price rather than product's price (which doesn't include add-ons) * Fix: allow subscriptions for 1 payment that also have a free trial to be cancelled during the free trial (i.e. before the first payment) * Fix: first payment date for annual or monthly synchronised subscriptions purchased in the same month that the first payment is due - a bug introduced in 1.5.16 2015.01.09 - version 1.5.16 * Tweak: only auto-complete subscription switch orders if their total is $0 (i.e. there is no prorating on a physical product) * Tweak: improve notice regarding purchase of different subscription products in the same transaction to avoid confusion relating to multiple quantity of the same subscription product * Fix: process first payment for a monthly subscription synchronised to the day of sign up on that day, not one month after sign-up - a bug introduced in 1.5.15 * Fix: set first payment date to end of trial end date when manually adding a pending subscription with a free trial which the customer then pays for a few days after it was manually added * Fix: simple subscription product compatibility with the WooCommerce One Page Checkout extension's Single Product template changes introduced in v1.1 2014.12.06 - version 1.5.15 * Tweak: include order item names in item name sent to PayPal when purchasing products with a subscription * Fix: decode HTML entities in order item names sent to PayPal * Fix: synchronised renewal date when synhronising a monthly subscription and the next payment date is in the next year * Fix: only change payment method to PayPal which switching from another payment method to PayPal after the IPN has sent a successful subscription signup notification 2014.11.27 - version 1.5.14 * Tweak: better PayPal logging when unable to change subscription status - include profile ID, transaction ID or IPN ID * Tweak: set PayPal PDT flag when manually adding a subscription via the Edit Order interface so that it doesn't need to be set manually in order for first payment to be processed * Tweak: don't display free shipping coupon discount amounts as "-$0 / month" * Fix: reactivating a subscription after customer has completed payment for a failed renewal order via PayPal and the failure was on the first renewal and the store was using PDT at the time of the renewal payment, but was not at the time the subscription was first created * Fix: scheduling first payment date for synchronised subscriptions purchased on the same day they are synchronised too 2014.11.10 - version 1.5.13 * Fix: do not allow customers to switch a subscription where the original order has not yet been paid. * Fix: do not return cart subscription details, like trial or length, with WooCommerce 2.2 when the cart contains a non-subscription product that was previously a subscription product * Fix: manual tax calculation from Edit Order screen with WC 2.2 when a shipping and billing address has not yet been set, but store is set to calculate taxes from store's base country * Fix: renew button display on subscriber's My Account page * Fix: occasional "Warning: strpos(): Empty delimiter in" notice on Orders screen * Fix: first payment date (and therefore, payment schedule) when switching subscriptions with PayPal as the payment method and not prorating payment * Fix: update Action Scheduler to prevent actions with corrupted args (post_content) blocking execution of subsequent actions * Fix: synchronise renewal dates to 3am instead of midnight to account for any changes to the time if the site is set to use a timezone with daylight savings (e.g. Los Angeles instead of UTC-7) 2014.10.10 - version 1.5.12 * Tweak: add 'customer_changed_subscription_to_suspended' and 'customer_changed_subscription_to_cancelled' hooks * Tweak: add 'admin_changed_subscription_to_on-hold', 'admin_changed_subscription_to_cancelled' and 'admin_changed_subscription_to_active' hooks * Tweak: rather than deleting shipping on initial order when there is a free trial, set it to $0.00 to improve compatibility with extensions like ShipStation * Tweak: improve performance of SQL when checking if a subscription can be renewed (as used on My Account page) * Tweak: add transaction ID to order used to create a subscription * Fix: switching between simple subscriptions in a grouped product * Fix: set renewal order status to 'publish' in WC < 2.2 to improve compatibility with extensions, like ShipStation, on sites still running out-of-date WooCommerce * Fix: handle payment method updates for payment gateway extensions that do not post directly from checkout/pay page. * Fix: handle PayPal IPN messages for the 'recurring_payment_suspended_due_to_max_failed_payment' notification when both the PayPal Digital Goods extension or another Express Checkout extension and Subscriptions are active on the site * Fix: make WC_Subscriptions_Renewal_Order::get_renewal_orders() return orders in ascending order of date, also fixes "Pay" button on subscriptions for some sites * Fix: saving order item recurring tax totals on Edit Order screen when calculating taxes for a manually added subscription item * Fix: warning about non-static method WC_Subscriptions_Synchroniser::is_today() && WC_Subscriptions_Cart::get_formatted_cart_total() * Fix: when the cart contains a manual renewal for a synchronised subscription, do not treat it as a synchronised subscription (and display display prorated price label etc.) * Fix: when manually making a payment to correct a failed renewal order payment with PayPal, create a new subscription with PayPal rather than a simple one-off payment * Fix: bug in WC_Subscriptions_Cart::get_formatted_cart_total() displaying price with recurring tax added twice when prices include tax * Fix: bug where customer's order count and total spent was tripled for initial subscription orders * Fix: incorrect $0 initial payment when using a free trial and/or synchronised subscription and sign up fee equal to recurring total * Fix: display of checkbox for updating all subscriptions' billing/shipping addresses with WooCommerce 2.2 2014.09.08 - version 1.5.11 * Fix: cart subtotal displayed in the cart widget and anywhere else populated via ajax (i.e. WC_Ajax::get_refreshed_fragments()) * Fix: "From:" price for a variable subscription where the lowest priced variation is on sale * Fix: fatal error on My Account page when a subscription's meta data was not correctly saved in the order item meta due to an incorrect reference to a non-existent class name 2014.09.07 - version 1.5.10 * Tweak: Full WooCommerce 2.2 Compatibility * Tweak: link to Checkout/Pay page in the email for a failed automatic payment instead of My Account page * Tweak: store recurring discount coupons and amounts for display in Subscriptions 2.0 * Tweak: no longer automatically cancel subscription when initial order status is changed to refunded to allow the subscription to continue even if the initial amount needs to be refunded (particularly important with WC 2.2) * Tweak: display PayPal API credential admin notice even when PayPal is not in debug mode * Tweak: reword upgrade/downgrade "apportion" settings to the more semantically accurate "prorate" - props @chrislema * Fix: only synchronise products when synching is enabled on the store, even if syncing was enabled and the product was setup to sync but synching has since been disabled * Fix: set correct cart contents count, weight, total and tax when cart contains a subscription * Fix: require payment when selling a subscription for 1 billing period that has a free trial or is synchronised to a date in the future * Fix: when manually adding a subscription, set the initial recurring price to exclude tax (to match the way a price is added for standard products) * Fix: when calculating taxes on the Edit Order screen, set the correct _recurring_line_subtotal_tax and _recurring_line_tax values * Fix: first payment date of synchronised subscriptions purchased with PayPal 2014.08.14 - version 1.5.9 * Tweak: allow switching from one catch all variation to another, as long as the chosen attributes differ between the old subscription and the new one * Tweak: when renewing an expired/cancelled subscription, do not apply original discounts and coupons - require new coupons to be applied if a discount is being offered * Fix: show $0 initial amount on cart totals when applying a product, cart or sign-up fee coupon to a subscription that does not have a free trial * Fix: only apply subscription total calculations to parent renewal orders, not child renewal orders. This prevents a free trial being added to manual renewal orders. * Fix: copy the attributes of a catch all variation (i.e. attribute = "any") to renewal orders * Fix: extra tax rows displayed by the order details template when tax totals are displayed as a single total * Fix: do not allow a new subscription and subscription renewal to be purchased in the cart at the same time (until 2.0 where multiple subscriptions are supported) * Fix: synchronise subscriptions manually added to an order and make sure line total accounts for whether the subscription is synchronised 2014.08.01 - version 1.5.8 * Tweak: improve pointers for new installations * Tweak: display product/subscription removed notices with blue informational style instead of red error style * Tweak: when Mixed Checkout is enabled, honour WooCommerce's "Redirect to cart page" setting when adding a subscription to a cart which already contains a subscription (and therefore, is removed) * Tweak: if a store manager has manually created a subscription to a limited product but not set a user account on that subscription, make sure other non-logged in users can still purchase it (i.e. don't limit "Guest" users) * Tweak: display an admin notice if PayPal Credentials seem incorrect - PayPal provide no way to verify credentials but if an API request fails due to "Security header is not valid" it's most likely due to incorrect credentials * Tweak: display an admin notice if PayPal Profile ID's are using the pre-2009 S- prefix (and therefore, will not work with the new API) * Fix: incorrect line totals with non-period decimal separator when manually adding a subscription with a sign-up fee * Fix: display correct order totals when purchasing a subscription synchronised to every n weeks * Fix: do not include up-front shipping on shipping option price strings when the cart only contains a synchronised subscription with a first payment date other than the day of sign-up * Fix: display sign up fee with tax when the shop's base country is a taxable country, prices are entered excluding tax but prices should be displayed including tax * Fix: the "From:" price on a variable subscription when using tax inclusive pricing and prices in the shop are displayed including tax * Fix: display Action Scheduler's admin page when WP_DEBUG is set * Fix: pre-tax recurring % coupon and sign-up fee % coupon discount amounts displayed on cart and checkout totals when purchasing more than one of the same subscription * Fix: only trigger gateway scheduled subscription payment hook when a recurring amount needs to be charged - avoids duplicate renewal orders with some gateways like Stripe which generate a failed renewal order when the amount to charge is $0. * Fix: do not display switch messages on order received page when paying with PayPal * Fix: subscriptions synchronised to a week day on a site using a non-English locale * Fix: display of price string for subscriptions synchronised to Sunday each week 2014.07.15 - version 1.5.7 * Tweak: do not display "product deleted" error message when manually renewing a simple subscription that has since been changed to a variable subscription * Tweak: when an order to switch a subscription also contains non-subscription items, do not automatically transition it to completed as those items may need shipping * Fix: update Action Scheduler to work around issues when using ALTERNATE_WP_CRON * Fix: format recurring order total using WC 2.1 API functions to handle non-period decimal separators (e.g. ',') * Fix: initial payment on synchronised subscriptions when there is no sign-up fee * Fix: allow product and cart coupons to be applied to the cart when it contains products and a subscription with a free trial 2014.07.04 - version 1.5.6 * Tweak: add support for switching subscription products that include Product Addons * Tweak: when calculating next payment date, add additional safeguard against calculating a date for a subscription for 1 billing period * Fix: when a manual renewal order has been automatically cancelled by WooCommerce, do not allow the customer to reactive the associated subscription from their My Account page * Fix: compatibility with WooCommerce Additional Fees plugin * Fix: format renewal order tax totals using WC 2.1 API functions to handle non-period decimal separators (e.g. ',') 2014.06.24 - version 1.5.5 * Fix: handle the PayPal Express Checkout 'recurring_payment_suspended_due_to_max_failed_payment' IPN message because PayPal sends it for subscriptions created with PayPal Standard in lieu of any other payment failure notification. * Fix: synchronised payment date displayed on an order or the cart's totals for subscriptions that have no sign-up fee and are synchronised to the last day of the month (i.e. display "on last day of each month" not "on the 28th of each month"). * Fix: first payment date for synchronised subscription variations * Fix: recurring & sign-up fee coupons * Fix: only apply recurring % discount coupons to recurring component of initial payment (i.e. do not apply the % discount to simple/variable products too) * Fix: manual subscription renewals on subscriptions limited to "any status" * Fix: do not add Product Addons prices twice when renewing an expired or cancelled subscription 2014.06.12 - version 1.5.4 * New: 'processed_subscription_renewal_payment' and 'woocommerce_renewal_order_payment_complete' hooks * Tweak: allow store managers to limit a subscription to only one active subscription rather than just limiting regardless of status * Tweak: improve shipping price displayed in the order totals table after checkout and via the My Account page when the order includes recurring shipping * Tweak: when changing payment method, log the payment method's ID if its title is empty * Tweak: show the "Renew" button on a product's page if a customer has a limited subscription that is cancelled or expired * Tweak: if a customer has an active subscription to a subscription product limited to one per customer, display a notice on the product's page * Tweak: do not display limited subscription's "product removed from cart" notice when on checkout complete page for PayPal * Tweak: accept a status of "any" in the WC_Subscriptions_Manager::user_has_subscription() function * Tweak: group subscription pricing options in the Bulk Edit select box on the Edit Product screen for variable products * Fix: if using a blank payment method title, display "" on the Edit Order screen, not "Manual" * Fix: allow subscription products with an active subscription to be restored from the trash (but not permanently deleted) * Fix: display recurring totals correctly on the Edit Order screen on sites using a locale with a decimal separator other than '.' (e.g. ',') * Fix: do not carry switch related meta data to renewal orders - prevents renewal orders being marked as completed immediately * Fix: do not charge shipping up-front when purchasing a virtual non-subscription product in the same transaction as a physical subscription product * Fix: split recurring shipping taxes are split from recurring sales tax * Fix: switching subscriptions using a payment gateway which does not call the payment complete function * Fix: send correct initial payment to PayPal when purchasing products at the same time as a subscription that has a free trial * Fix: MySQL notice on Manage Subscriptions screen on servers with MySQL 5.6 or newer * Fix: only allow subscription renewal or switching of limited subscriptions when cart contains matching product ID 2014.05.28 - version 1.5.3 * Tweak: add classes to synchronised subscription product and order first payment dates so they can be hidden or styled * Tweak: let WC Core JS handle show/hide of a simple subscription's pricing fields on the Edit Product page and add 'woocommerce_subscription_product_types' filter to make it possible for other product types to use these fields * Tweak: pass full subscription array and order item to callbacks on the 'subscription_deleted' hook so callbacks can access the subscription's details * Fix: apportion totals correctly when upgrading a subscription that is for 1 billing period (e.g. "$19 for 1 month" not "$19 / month") or in the last billing period for its term (e.g. month 12 of a "$19 / month for 12 months" subscription) * Fix: charge shipping if purchasing physical products with a subscription even if there is a free trial * Fix: display correct shipping method labels when recurring shipping price differs to initial shipping price for that method * Fix: do not allow subscription products to be deleted when they have been purchased and the site is using a custom database prefix by fixing use of a hardcoded prefix in a query to count the active subscriptions for a product * Fix: if a subscription is synchronised to the 27th day of the month, synchronise payments to that day not the last day of the month. * Fix: send correct initial payment (sign-up fee) to PayPal when purchasing a synchronised subscription where the sign-up fee is the same as the recurring amount * Fix: if a subscription was purchased with standard products, do not include the totals of the standard products in the sign-up fee value for the subscription * Fix: add workaround for MySQL error "The SELECT would examine more than MAX_JOIN_SIZE rows" that occurs on some hosts (when subscriptions become a custom post type in v2.0 it will more effectively address the error) 2014.05.19 - version 1.5.2 * Tweak: if a non-supported version of WooCommerce is active (i.e. a version prior to 2.1), do not load Subscriptions and display a notice to update WooCommerce * Tweak: add update paths from Subscriptions version 1.1, 1.2 and 1.3 to version 1.5 (previously only version 1.4 to 1.5 was supported) * Tweak: improve the notice displayed on checkout when no gateways are available that support subscriptions * Tweak: store a record of the version installed before running an update * Tweak: make the row titles on the responsive My Subscriptions table translatable (by adding a data attribute on the table cells and passing it to the CSS psuedo element's content) * Fix: update .pot file for translation * Fix: do not charge shipping up-front on subscriptions with a free trial or synchronised to a date in the future * Fix: do not charge shipping on recurring items when purchasing a virtual subscription with physical products * Fix: display correct shipping total when no recurring shipping is being charged * Fix: make sure the variable subscription product type is registered on new installs * Fix: IPN handling when purchasing synchronised subscriptions with PayPal * Fix: invalid callback error in WC_PayPal_Standard_Subscriptions - not affecting any functionality * Fix: numeral suffix for numbers higher than 20 (e.g. 21st not 21th) 2014.05.13 - version 1.5.1 * Tweak: add span element around subscription price strings for custom pricing * Tweak: don't create redundant scheduled action when successfully processing an automatic scheduled renewal * Fix: prevent a switch request from being processed by or being added to the cart of a customer who does not own the original subscription * Fix: when saving a Variable Subscription product before variations are added, don't throw a "Warning: array_keys(): The first argument should be an array" notice. * Fix: make sure the "Used for variations" checkbox is visible when adding a custom attribute to a new Variable Subscription product 2014.05.05 - version 1.5 * Requires: WooCommerce 2.1 or newer and Subscriptions 1.4 or newer (if upgrading) * New: a subscription can now be purchased in the same transaction as other products. * New: subscriptions can be purchased in multiple quantities rather than having to be purchased individually * New: subscription renewal dates can now be synced to a specific day of the week, month or year * New: support for the Points & Rewards extension: points will now be rewarded for subscription renewals * New: completely new scheduler capable of scaling to hundreds of thousands of subscriptions & processing queues of thousands of simultaneous renewals * New: filter orders on the Orders administration screen to show only renewal orders (for any subscription) or only original orders i.e. those orders that are not automatically generated to record a subscription renewal * New: subscription switched email to notify store managers when a customer upgrades/downgrades their subscription (replaces the standard WooCommerce New Order email for subscription switches) * New: subscription switch email sent to customers when upgrading or downgrading a subscription (replaces the standard WooCommerce Order Complete and Processing Order emails for subscription switches) * New: added a filter for customising column content on the Manage Subscriptions administration screen (filter's hook name is 'woocommerce_subscriptions_list_table_column_content') * Tweak: the order created to record a subscription switch is now transitioned to "completed" status regardless of whether the subscription needs to be switched or not because the order is simply a record of the switch and not indicative of an item needing to be shipped * Tweak: the My Subscriptions section of the My Account page is now responsive * Tweak: move sign-up fee field to own row on the Edit Product screen to improve display on small screens * Tweak: when asked what type of product they are, variable subscriptions and subscription variations will now identify as both the subscription and standard equivalent (e.g. if a variable subscription is asked if it is a variable product, it will say yes, if a subscription variation is asked if it is a standard variation, it will say yes). * Tweak: in API responses, include variable subscriptions' children & subscription variations' parent objects (due to tweak in variable/variation self-identification above) * Tweak: limit subscription regardless of status to prevent the same customer account effectively being able to access more than one free trial period. More: http://docs.woocommerce.com/document/subscriptions/store-manager-guide/#limit-subscription * Tweak: only allow customers to purchase subscriptions with PayPal once the store's API credentials are entered * Tweak: prefill "Change" next payment date fields with date in site's timezone instead of next payment date in GMT/UTC timezone * Fix: fix stock management for variable subscriptions (due to the tweak above making variable subscriptions identify as variable products) * Fix: edit product links on Reports page for subscription variations (due to the tweak above making subscription variations identify as standard variations) * Fix: assorted fixes for data returned by API about subscriptions products (due to the tweak above making subscription variations identify as standard variations) * Fix: product meta section is only printed on the My Subscriptions table if the product has meta data (i.e. don't include an empty