Forum Replies Created
October 4, 2011 at 10:45 pm in reply to: Has anyone tried integrating WP Affiliate with Jigoshop / WooCommerce? #37177
They don’t have an API right now but they are interested in supporting third-party plugins. They asked if the developers could contact firstname.lastname@example.org to get a discourse going and to see exactly what you guys need so they can start building in support. Just wanted to pass that along.July 17, 2011 at 9:49 pm in reply to: eMember not properly assigning WordPress user roles #33462
Sorry for the massive delay in replying to my original thread, I’ve been so busy I have not had a chance to upgrade the plugin and test everything out.
I am happy to report that everything appears to be working now. The last few users who have registered appear to be given the proper forum permissions as well. I’ll report back if anything goes wrong but the fix appears to be working, thanks so much!
My bad, I got the two lines mixed up. I thought you had ADDED the 11 the first time to make the fix, not taken away. That did the trick, thank you!
It seems this fix is no longer working, perhaps it is related to WordPress 3.2?
I have updated to the latest versions of both eMember and the eStore plugin and I am having the same issue all over again. Please help!June 24, 2011 at 2:38 am in reply to: eMember not properly assigning WordPress user roles #33449
I think you misunderstood me, I have that option checked off as in enabled, not checked off as in not enabled.
I have all three check boxes in that field checkmarked as outlined in the documentation you provided (I referenced that when I was initially setting up the site).June 23, 2011 at 6:21 pm in reply to: eMember not properly assigning WordPress user roles #33447
Yes I have that setting checked off. I have created the custom WordPress roles for each membership level, and have set the appropraite settings in the SimplePress settings assigning those roles to the corresponding forum.
When I create a test user and assign the role using the WordPress User management system, that user is placed into the forum usergroup that I indicate in my simplepress settings. However, when customers register through eMember and the user role is assigned that way, the user is not placed into the corresponding usergroup even though it shows that they have been assigned the necessary user role.
Other members on the simplepress forum have reported similar issues (see the thread I posted at the beginning of this one).June 22, 2011 at 8:37 pm in reply to: eMember not properly assigning WordPress user roles #33445
Well I just checked out two new customers who actually followed through with the registration, the first one was not assigned a role at all and the second was assigned the proper role but it still does not appear to have assigned it properly as they do not have access to the forum as they should.June 21, 2011 at 3:03 am in reply to: eMember not properly assigning WordPress user roles #33443
Fair enough. So I’m assuming that this only works with people who register through eMember correct? I can’t take an existing user, add them to one of my membership levels, and expect them to be added to the custom WP role I’ve assigned that level, right?
I’ll have to wait and see what happens the next time a user registers after making a purchase, I’ll let you know how it goes.June 20, 2011 at 3:11 am in reply to: eMember not properly assigning WordPress user roles #33441
Thank you I will, can you tell me which file(s) in particular you changed? I’ve done some customizations that I don’t want to have to go back and redo.June 17, 2011 at 8:03 pm in reply to: eMember not properly assigning WordPress user roles #33439
Sounds good, thank you very much for looking into this.June 17, 2011 at 6:36 am in reply to: eMember not properly assigning WordPress user roles #33437
When they register for the first time.June 17, 2011 at 5:11 am in reply to: eMember not properly assigning WordPress user roles #33435
Here is his (very lengthy) response:
I dont understand their question… you posted the codex page for the wp create user function… and it does exactly what I said it does… takes username, pw and email as input… so any user created with that function will get the default wp role…
I said, if you wanted to create a user with a non default wp role, I would use wp_insert_user function where you can set any value of the wp user class object… this is the codex page:
all very standard…
and to be clear, the wp function wp_create_user() function will call the wp_insert_user() function anyways, just passing the user object with the username, pw and email as the only filled in elements…
both files are located in wp-includes/user.php
Now if you want to create a user with the default wp role, then calling wp_create_user() is just fine and dandy… But I think we are actually more concerned here with what happens when the membership plugin wants to change the role of a user. That’s when plugins, in this case, simple press, need to know you changed a user role…
I think perhaps where confusion lies is when I referenced the wp hook for setting the user role, so I will try to clarify…
If you take a look at the wp-includes/user.php and look at the wp_insert_user() function (remember, it gets called even for wp_create_juser), down towards the bottom, you will see this code
if ( isset($role) )
elseif ( !$update )
That is where wp sets the desired role for the new user… for wp_create_user() calls, it will be the default wp role… for direct calls to wp_insert_user(), it will be whatever you set for the role in the user class object… if empty, it will also yield the default wp role…
that user class and the class function are defined in wp-includes/capabilities.php. if you look in that set_role function, when wp sets the role for the given user, WP fires the hook
via the code
do_action( ‘set_user_role’, $this->ID, $role );
All I was suggesting was that if when changing the role for a given user, you didnt want to use the wp api and the user class and the set_role() function, you could simply fire the hook yourself via
do_action( ‘set_user_role’, $userid, $role );
again, ALL very standard… any plugin or theme can fire any wp action or filters, not just core… so if the membership plugin is changing the user role by direct db manipulation instead of the api, then just fire the wp hook via the code:
do_action( ‘set_user_role’, $userid, $role );
to let other plugins know that a user role was modified… pass in the user id and the new role for the user as part of the hook action…
hope that clears it up…June 16, 2011 at 5:18 am in reply to: eMember not properly assigning WordPress user roles #33433
do_action( ‘set_user_role’, $this->ID, $role ); is what he recommends.June 16, 2011 at 3:26 am in reply to: eMember not properly assigning WordPress user roles #33432
I’ll post that in the thread, the developer over there also said something about a set_user_role hook.June 6, 2011 at 7:02 pm in reply to: Does eMember/eStore remember a customer/WP user even after they're deleted? #33099
Alright I had someone else test it for me and it works just great, I have answered all my questions already so disregard this thread. Sorry for jumping the gun.