mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -05:00
Updated action for continuing a subscription
refs https://github.com/TryGhost/Team/issues/530 A continueSubscription action has been added to handle continuing subscriptions as a different flow since we now have `smart_cancel` for the cancellation. The "continue subscription" button in Portal is updated to use the new action to correctly continue a subscription instead of old action which did both cancel and continue.
This commit is contained in:
parent
1caaa3f2fe
commit
778ffe2f81
2 changed files with 4 additions and 6 deletions
|
@ -318,9 +318,8 @@ const CancelContinueSubscription = ({member, onAction, action, brandColor, showO
|
|||
<CancelNotice />
|
||||
<ActionButton
|
||||
onClick={(e) => {
|
||||
onAction('cancelSubscription', {
|
||||
subscriptionId: subscription.id,
|
||||
cancelAtPeriodEnd: !subscription.cancel_at_period_end
|
||||
onAction('continueSubscription', {
|
||||
subscriptionId: subscription.id
|
||||
});
|
||||
}}
|
||||
isRunning={isRunning}
|
||||
|
|
|
@ -385,9 +385,8 @@ export default class AccountPlanPage extends React.Component {
|
|||
const subscription = getSubscriptionFromId({subscriptionId, member});
|
||||
const subscriptionPlan = getPlanFromSubscription({subscription});
|
||||
if (!cancelAtPeriodEnd) {
|
||||
this.context.onAction('cancelSubscription', {
|
||||
subscriptionId,
|
||||
cancelAtPeriodEnd
|
||||
this.context.onAction('continueSubscription', {
|
||||
subscriptionId
|
||||
});
|
||||
} else {
|
||||
this.setState({
|
||||
|
|
Loading…
Add table
Reference in a new issue