MCPcopy Create free account
hub / github.com/codecombat/codecombat / hasSubscription

Function hasSubscription

app/core/store/modules/me.js:136–150  ·  view source on GitHub ↗
(state)

Source from the content-addressed store, hash-verified

134 },
135
136 hasSubscription (state) {
137 if (state.payPal && state.payPal.billingAgreementID) {
138 return true
139 }
140
141 if (state.stripe && (state.stripe.sponsorID || state.stripe.subscriptionID || state.stripe.free === true)) {
142 return true
143 }
144
145 if (state.stripe && typeof state.stripe.free === 'string') {
146 return new Date() < new Date(state.stripe.free)
147 }
148
149 return false
150 },
151
152 isPremium (state, getters) {
153 return getters.isAdmin || getters.hasSubscription || getters.isInGodMode

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected