#ravelens-schedule-php
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- ravelens, 4 minutes ago, 18 messages
- ravelens-subs-changes, 45 minutes ago, 34 messages
- ravelens-setupinetnt-defaultpm, 2 hours ago, 9 messages
Sorry can you give me a more clear description of your problem
I tried to run command to cancel my scheduled subscription
But it returned error
And the error message is :
Non-static method Stripe\SubscriptionSchedule::cancel() cannot be called statically
Here is my code :
SubscriptionSchedule::cancel($current_plan->stripe_id);
And here is the error
"message": "Non-static method Stripe\SubscriptionSchedule::cancel() cannot be called statically",
"exception": "Error",
you're using an older way to use our stripe-php SDK and with your way you have to first retrieve the schedue and then cancel it (because the method is an instance method)
Ahh i see
So i need to retrieve first
Let me try first then
Thank you
And anyway you said i am using older way
May i know which one is newer one ?
ah sorry that's the one detailed in the link above
it's also what you see in all our docs, where you create a StripeClient first and then use like. $stripe->subscriptionSchedules->cancel() instead of \Stripe\SubscriptionSchedules::cancel()
ravelens-schedule-php
@high veldt any other question before we close this thread?
Yes, it solved my case
Thank you