• Resolved weblogik.ca

    (@solumedia)


    Hi, I need to get the actual affiliate custom slug from the current user’s cookie affiliate id in slicewp_aff to put it into a text field when the ?ref is not present anymore in the url (after site browsing or coming back few days later).

    Obviously we have the premium licence.

    Could you help me ?

    I found this script on another topic…

    function slicewp_custom_add_gravity_forms_field_value_affiliate( $value ) {
    	
    	if ( ! function_exists( 'slicewp_get_referrer_affiliate_id' ) ) {
    		return $value;
    	}
    	
        $affiliate = slicewp_get_affiliate( slicewp_get_referrer_affiliate_id() );
    	
    	if ( is_null( $affiliate ) ) {
    		return $value;
    	}
    	
    	$user = get_userdata( $affiliate->get( 'user_id' ) );
    	
    	$value = $user->user_login; // Value will be set to the user's username.
    	
    	return $value;
    	
    }
    add_filter( 'gform_field_value_affiliate', 'slicewp_custom_add_gravity_forms_field_value_affiliate' );
Viewing 1 replies (of 1 total)
  • Plugin Author iova.mihai

    (@iovamihai)

    Hey @solumedia,

    Thank you for reaching out! Considering that you have a premium license, please contact us via our website, here: https://slicewp.com/contact/

    These forums are exclusively for our core plugin and we cannot offer any support for paid features, as per the guidelines of the forum.

    Once you contact us via our website, I’ll get back to you as soon as possible.

    Thank you and best wishes,

    Mihai

Viewing 1 replies (of 1 total)
  • The topic ‘Get custom affiliate slug from affiliate id in cookie as slicewp_aff’ is closed to new replies.