Support » Plugin: PW WooCommerce Affiliates » How to replace the affiliate link with the affiliate code on the user side ?

  • Resolved worldless

    (@worldless)


    Hello. I’d like to have the affiliate code displayed on the user side instead of the link. is there any hook to replace it ?

    I ran into a similar thread and I tried to remove get_site_url():
    https://wordpress.org/support/topic/how-to-change-the-default-affiliate-url/

    function custom_pw_affiliates_shop_page_url( $url ) {
        // Change this to suit your needs:
        return get_site_url();
    }
    add_filter( 'pw_affiliates_shop_page_url', 'custom_pw_affiliates_shop_page_url' );

    but this is what I got instead: affiliate=UserCode?

Viewing 15 replies - 1 through 15 (of 19 total)
  • Plugin Author pimwick

    (@pimwick)

    If you have PW Affiliates Pro then you can allow the Coupon Code field to accept the affiliate’s code. That way the affiliate code is displayed on the user side instead of a link.

    WordPress.org doesn’t allow supporting Pro plugins using their forums so I am marking this thread as resolved. If you have further questions please contact us at our website: https://www.pimwick.com

    Thanks for understanding!

    Thread Starter worldless

    (@worldless)

    Did I request for a pro version ?! did I say that I wanted to use the Coupon system ? and why did you mark this thread as resolved without waiting for my answer at least for a couple of days ?!

    First of all, I’ve already disabled the Coupon and second, I simply want some of my affiliates to add their codes to the product links of a specific category. in other words, some affiliates are only responsible for advertising specific products. so displaying the entire link for them is meaningless.

    I don’t need any pro feature for this. I can send them emails and let them know after creating their account.

    Plugin Author pimwick

    (@pimwick)

    Sorry, I misunderstood your request.

    Affiliates can add their code to any link on your store, including category URLs. So for example:

    https://yourstore.com/product-category/example?affiliate=UserCode

    Thread Starter worldless

    (@worldless)

    No problem. Umm not the entire category… each product of the category. lemme explain it in detail, what I want them to do is, create all those posts (from that specific category) on their social network and then use their code for each and every product. for example:

    This is your code: XKJS983
    Now add ?affiliate=XKJS983 at the end of each link
    Remember: You are only allowed to share the products from this specific category

    So on the user side, I only want the user to see the code: XKJS983

    Plugin Author pimwick

    (@pimwick)

    It seems your instructions to the affiliate are correct, they can append ?affiliate=XKJS983 to any URL for your shop and they will get credit for the sale.

    There isn’t a way to limit a specific category of products to be associated with the affiliate. For example, if a visitor clicks the affiliates link for Product X but decides to purchase Product Y instead, the affiliate will still receive the commission for Product Y even though it isn’t the same category as Product X.

    I’m a little confused by who the “user” is when you say “So on the user side, I only want the user to see the code” so I might be misunderstanding your request. Do you mean the affiliate or the person who will be clicking on the link?

    Thread Starter worldless

    (@worldless)

    I’m sorry I meant the affiliate. I only want the code to be visible on their account instead of the link !

    It’s not a matter of a visitor clicking on other products through other links or an affiliate receiving the commission form other products. the point here is, I just want to force/limit affiliates to advertise the products only from a specific category. that’s it !

    Plugin Author pimwick

    (@pimwick)

    I only want the code to be visible on their account instead of the link
    The affiliate isn’t shown their code anywhere, you share the link with them.

    I just want to force/limit affiliates to advertise the products only from a specific category
    Our plugin doesn’t have the option to limit affiliates to advertise products from a specific category.

    Thread Starter worldless

    (@worldless)

    The affiliate isn’t shown their code anywhere, you share the link with them.
    BUT I WANT TO REMOVE THE LINK USING A HOOK !!!!!!!!!
    IS IT THAT HARD TO UNDERSTAND ?

    Our plugin doesn’t have the option to limit affiliates to advertise products from a specific category.
    I DON’T NEED YOUR PLUGIN FOR ANY OPTION. I SAID I’M GOING TO SEND ALL THOSE INFO TO AFFILIATES THROUGH EMAIL

    I should have guessed that you were not going to help so I’m gonna downvote this.

    Plugin Author pimwick

    (@pimwick)

    BUT I WANT TO REMOVE THE LINK USING A HOOK !!!!!!!!!
    IS IT THAT HARD TO UNDERSTAND ?

    Clearly, lol

    What link are you wanting to remove? The only “link” is in the admin area in your dashboard. The affiliate doesn’t get to see anything.

    Maybe if you send me a screenshot of what you are trying to modify that will help me understand the request.

    Thread Starter worldless

    (@worldless)

    Look, honestly I don’t want your help anymore but since you asked for a screenshot, here it is:

    Screenshot

    Edit: You can safely mark this thread as resolved now

    • This reply was modified 3 months ago by worldless.
    Plugin Author pimwick

    (@pimwick)

    The screenshot has been deleted so I can’t see the screen you need help with.

    Sorry that I didn’t understand your request, if you need help just reply to this thread, even when resolved we see the responses.

    Best of luck with your store!

    Thread Starter worldless

    (@worldless)

    In case you pretended the screenshot has been deleted, I post the text version of the screenshot:

    THE FIRST POST IS THE SCREENSHOT

    Likewise !

    Plugin Author pimwick

    (@pimwick)

    Ok I can see that screenshot. I should have been more clear, I meant a screenshot of the place in the plugin you want to change.

    I do not understand what you are wanting to change in the plugin that the affiliate sees. They do not see your admin dashboard.

    Sorry if I seem dense, it is just that I don’t understand what you are trying to change in the plugin so that I can provide a solution.

    Thread Starter worldless

    (@worldless)

    You know what ? I really love your attitude. no seriously. I mean it. you’re trying so hard to outsmart me but you fail at the end. I also adore some of your techniques BTW and I’m really thinking of promoting your stars ! please keep it up !

    Ok I can see that screenshot. I should have been more clear
    Checkmate! I expected better from you 🙂

    I meant a screenshot of the place in the plugin you want to change.
    I know exactly what you meant and the hook on the first post is beyond any screenshot. it’s your language. I simply said that I wanted to replace the url with the >>>>code<<<<. AS SIMPLE AS THAT !!!! c’mon man ! 🙂

    I do not understand what you are wanting to change in the plugin that the affiliate sees. They do not see your admin dashboard.
    🙂

    YES, you’re 100% right. they DO NOT really have the link of their own in their user account. (100%) (why would they even need an affiliate link ?!! 🙂 ) and when you say “they do not see your admin dashboard” who said anything about the admin dashboard ?!! keep trying to overcomplicate things! 🙂

    Sorry if I seem dense, it is just that I don’t understand what you are trying to change in the plugin so that I can provide a solution.
    🙂

    WOW. amazing. you can’t understand your own code ? you dunno where this hook refers to?

    function custom_pw_affiliates_shop_page_url( $url ) {
        // Change this to suit your needs:
        return get_site_url();
    }
    add_filter( 'pw_affiliates_shop_page_url', 'custom_pw_affiliates_shop_page_url' );

    Hmmm.. interesting!! this hook has nothing to do with the admin dashboard!!!! it’s actually the affiliate dashboard !! how come you understood how to change the url from “shop” to “homepage” in the support link below ?:
    https://wordpress.org/support/topic/how-to-change-the-default-affiliate-url/

    and all of a sudden you confused it with the admin dashboard ?!!

    I really enjoyed it.. seriously.

    Looking forward to your next move ! you can make it. I promise you.

    Plugin Author pimwick

    (@pimwick)

    I think that I (finally) understand!

    When an affiliate logs in and goes to the Affiliate Dashboard from the “My Account” page, there is an “Affiliate URL” displayed at the top. You want this to instead be the affiliate’s code and not a URL.

    I was confused because the pw_affiliates_shop_page_url hook will always return a URL. This hook is used inside the pwwa_affiliate_url() function which (as the name implies) returns a URL and it is used throughout the plugin, including the Admin dashboard.

    Instead of trying to use that hook, you can override the template for the frontend Affiliate Report. That way you can also change “Affiliate URL” title header to be “Affiliate Code” as well.

    Follow our guide here to customize the Affiliate Report template:
    https://www.pimwick.com/pw-faq/affiliate-report-template-front-end/

    I hope this is the solution you are after and you can reconsider your 1 star rating. If I am still not understanding, well…I guess you win 😉

Viewing 15 replies - 1 through 15 (of 19 total)
  • You must be logged in to reply to this topic.