mirror of
https://github.com/pronamic/woocommerce-subscriptions.git
synced 2025-10-17 14:52:56 +00:00
2.2.7
This commit is contained in:

committed by
Remco Tolsma

parent
5e536ec717
commit
b99eba2f79
@@ -539,7 +539,8 @@ class WC_Subscription_Legacy extends WC_Subscription {
|
||||
public function set_status( $new_status, $note = '', $manual_update = false ) {
|
||||
|
||||
$old_status = $this->get_status();
|
||||
$new_status = 'wc-' === substr( $new_status, 0, 3 ) ? substr( $new_status, 3 ) : $new_status;
|
||||
$prefix = substr( $new_status, 0, 3 );
|
||||
$new_status = 'wc-' === $prefix ? substr( $new_status, 3 ) : $new_status;
|
||||
|
||||
wp_update_post( array( 'ID' => $this->get_id(), 'post_status' => wcs_maybe_prefix_key( $new_status, 'wc-' ) ) );
|
||||
$this->post_status = $this->post->post_status = wcs_maybe_prefix_key( $new_status, 'wc-' );
|
||||
@@ -746,4 +747,14 @@ class WC_Subscription_Legacy extends WC_Subscription {
|
||||
update_post_meta( $this->get_id(), $key, $value );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Save subscription date changes to the database.
|
||||
* Nothing to do here as all date properties are saved when calling @see $this->set_prop().
|
||||
*
|
||||
* @since 2.2.6
|
||||
*/
|
||||
public function save_dates() {
|
||||
// Nothing to do here.
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user