• Resolved nigelrs

    (@nigelrs)


    I am trying to get your software to work with Paid Membership Pro and WooCommerce.

    I logged in and created a membership account with paid membership pro. I decided that I would use the same username and sign up for an affiliate account.

    When I go to /affiliate-account/ it tells me – I am not enrolled in the affiliate program, please fill out the form below to apply. It auto fills out the registration form and allows me to join and tags me as an affiliate in the WP user database.

    However, if I already have a registered account in WP and then go to the /affiliate-registration/ page it just tells me that the username is already registered.

    I sort of understand the process, but it can be off putting for someone coming in anew, if it has this message, can you not have a link saying ‘go to your sign in page (not registration) and complete the process’ – otherwise potential affiliates may just leave at that point. Is there a way of doing this?

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author iova.mihai

    (@iovamihai)

    Hey @nigelrs,

    Thank you for reaching out! Yep, the way it currently works is somewhat unintuitive. We have some plans to refactor this part of the plugin to make it more user friendly. However, at this time I can’t say exactly when these changes will happen.

    In the meantime, I recommend you to add the following code to your website:

    function slicewp_custom_user_action_register_affiliate_new_message() {
    	
    	// Verify for nonce.
    	if ( empty( $_POST['slicewp_token'] ) || ! wp_verify_nonce( $_POST['slicewp_token'], 'slicewp_register_affiliate' ) ) {
            return;
        }
    	
    	if ( is_user_logged_in() ) {
    		return;
    	}
    	
    	$notice = '<p>This account already exists. Please firstly log into your account and then return to complete the registration.</p>';
    	
    	if ( ! empty( $_POST['user_login'] ) && username_exists( $_POST['user_login'] ) ) {
    		slicewp_user_notices()->register_notice( 'user_login_exists_error', $notice, 'error' );
    	}
    	
    	if ( email_exists( $_POST['user_email'] ) ) {
    		slicewp_user_notices()->register_notice( 'user_email_exists_error', $notice, 'error' );
    	}
    
    }
    add_action( 'slicewp_user_action_register_affiliate', 'slicewp_custom_user_action_register_affiliate_new_message', 60 );

    Please copy the code and add it to your website. If you’re not sure how to add code snippets to your site, you can use the Code Snippets plugin (https://www.ads-software.com/plugins/code-snippets/).

    The code will modify the default error message with a custom one. Please make sure to change the “This account already exists. Please firstly log into your account and then return to complete the registration.” text from the code to whatever you’d like to appear as the error.

    Please try it out and let me know how it goes.

    Thank you and best wishes,

    Mihai

    Thread Starter nigelrs

    (@nigelrs)

    Thank you, I have used code snippets, it is giving me this warning:

    Don’t Panic
    The code snippet you are trying to save produced a fatal error on line 5:

    syntax error, unexpected token “return”
    The previous version of the snippet is unchanged, and the rest of this site should be functioning normally as before.

    Line 5 is just the ‘return;’ in the code line below:

    if ( empty( $_POST[‘slicewp_token’] ) || ! wp_verify_nonce( $_POST[‘slicewp_token’], ‘slicewp_register_affiliate’ ) ) {
    return;

    Plugin Author iova.mihai

    (@iovamihai)

    Hey @nigelrs,

    Can you please try again by copying the code from this Github gist: https://gist.githubusercontent.com/IovaMihai/c92704db2eff9a3eb115a447ed1bfa1c/raw/09f2c8a64b23393117c6974a79738c7530281e54/slicewp_custom_user_action_register_affiliate_new_message

    I’m not sure why it’s throwing this error on your end. I’ve just retried the snippet on my end and it’s working nicely.

    Thank you and best wishes,

    Mihai

    Thread Starter nigelrs

    (@nigelrs)

    Thanks, this is working now and I have amended the text. Looking forward to road testing this out and seeing the best methods to recruit affiliates.

    Plugin Author iova.mihai

    (@iovamihai)

    Hey @nigelrs,

    Awesome! I’m happy to hear that it’s working now. If you face any other obstacles, just open a new support topic and I’ll get back to you as soon as possible.

    Thank you and best wishes,

    Mihai

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘User Clash Error Warning’ is closed to new replies.