Pro Site Upgrade not showing in Affiliate Referrals

I am using Pro Site together with Affiliate plugin, both network activated. A website is created via Gravity Forms and User Registration add-on. Everything is fine when the website is created, I can see in the Affiliate Referrals chart that there's an increment in Sign Up count. However, whenever I upgrade the newly created website to pro successfully, the referrer does not get credit. In Pro Site's affiliate settings, I already put values (see screenshot) but still nothing is credited to the referrer. I am using stripe as payment gateway and it is in test mode. The transaction is recorded on stripe and the webhook shows Success status. What could be the reason why the referrer is not credited with the site upgrade?

  • Kasia Swiderska

    Hello Dave,

    I did some tests on your site and Affliates works correctly when the natural flow of creating site (directly from the Pro Site page) is used. It counts clicks, singups and paid subscriptions (you can check that for user wpmudev and referred site wpmudev1).
    But when custom gravity form is used there is no tracking of who referred site (you can see that one the list of the all sites - only wpmudev1 has "Referred by").
    It looks like you are using some custom script for creating sites - would it be possible for you to share it with us? Then I can check with one of the devs why this is not working and what can we do to make it working together.

    kind regards,

  • Dave

    Hi Kasia,

    I am only using Gravity Forms + User Registration Add-on. In User Registration settings, I enabled "Create new site when a user registers". I did not use any custom coding to create it. There was a little customization but it is only to display the template selector and set password of the user. It should not affect the default flow of creating the site using the User Registration add-on. I was hoping that whenever the user clicks first the referral link then create a website using the form, the website will be created with a "Referred By". Alternatively, how can I add a "Referred By" field on the gravity form and use that as the referrer when the form is submitted to create a website?


  • Kasia Swiderska

    Hello Dave,

    I'm sorry for the delay - I had to escalate this to our Second Line Support developers. I've run additional tests on my site and my suspicion is that Gravity is not using the same action for creating new site that Pro Sites and Affiliates is not recognizing site creation (hence the field if reffered by is not filled). If that site is not tied with Referring user, then paid upgrade is not recognized.
    Our developers are checking if it's possible to make Affliates working with Gravity forms and we will update thread when we will have more information about the solution.

    kind regards,

  • Ivan

    Hi Dave !

    You could try adding the following snippet in a MU plugin ( more info about MU plugins is here )

    function wpmu_affiliate_with_creation_subdomain( $blog_id, $user_id, $domain, $path, $site_id, $meta ) {
    	if ( class_exists( 'affiliate' ) ) {
    		$affiliate = new affiliate();
    		$affiliate_user_id = $affiliate->get_affiliate_user_id_from_hash();
    		if ( ! empty( $affiliate_user_id ) ) {
    			$meta['affiliate_referred_by'] = $affiliate_user_id;
    			$affiliate->wpmu_activate_blog( $blog_id, $user_id, '', '', $meta );
    add_action( 'wpmu_new_blog', 'wpmu_affiliate_with_creation_subdomain', 10, 6 );


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.