Subscription post statuses
-
Hi,
I noticed that when upgrading from version <8 to >8 (old versions, but still persists in 9.2.1), not all post statuses are longer available for subscriptions.
Comparing file vendor/wp-pay/core/views/meta-box-subscription-update.php:
version 7.0.2:$states = SubscriptionPostType::get_states(); foreach ( $states as $subscription_status => $label ) { printf( '<option value="%s" %s>%s</option>', esc_attr( $subscription_status ), selected( $subscription_status, $post->post_status, false ), esc_html( $label ) ); }
version 9.2.1:
$states = SubscriptionPostType::get_states(); $states_options = [ 'subscr_active', 'subscr_cancelled', 'subscr_on_hold', ]; foreach ( $states as $subscription_status => $label ) { if ( ! in_array( $subscription_status, $states_options, true ) && $subscription_status !== $post->post_status ) { continue; } printf( '<option value="%s" %s>%s</option>', esc_attr( $subscription_status ), selected( $subscription_status, $post->post_status, false ), esc_html( $label ) ); }
In the changelog and in this forum i can’t seem to find any information about this change. Can you tell me a little more about why this change happened?
If we used subscr_completed before, would we use subscr_cancelled now?
Thanks,
Sten
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Subscription post statuses’ is closed to new replies.