• Resolved mkmobi

    (@mkkhan)


    Hi sir/mam, how ot add referral id like ?ref=current_user
    in end of all share buttons

Viewing 1 replies (of 1 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.

Viewing 1 replies (of 1 total)
  • The topic ‘How to add referral id ?ref=current_user’ is closed to new replies.