automatically add user to wordpress?

The recommended method of customizing your AppGini-generated application is through hooks. But sometimes you might need to add functionality not accessible through hooks. You can discuss this here.
Post Reply
User avatar
D Oliveira
AppGini Super Hero
AppGini Super Hero
Posts: 347
Joined: 2018-03-04 09:30
Location: David

automatically add user to wordpress?

Post by D Oliveira » 2020-09-03 02:05

Hey guys, after a subscription is processed through hotmart, they send a call and my php script inserts a user in the database so my client has access to the appgini app. Now, Im trying to also add this user to have an account inside my wordpress, eventhough the file wp-load.php exists it seems to not work in order for the script to successfully use the function, it is located in the main directory and I am supposed to require wp-load.php to use wp functions in the script, such as:

Code: Select all

$result = wp_create_user('name', 'password', 'email');
Can anyone share a perspective of whats wrong in here?

Thank you.

Image

Image

Image

Image

Post Reply