Api documentation problem

Good Day

I see no clear documentation on how to use your API. Not even examples.

I wish to add new users to Affiliate Pro on wordpress and woocommerce from our CRM, and then also send them the welcome email with your auto generated password.


Comments

One response to “Api documentation problem”

  1. Eugen Bleck Avatar
    Eugen Bleck

    Hi Bongani,

    Good evening. I trust you are well and safe!

    Thank you for reaching out. Even though Affiliates plugin doesn’t provide a REST API at the moment, you can still create an affiliate for a newly added user in a slightly different way. Once the new user is added to the WP site via a REST request I assume, you can make this user an affiliate using:
    https://github.com/itthinx/affiliates/blob/master/lib/core/class-affiliates-registration.php#L508

    For this case perhaps it would also be handy to check the hook for new users added via REST:
    https://developer.wordpress.org/reference/hooks/rest_insert_user/

    STAY SAFE and I wish you a very fine and productive day ahead!
    Best,
    Eugen.

Share