mirror of
https://github.com/pronamic/woocommerce-subscriptions.git
synced 2025-10-17 14:52:56 +00:00
Updates to 6.3.1
This commit is contained in:
@@ -57,7 +57,7 @@ class WC_Subscription extends WC_Order {
|
||||
'billing_period' => '',
|
||||
'billing_interval' => 1,
|
||||
'suspension_count' => 0,
|
||||
'requires_manual_renewal' => 'true',
|
||||
'requires_manual_renewal' => true,
|
||||
'cancelled_email_sent' => false,
|
||||
'trial_period' => '',
|
||||
|
||||
@@ -365,7 +365,7 @@ class WC_Subscription extends WC_Order {
|
||||
}
|
||||
break;
|
||||
case 'pending-cancel' :
|
||||
// Only active subscriptions can be given the "pending cancellation" status, becuase it is used to account for a prepaid term
|
||||
// Only active subscriptions can be given the "pending cancellation" status, because it is used to account for a prepaid term
|
||||
if ( $this->payment_method_supports( 'subscription_cancellation' ) ) {
|
||||
if ( $this->has_status( 'active' ) ) {
|
||||
$can_be_updated = true;
|
||||
@@ -953,10 +953,10 @@ class WC_Subscription extends WC_Order {
|
||||
* The more aptly named set_schedule_start() cannot exist because then WC core thinks the _schedule_start meta is an
|
||||
* internal meta key and throws errors.
|
||||
*
|
||||
* @param string $schedule_start
|
||||
* @param string $schedule_start The date to set the start date to. Should be a WC_DateTime or a string in the format 'Y-m-d H:i:s' (UTC).
|
||||
*/
|
||||
public function set_start_date( $schedule_start ) {
|
||||
$this->set_prop( 'schedule_start', $schedule_start );
|
||||
$this->set_date_prop( 'start', is_a( $schedule_start, 'WC_DateTime' ) ? $schedule_start : wcs_date_to_time( $schedule_start ) );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2773,7 +2773,7 @@ class WC_Subscription extends WC_Order {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Pass a timestamp to the WC 3.0 setters becasue WC expects MySQL date strings to be in site's timezone, but we have a date string in UTC timezone
|
||||
// Pass a timestamp to the WC 3.0 setters because WC expects MySQL date strings to be in site's timezone, but we have a date string in UTC timezone
|
||||
$timestamp = ( $datetime > 0 ) ? wcs_date_to_time( $datetime ) : 0;
|
||||
|
||||
$this->set_last_order_date( 'date_paid', $timestamp );
|
||||
|
Reference in New Issue
Block a user