I am not so experienced in PHP, but I have managed to create a shortcode that would allow me to give users a direct 15 day free trial without having to use the paypal button. For some reason, I am not able to alter the user profile fields of user level and EOT although I know I am using the proper coding, so I have given that up for now.
It is senseless to make a user go through paypal to get a free(actually $0.01) trial. There should be an easy way to do this like what I am trying to do: I just want a button my user can click and get a free trial access period to my app page: meaning set their access level to 2, and set their eot for 2 weeks from today, when they would return to level 0. It should not require the massive amount of time I researched the php hooks and shortcode methodologies to make this happen. While these are interesting subjects, I just want to create a direct, no obligation way a user can try out my application before paying for a membership. I don’t know why my code would not work except to guess that those fields are protected from direct editing somehow. Why don’t the docs say anything about this?
I cannot make update_user_option or user->set_role() do what they are supposed to do regarding only those particular fields. Other fields work fine, I can display and edit the standard data fields just fine. Please help.