Affiliates Manually Selecting/Adding Affiliate inof

OK, this one is for @Barry I think. @aecnu seems to agree.

is there any way to auto generate the affiliate URL without logging in, clicking edit. and choosing yes?

can it be done in a mysql client, by me?

my affiliates are registering on a form (not as a wp user at first), and my VA is entering them as wp users, so I just want to skip the step of her having to LOGIN as them.

here are the db rows in wp_usermeta for user # 9, named georgejetson:

446 9 enable_affiliate yes
447 9 affiliate_paypal
448 9 affiliate_reference georgejetson-44
449 9 affiliate_hash aff5cad61afb6ef626590c5c260fb41e437

446 is easy
447 is easy
448, I assume I can create a number after username-
449, what generates this hash, and I assume its used in the cookie?

I don’t think that is the URL hashed, I think it’s the cookie data

I have previous threads about the affiliate URL

@Barry ... thoughts?

  • aecnu
    • WP Unicorn

    Greetings andygrantonline,

    Thank you for the great question and indeed I will ask Barry to please offer his expertise on this subject since I could not resolve it in Live Chat.

    Though this may take a bit longer then a normal ticket, I will try to get him in here asap.

    Cheers, Joe

  • andygrantonline
    • The Incredible Code Injector


    What if....

    (and this might be a feature request worth considering in the short term)

    in addition to [affiliateuserdetails] there was a shortcode [affiliateusersetup] that did this:

    (see attachment)

    The reason is, the current [affiliateuserdetails] is not the best UX design. (Sorry Barry!)

    I have had MULTIPLE affiliates complain about how it is not intuitive, or they couldn't find how to get their URL.

    Today, using either the wp-admin section ( )

    or the shortcode [affiliateuserdetails] which displays the yellow box, the user has to do the following:

    1) you register
    2) you go to (either through a link, the shortcode, or the wp-admin sidebar
    3) you enable links
    4) you enter your paypal address
    5) you enter your URL
    6) you press update button

    THEN, you get the thank you message, and you have to look all the way to the right for the edit button to see your URL and banners.

    Barry, with all due respect, this is kludgy.

    Take a look at my idea in the attached mockup.

    Now, I need this in the next few days, so I have posted custom jobs, etc to do so. But if you guys can knock it out easily....

  • Barry
    • DEV MAN’s Mascot

    in the meantime, if there's a way I can generate or call the code create the affiliate_reference and affiliate_hash.....

    Yes. Take a look at lines 1199 to 1201 of affiliateshortcodes.php (easiest bit to find :slight_smile: )

    Line 1199 generates the reference
    Line 1200 stores the reference (if you are automatically generating the link yourself then this is were you need to store it).
    Line 1201 generates and stores the hash.

  • aecnu
    • WP Unicorn

    Greetings andygrantonline,

    Thank you for letting us know and with the lead developers last post, it appears this particular topic is now resolved/closed, if you need any further assistance please let us know.

    If it wasn't resolved, or you have any more questions related to this thread, please feel free to post them below including any new symptoms or errors and tick the 'Mark as Not Resolved (re-open)' box below the post area (or else we'll miss it!)

    Thank you for being a WPMU Dev Community Member and have a GREAT weekend!

    Cheers, Joe

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.