How can i upgrade user plan via user-id without s2member form?

Is there any function or code which is use for upgrade user plan according to their user-id, i dont need upgrade via the level form because it required to fill the details when we click on the form,
and i want to upgrade the user plan directly when i run cron.

Hi.

I’m not sure I understand your question… Do you mean that you want to upgrade the user to a higher level after a certain time? If so, s2 doesn’t have something like that, although you could code something that would do it. https://s2member.com/kb-article/rolescapabilities-via-php/

Yes i want upgrade the user to a higher level after a certain time.
can you please let me know, to do this if we update user role and capablity then the new level plan will be work with their new recurring price or time?