Support » Plugin: Social Sharing Plugin - Sassy Social Share » Nice but how to add referral id

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Heateor Support

    (@heateor)

    Hi there,

    If you are talking about myCRED referral Id, you can append myCRED referral ID at the end of url being shared, from 3rd Party Integration section at plugin options page in admin.
    If you want to append some other referral id, you can use following code:

    /**
     * Append referral ID at the end of url being shared
     */
    function heateor_sss_append_referral_id( $post_url, $sharing_type, $standard_widget ) {
        
        $referral_id = "REFERRAL_ID";
        $connector = strpos( urldecode( $post_url ), '?' ) === false ? '?' : '&';
        $post_url .= $connector . 'ref=' . $referral_id;
    
        return $post_url;
    
    }
    add_filter( 'heateor_sss_target_share_url_filter', 'heateor_sss_append_referral_id', 10, 3 );

    “REFERRAL_ID” in above code is the referral ID you want to append at the end of url.

    Thread Starter mkmobi

    (@mkkhan)

    Thanks for your reply, No i am asking for affiliatewp

    Plugin Author Heateor Support

    (@heateor)

    You’re welcome.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Nice but how to add referral id’ is closed to new replies.