nl_tokens: Checks if a purchase can be cancelled . Returns true for purchases that aren t expired Also returns true for purchases whether or not they are after the refund period . Purchases included with a plan can t be cancelled .
pl_tokens: function isCancelable ( purchase ) { if ( isIncludedWithPlan ( purchase ) ) { return false ; } if ( isPendingTransfer ( purchase ) ) { return <mask> ; } if ( isExpired ( purchase ) ) { return false ; } if ( isRefundable ( purchase ) ) { return true ; } return purchase . canDisableAutoRenew ; }