Merge branch 'release/2.1.1' into develop

This commit is contained in:
Remco Tolsma 2016-12-13 09:29:01 +01:00
commit 5f3551468f
8 changed files with 181 additions and 113 deletions

View File

@ -1,5 +1,11 @@
*** WooCommerce Subscriptions Changelog ***
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/

View File

@ -30,6 +30,10 @@ abstract class WCS_Scheduler {
$this->date_types_to_schedule = apply_filters( 'woocommerce_subscriptions_date_types_to_schedule', array_keys( wcs_get_subscription_date_types() ) );
}
protected function get_date_types_to_schedule() {
return $this->date_types_to_schedule;
}
/**
* When a subscription's date is updated, maybe schedule an event
*

View File

@ -54,6 +54,10 @@ class WC_Subscriptions_Admin {
// Add subscription pricing fields on edit product page
add_action( 'woocommerce_product_options_general_product_data', __CLASS__ . '::subscription_pricing_fields' );
// Add listener to clear our own transients when WooCommerce -> Clear Transients is
// triggered from the admin panel
add_action( 'woocommerce_page_wc-status', __CLASS__ . '::clear_subscriptions_transients' );
// Add subscription shipping options on edit product page
add_action( 'woocommerce_product_options_shipping', __CLASS__ . '::subscription_shipping_fields' );
@ -112,6 +116,44 @@ class WC_Subscriptions_Admin {
add_action( 'woocommerce_payment_gateways_settings', __CLASS__ . '::add_recurring_payment_gateway_information', 10 , 1 );
}
/**
* Clear all transients data we have when the WooCommerce::Tools::Clear Transients action is
* triggered.
*
* @since 2.1.1
*
* @return null
*/
public static function clear_subscriptions_transients() {
global $wpdb;
if ( empty( $_GET['action'] ) || empty( $_REQUEST['_wpnonce'] ) || ! wp_verify_nonce( $_REQUEST['_wpnonce'], 'debug_action' ) ) {
return;
}
if ( wc_clean( $_GET['action'] ) === 'clear_transients' ) {
$transients_to_delete = array(
'wc_report_subscription_by_product',
'wc_report_subscription_by_customer',
'wc_report_subscription_events_by_date',
);
// Load all transients with the prefix tlc_
$results = $wpdb->get_col( "SELECT DISTINCT `option_name`
FROM `$wpdb->options`
WHERE `option_name` LIKE '%transient_tlc_%'" );
foreach ( $results as $column ) {
$name = explode( 'transient_', $column, 2 );
$transients_to_delete[] = $name[1];
}
foreach ( $transients_to_delete as $transient_to_delete ) {
delete_transient( $transient_to_delete );
}
}
}
/**
* Add the 'subscriptions' product type to the WooCommerce product type select box.
*

View File

@ -27,7 +27,7 @@ class WCS_Action_Scheduler extends WCS_Scheduler {
*/
public function update_date( $subscription, $date_type, $datetime ) {
if ( in_array( $date_type, $this->date_types_to_schedule ) ) {
if ( in_array( $date_type, $this->get_date_types_to_schedule() ) ) {
$action_hook = $this->get_scheduled_action_hook( $subscription, $date_type );
@ -40,9 +40,7 @@ class WCS_Action_Scheduler extends WCS_Scheduler {
if ( $next_scheduled !== $timestamp ) {
// Maybe clear the existing schedule for this hook
if ( false !== $next_scheduled ) {
wc_unschedule_action( $action_hook, $action_args );
}
$this->unschedule_actions( $action_hook, $action_args );
// Only reschedule if it's in the future
if ( $timestamp > current_time( 'timestamp', true ) && ( 'payment_retry' == $date_type || 'active' == $subscription->get_status() ) ) {
@ -83,7 +81,7 @@ class WCS_Action_Scheduler extends WCS_Scheduler {
// Maybe clear the existing schedule for this hook
if ( false !== $next_scheduled && $next_scheduled != $event_time ) {
wc_unschedule_action( $action_hook, $action_args );
$this->unschedule_actions( $action_hook, $action_args );
}
if ( 0 != $event_time && $event_time > current_time( 'timestamp', true ) && $next_scheduled != $event_time ) {
@ -93,18 +91,17 @@ class WCS_Action_Scheduler extends WCS_Scheduler {
break;
case 'pending-cancel' :
$end_time = $subscription->get_time( 'end' ); // This will have been set to the correct date already
// Now that we have the current times, clear the scheduled hooks
foreach ( $this->action_hooks as $action_hook => $date_type ) {
wc_unschedule_action( $action_hook, $this->get_action_args( $date_type, $subscription ) );
$this->unschedule_actions( $action_hook, $this->get_action_args( $date_type, $subscription ) );
}
$end_time = $subscription->get_time( 'end' ); // This will have been set to the correct date already
$action_args = $this->get_action_args( 'end', $subscription );
$next_scheduled = wc_next_scheduled_action( 'woocommerce_scheduled_subscription_end_of_prepaid_term', $action_args );
if ( false !== $next_scheduled && $next_scheduled != $end_time ) {
wc_unschedule_action( 'woocommerce_scheduled_subscription_end_of_prepaid_term', $action_args );
$this->unschedule_actions( 'woocommerce_scheduled_subscription_end_of_prepaid_term', $action_args );
}
// The end date was set in WC_Subscriptions::update_dates() to the appropriate value, so we can schedule our action for that time
@ -118,9 +115,9 @@ class WCS_Action_Scheduler extends WCS_Scheduler {
case 'expired' :
case 'trash' :
foreach ( $this->action_hooks as $action_hook => $date_type ) {
wc_unschedule_action( $action_hook, $this->get_action_args( $date_type, $subscription ) );
$this->unschedule_actions( $action_hook, $this->get_action_args( $date_type, $subscription ) );
}
wc_unschedule_action( 'woocommerce_scheduled_subscription_end_of_prepaid_term', $this->get_action_args( 'end', $subscription ) );
$this->unschedule_actions( 'woocommerce_scheduled_subscription_end_of_prepaid_term', $this->get_action_args( 'end', $subscription ) );
break;
}
}
@ -163,6 +160,7 @@ class WCS_Action_Scheduler extends WCS_Scheduler {
*
* @param string $date_type Can be 'start', 'trial_end', 'next_payment', 'last_payment', 'expiration', 'end_of_prepaid_term' or a custom date type
* @param object $subscription An instance of WC_Subscription to get the hook for
* @return array Array of name => value pairs stored against the scheduled action.
*/
protected function get_action_args( $date_type, $subscription ) {
@ -177,4 +175,17 @@ class WCS_Action_Scheduler extends WCS_Scheduler {
return apply_filters( 'woocommerce_subscriptions_scheduled_action_args', $action_args, $date_type, $subscription );
}
/**
* Get the args to set on the scheduled action.
*
* @param string $$action_hook Name of event used as the hook for the scheduled action.
* @param array $action_args Array of name => value pairs stored against the scheduled action.
*/
protected function unschedule_actions( $action_hook, $action_args ) {
do {
wc_unschedule_action( $action_hook, $action_args );
$next_scheduled = wc_next_scheduled_action( $action_hook, $action_args );
} while ( false !== $next_scheduled );
}
}

View File

@ -418,8 +418,13 @@ class WCS_Cart_Renewal {
// Only hook in after WC()->checkout() has been initialised
if ( did_action( 'woocommerce_checkout_init' ) > 0 ) {
// Guard against the fake WC_Checkout singleton, see https://github.com/woocommerce/woocommerce-subscriptions/issues/427#issuecomment-260763250
remove_filter( 'woocommerce_checkout_get_value', array( &$this, 'checkout_get_value' ), 10, 2 );
$address_fields = array_merge( WC()->checkout()->checkout_fields['billing'], WC()->checkout()->checkout_fields['shipping'] );
add_filter( 'woocommerce_checkout_get_value', array( &$this, 'checkout_get_value' ), 10, 2 );
if ( array_key_exists( $key, $address_fields ) && false !== ( $item = $this->cart_contains() ) ) {
// Get the most specific order object, which will be the renewal order for renewals, initial order for initial payments, or a subscription for switches/resubscribes

View File

@ -328,7 +328,7 @@ function wcs_estimate_periods_between( $start_timestamp, $end_timestamp, $unit_o
* @return int number of leap days between the start and end timstamps
*/
function wcs_number_of_leap_days( $start_timestamp, $end_timestamp ) {
if ( ! is_int( $start_timestamp ) || ! is_int( $end_timestamp ) ) {
if ( ! is_numeric( $start_timestamp ) || ! is_numeric( $end_timestamp ) ) {
throw new InvalidArgumentException( 'Start or end times are not integers' );
}
// save the date! ;)
@ -645,7 +645,7 @@ function wcs_date_to_time( $date_string ) {
$date_obj = new DateTime( $date_string, new DateTimeZone( 'UTC' ) );
return $date_obj->format( 'U' );
return intval( $date_obj->format( 'U' ) );
}
/**

View File

@ -2,10 +2,10 @@
# This file is distributed under the same license as the WooCommerce Subscriptions package.
msgid ""
msgstr ""
"Project-Id-Version: WooCommerce Subscriptions 2.1.0\n"
"Project-Id-Version: WooCommerce Subscriptions 2.1.1\n"
"Report-Msgid-Bugs-To: "
"https://github.com/Prospress/woocommerce-subscriptions/issues\n"
"POT-Creation-Date: 2016-11-12 07:04:14+00:00\n"
"POT-Creation-Date: 2016-11-25 22:40:36+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
@ -15,74 +15,74 @@ msgstr ""
"X-Generator: grunt-wp-i18n 0.5.4\n"
"Language: en_US\n"
#: includes/admin/class-wc-subscriptions-admin.php:124
#: includes/admin/class-wc-subscriptions-admin.php:166
msgid "Simple subscription"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:125
#: includes/admin/class-wc-subscriptions-admin.php:167
msgid "Variable subscription"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:143
#: includes/admin/class-wc-subscriptions-admin.php:185
msgid "Choose the subscription price, billing interval and period."
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:156
#: includes/admin/class-wc-subscriptions-admin.php:198
#: templates/admin/html-variation-price.php:44
#. translators: placeholder is a currency symbol / code
msgid "Subscription price (%s)"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:159
#: includes/admin/class-wc-subscriptions-admin.php:201
msgid "Subscription interval"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:165
#: includes/admin/class-wc-subscriptions-admin.php:298
#: includes/admin/class-wc-subscriptions-admin.php:207
#: includes/admin/class-wc-subscriptions-admin.php:340
msgid "Subscription period"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:179
#: includes/admin/class-wc-subscriptions-admin.php:299
#: includes/admin/class-wc-subscriptions-admin.php:221
#: includes/admin/class-wc-subscriptions-admin.php:341
#: templates/admin/html-variation-price.php:66
msgid "Subscription length"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:182
#: includes/admin/class-wc-subscriptions-admin.php:224
msgid ""
"Automatically expire the subscription after this length of time. This "
"length is in addition to any free trial or amount of time provided before a "
"synchronised first renewal date."
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:191
#: includes/admin/class-wc-subscriptions-admin.php:233
#: templates/admin/html-variation-price.php:20
#. translators: %s is a currency symbol / code
msgid "Sign-up fee (%s)"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:193
#: includes/admin/class-wc-subscriptions-admin.php:235
msgid ""
"Optionally include an amount to be charged at the outset of the "
"subscription. The sign-up fee will be charged immediately, even if the "
"product has a free trial or the payment dates are synced."
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:204
#: includes/admin/class-wc-subscriptions-admin.php:246
#: templates/admin/html-variation-price.php:25
msgid "Free trial"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:207
#: includes/admin/class-wc-subscriptions-admin.php:249
#: templates/admin/deprecated/html-variation-price.php:115
msgid "Subscription Trial Period"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:239
#: includes/admin/class-wc-subscriptions-admin.php:281
msgid "One time shipping"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:240
#: includes/admin/class-wc-subscriptions-admin.php:282
msgid ""
"Shipping for subscription products is normally charged on the initial order "
"and all renewal orders. Enable this to only charge shipping once on the "
@ -90,53 +90,53 @@ msgid ""
"not have a free trial or a synced renewal date."
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:295
#: includes/admin/class-wc-subscriptions-admin.php:337
msgid "Subscription pricing"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:296
#: includes/admin/class-wc-subscriptions-admin.php:338
msgid "Subscription sign-up fee"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:297
#: includes/admin/class-wc-subscriptions-admin.php:339
msgid "Subscription billing interval"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:300
#: includes/admin/class-wc-subscriptions-admin.php:342
msgid "Free trial length"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:301
#: includes/admin/class-wc-subscriptions-admin.php:343
msgid "Free trial period"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:624
#: includes/admin/class-wc-subscriptions-admin.php:666
msgid ""
"Unable to change subscription status to \"%s\". Please assign a customer to "
"the subscription to activate it."
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:666
#: includes/admin/class-wc-subscriptions-admin.php:708
msgid ""
"Trashing this order will also trash the subscriptions purchased with the "
"order."
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:679
#: includes/admin/class-wc-subscriptions-admin.php:721
msgid "Enter the new period, either day, week, month or year:"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:680
#: includes/admin/class-wc-subscriptions-admin.php:722
msgid "Enter a new length (e.g. 5):"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:681
#: includes/admin/class-wc-subscriptions-admin.php:723
msgid ""
"Enter a new interval as a single number (e.g. to charge every 2nd month, "
"enter 2):"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:686
#: includes/admin/class-wc-subscriptions-admin.php:728
msgid ""
"You are about to trash one or more orders which contain a subscription.\n"
"\n"
@ -144,7 +144,7 @@ msgid ""
"orders."
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:699
#: includes/admin/class-wc-subscriptions-admin.php:741
msgid ""
"WARNING: Bad things are about to happen!\n"
"\n"
@ -156,13 +156,13 @@ msgid ""
"gateway."
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:700
#: includes/admin/class-wc-subscriptions-admin.php:742
msgid ""
"You are deleting a subscription item. You will also need to manually cancel "
"and trash the subscription on the Manage Subscriptions screen."
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:707
#: includes/admin/class-wc-subscriptions-admin.php:749
msgid ""
"Warning: Deleting a user will also delete the user's subscriptions. The "
"user's orders will remain but be reassigned to the 'Guest' user.\n"
@ -171,21 +171,21 @@ msgid ""
"subscriptions?"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:770
#: includes/admin/class-wc-subscriptions-admin.php:812
msgid "Active subscriber?"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:813
#: includes/admin/class-wc-subscriptions-admin.php:855
msgid "Manage Subscriptions"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:817
#: includes/admin/class-wc-subscriptions-admin.php:859
#: woocommerce-subscriptions.php:214
msgid "Search Subscriptions"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:837
#: includes/admin/class-wc-subscriptions-admin.php:933
#: includes/admin/class-wc-subscriptions-admin.php:879
#: includes/admin/class-wc-subscriptions-admin.php:975
#: includes/admin/class-wcs-admin-reports.php:55
#: includes/admin/reports/class-wcs-report-subscription-events-by-date.php:654
#: includes/class-wcs-query.php:93 includes/class-wcs-query.php:113
@ -194,23 +194,23 @@ msgstr ""
msgid "Subscriptions"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:973
#: includes/admin/class-wc-subscriptions-admin.php:1015
msgid "Button Text"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:980
#: includes/admin/class-wc-subscriptions-admin.php:1022
msgid "Add to Cart Button Text"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:981
#: includes/admin/class-wc-subscriptions-admin.php:1023
msgid ""
"A product displays a button with the text \"Add to Cart\". By default, a "
"subscription changes this to \"Sign Up Now\". You can customise the button "
"text for subscriptions here."
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:985
#: includes/admin/class-wc-subscriptions-admin.php:996
#: includes/admin/class-wc-subscriptions-admin.php:1027
#: includes/admin/class-wc-subscriptions-admin.php:1038
#: includes/class-wc-product-subscription-variation.php:75
#: includes/class-wc-product-subscription.php:122
#: includes/class-wc-product-variable-subscription.php:108
@ -219,11 +219,11 @@ msgstr ""
msgid "Sign Up Now"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:991
#: includes/admin/class-wc-subscriptions-admin.php:1033
msgid "Place Order Button Text"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:992
#: includes/admin/class-wc-subscriptions-admin.php:1034
msgid ""
"Use this field to customise the text displayed on the checkout button when "
"an order contains a subscription. Normally the checkout submission button "
@ -231,11 +231,11 @@ msgid ""
"changed to \"Sign Up Now\"."
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1004
#: includes/admin/class-wc-subscriptions-admin.php:1046
msgid "Roles"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1007
#: includes/admin/class-wc-subscriptions-admin.php:1049
#. translators: placeholders are <em> tags
msgid ""
"Choose the default roles to assign to active and inactive subscribers. For "
@ -244,46 +244,46 @@ msgid ""
"allocated these roles to prevent locking out administrators."
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1012
#: includes/admin/class-wc-subscriptions-admin.php:1054
msgid "Subscriber Default Role"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1013
#: includes/admin/class-wc-subscriptions-admin.php:1055
msgid ""
"When a subscription is activated, either manually or after a successful "
"purchase, new users will be assigned this role."
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1024
#: includes/admin/class-wc-subscriptions-admin.php:1066
msgid "Inactive Subscriber Role"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1025
#: includes/admin/class-wc-subscriptions-admin.php:1067
msgid ""
"If a subscriber's subscription is manually cancelled or expires, she will "
"be assigned this role."
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1045
#: includes/admin/class-wc-subscriptions-admin.php:1087
msgid "Manual Renewal Payments"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1046
#: includes/admin/class-wc-subscriptions-admin.php:1088
msgid "Accept Manual Renewals"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1051
#: includes/admin/class-wc-subscriptions-admin.php:1093
#. translators: placeholders are opening and closing link tags
msgid ""
"With manual renewals, a customer's subscription is put on-hold until they "
"login and pay to renew it. %sLearn more%s."
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1057
#: includes/admin/class-wc-subscriptions-admin.php:1099
msgid "Turn off Automatic Payments"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1062
#: includes/admin/class-wc-subscriptions-admin.php:1104
#. translators: placeholders are opening and closing link tags
msgid ""
"If you never want a customer to be automatically charged for a subscription "
@ -291,11 +291,11 @@ msgid ""
"more%s."
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1077
#: includes/admin/class-wc-subscriptions-admin.php:1119
msgid "Customer Suspensions"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1084
#: includes/admin/class-wc-subscriptions-admin.php:1126
msgid ""
"Set a maximum number of times a customer can suspend their account for each "
"billing period. For example, for a value of 3 and a subscription billed "
@ -305,28 +305,28 @@ msgid ""
"Set this to 0 to turn off the customer suspension feature completely."
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1088
#: includes/admin/class-wc-subscriptions-admin.php:1130
msgid "Mixed Checkout"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1089
#: includes/admin/class-wc-subscriptions-admin.php:1131
msgid "Allow subscriptions and products to be purchased simultaneously."
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1093
#: includes/admin/class-wc-subscriptions-admin.php:1135
msgid "Allow subscriptions and products to be purchased in a single transaction."
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1097
#: includes/admin/class-wc-subscriptions-admin.php:1139
#: includes/upgrades/templates/wcs-about-2-0.php:108
msgid "Drip Downloadable Content"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1098
#: includes/admin/class-wc-subscriptions-admin.php:1140
msgid "Enable dripping for downloadable content on subscription products."
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1102
#: includes/admin/class-wc-subscriptions-admin.php:1144
msgid ""
"Enabling this grants access to new downloadable files added to a product "
"only after the next renewal is processed.%sBy default, access to new "
@ -334,7 +334,7 @@ msgid ""
"customer that has an active subscription with that product."
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1138
#: includes/admin/class-wc-subscriptions-admin.php:1180
#. translators: $1-$2: opening and closing <strong> tags, $3-$4: opening and
#. closing <em> tags
msgid ""
@ -342,59 +342,59 @@ msgid ""
"start selling subscriptions!%4$s"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1143
#: includes/admin/class-wc-subscriptions-admin.php:1185
msgid "Add a Subscription Product"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1144
#: includes/admin/class-wc-subscriptions-admin.php:1186
#: includes/upgrades/templates/wcs-about-2-0.php:35
#: includes/upgrades/templates/wcs-about.php:34
#: woocommerce-subscriptions.php:944
msgid "Settings"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1230
#: includes/admin/class-wc-subscriptions-admin.php:1272
#. translators: placeholder is a number
msgid "We can't find a subscription with ID #%d. Perhaps it was deleted?"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1263
#: includes/admin/class-wc-subscriptions-admin.php:1268
#: includes/admin/class-wc-subscriptions-admin.php:1305
#: includes/admin/class-wc-subscriptions-admin.php:1310
#. translators: placeholders are opening link tag, ID of sub, and closing link
#. tag
msgid "Showing orders for %sSubscription %s%s"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1292
#: includes/admin/class-wc-subscriptions-admin.php:1334
#. translators: number of 1$: days, 2$: weeks, 3$: months, 4$: years
msgid "The trial period can not exceed: %1s, %2s, %3s or %4s."
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1297
#: includes/admin/class-wc-subscriptions-admin.php:1339
#. translators: placeholder is a time period (e.g. "4 weeks")
msgid "The trial period can not exceed %s."
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1353
#: includes/admin/class-wc-subscriptions-admin.php:1406
#: includes/admin/class-wc-subscriptions-admin.php:1395
#: includes/admin/class-wc-subscriptions-admin.php:1448
msgid "Yes"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1353
#: includes/admin/class-wc-subscriptions-admin.php:1395
msgid "No"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1389
#: includes/admin/class-wc-subscriptions-admin.php:1431
msgid "Automatic Recurring Payments"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1406
#: includes/admin/class-wc-subscriptions-admin.php:1448
msgid ""
"Supports automatic renewal payments with the WooCommerce Subscriptions "
"extension."
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1458
#: includes/admin/class-wc-subscriptions-admin.php:1500
#. translators: $1-2: opening and closing tags of a link that takes to Woo
#. marketplace / Stripe product page
msgid ""
@ -403,18 +403,18 @@ msgid ""
"the %1$sfree Stripe extension%2$s."
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1463
#: includes/admin/class-wc-subscriptions-admin.php:1505
msgid "Recurring Payments"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1471
#: includes/admin/class-wc-subscriptions-admin.php:1513
#. translators: placeholders are opening and closing link tags
msgid ""
"Payment gateways which don't support automatic recurring payments can be "
"used to process %smanual subscription renewal payments%s."
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1478
#: includes/admin/class-wc-subscriptions-admin.php:1520
#. translators: $1-$2: opening and closing tags. Link to documents->payment
#. gateways, 3$-4$: opening and closing tags. Link to woothemes extensions shop
#. page
@ -2131,7 +2131,7 @@ msgid_plural ""
msgstr[0] ""
msgstr[1] ""
#: includes/class-wcs-cart-renewal.php:613
#: includes/class-wcs-cart-renewal.php:618
msgid "All linked subscription items have been removed from the cart."
msgstr ""
@ -4052,7 +4052,7 @@ msgstr ""
msgid "http://prospress.com/"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:145
#: includes/admin/class-wc-subscriptions-admin.php:187
#. translators: placeholder is trial period validation message if passed an
#. invalid value (e.g. "Trial period can not exceed 4 weeks")
msgctxt "Trial period field tooltip on Edit Product administration screen"
@ -4062,12 +4062,12 @@ msgid ""
"subscription. %s"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:158
#: includes/admin/class-wc-subscriptions-admin.php:200
msgctxt "example price"
msgid "e.g. 5.90"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:192
#: includes/admin/class-wc-subscriptions-admin.php:234
#: templates/admin/deprecated/html-variation-price.php:31
#: templates/admin/deprecated/html-variation-price.php:86
#: templates/admin/html-variation-price.php:21
@ -4076,7 +4076,7 @@ msgctxt "example price"
msgid "e.g. 9.90"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:725
#: includes/admin/class-wc-subscriptions-admin.php:767
#. translators: placeholders are for HTML tags. They are 1$: "<h3>", 2$:
#. "</h3>", 3$: "<p>", 4$: "<em>", 5$: "</em>", 6$: "<em>", 7$: "</em>", 8$:
#. "</p>"
@ -4087,7 +4087,7 @@ msgid ""
"%6$sVariable subscription%7$s.%8$s"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:727
#: includes/admin/class-wc-subscriptions-admin.php:769
#. translators: placeholders are for HTML tags. They are 1$: "<h3>", 2$:
#. "</h3>", 3$: "<p>", 4$: "</p>"
msgctxt "used in admin pointer script params in javascript as price pointer content"
@ -4097,48 +4097,48 @@ msgid ""
"sign-up fee and free trial.%4$s"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1038
#: includes/admin/class-wc-subscriptions-admin.php:1080
msgctxt "option section heading"
msgid "Renewals"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1070
#: includes/admin/class-wc-subscriptions-admin.php:1112
msgctxt "options section heading"
msgid "Miscellaneous"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1078
#: includes/admin/class-wc-subscriptions-admin.php:1120
msgctxt "there's a number immediately in front of this text"
msgid "suspensions per billing period."
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1323
#: includes/admin/class-wc-subscriptions-admin.php:1365
msgctxt "in [subscriptions] shortcode"
msgid "No subscriptions found."
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1332
#: includes/admin/class-wc-subscriptions-admin.php:1374
#. translators: order number
msgctxt "in [subscriptions] shortcode"
msgid "Subscription %s"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1352
#: includes/admin/class-wc-subscriptions-admin.php:1394
msgctxt "label that indicates whether debugging is turned on for the plugin"
msgid "WCS_DEBUG"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1358
#: includes/admin/class-wc-subscriptions-admin.php:1400
msgctxt "Live or Staging, Label on WooCommerce -> System Status page"
msgid "Subscriptions Mode"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1359
#: includes/admin/class-wc-subscriptions-admin.php:1401
msgctxt "refers to staging site"
msgid "Staging"
msgstr ""
#: includes/admin/class-wc-subscriptions-admin.php:1359
#: includes/admin/class-wc-subscriptions-admin.php:1401
msgctxt "refers to live site"
msgid "Live"
msgstr ""
@ -4587,7 +4587,7 @@ msgctxt "input field placeholder for day field for annual subscriptions"
msgid "Day"
msgstr ""
#: includes/class-wcs-cart-renewal.php:642
#: includes/class-wcs-cart-renewal.php:647
msgctxt ""
"Used in WooCommerce by removed item notification: \"_All linked "
"subscription items were_ removed. Undo?\" Filter for item title."

View File

@ -5,7 +5,7 @@
* Description: Sell products and services with recurring payments in your WooCommerce Store.
* Author: Prospress Inc.
* Author URI: http://prospress.com/
* Version: 2.1.0
* Version: 2.1.1
*
* Copyright 2016 Prospress, Inc. (email : freedoms@prospress.com)
*
@ -126,7 +126,7 @@ class WC_Subscriptions {
public static $plugin_file = __FILE__;
public static $version = '2.1.0';
public static $version = '2.1.1';
private static $total_subscription_count = null;
@ -182,10 +182,10 @@ class WC_Subscriptions {
add_action( 'in_plugin_update_message-' . plugin_basename( __FILE__ ), __CLASS__ . '::update_notice', 10, 2 );
$scheduler_class = apply_filters( 'woocommerce_subscriptions_scheduler', 'WCS_Action_Scheduler' );
self::$cache = WCS_Cache_Manager::get_instance();
$scheduler_class = apply_filters( 'woocommerce_subscriptions_scheduler', 'WCS_Action_Scheduler' );
self::$scheduler = new $scheduler_class();
}