Forum Replies Created
-
AuthorPosts
-
ChuchoMember
[UPDATE]
Writing this post gave me a new idea and checked the installation files of the old website that the company used to have.
You were absolutely right, that IPN url was coming from their old Drupal site. That issue is solved now!
My only problem right now are the users that from time to time don’t get upgraded after payment. Do you have any clue on where to look at? Thanks again!
ChuchoMemberHi, and sorry about the late reply, we wanted to check properly our members list.
Answering to your questions:
– I also thought that the IPN url I pasted was from a different plugin, but I still haven’t been able to locate it (will keep asking around).
– We are using direct Paypal buttons. You can see them live here: [http://ultimocero.com/hazte-complice/]
And some extra information I managed to gather:
– I detected a few eMember users that are currently marked as ‘Free’ ones, but checking the Paypal dashboard I can see that they correctly paid for the yearly account. This only happens from time to time (1 every 5 or so), between them I can see other users that paid for that account and have been placed in the right membership level, as it used to happen before Paypal started sending us the emails.
– Just in case it helps, right now in our Paypal account IPN notifications are Active and pointing towards ‘http://www.ultimocero.com’
– The advanced settings in our buttons show: notify_url=http://ultimocero.com/?emember_paypal_ipn=1
custom=subsc_ref=5 (or ref=4, or ref=3)
Many thanks for the help,
Ch
ChuchoMemberHi, We have also received an email from Paypal saying to check our server because “the IPN we are sending to the following URL are failing”:
[http://www.ourdomain.com/uc_recurring_hosted/paypal/ipn/12]
Could it be somehow related to Linda’s issue?
Many thanks in advance,
Chucho
March 10, 2016 at 6:53 am in reply to: The language of the Country Section cannot be modified by language files #59200ChuchoMemberExactly, offering all the countries in the language of the website.
Just thinking out loud, if they are hard coded… Perhaps a piece of javascript to replace them on the user-side could work?
March 8, 2016 at 9:33 am in reply to: The language of the Country Section cannot be modified by language files #59198ChuchoMemberHi! Sorry to revive this old post.
By any chance did you guys implement a way of translating the list of countries from the dropdown?
That would be great!
March 3, 2016 at 4:05 pm in reply to: eMember – Show First name and Subscription level on comments #72616ChuchoMemberThanks for the new code! I’ll give it a try to see if I can replace it, or combine both of them
March 2, 2016 at 12:14 pm in reply to: eMember – Show First name and Subscription level on comments #72614ChuchoMemberHi again,
I finally managed to solve my problem, so here are some clues if someone is looking to do the same.
(Note: The code still needs some polishing, but it already works and could serve well as an starting point)
My requirements:
– Show first and last name of the user who commented a post (easy task).
– Show the membership level of the user who placed the comment, only if it’s a paid membership (slightly more tricky).
My solution:
– Given that I couldn’t find a way to retrieve the details I needed from the eMember system, I used the ‘WordPress User Integration functionality’ to replicate my members in the regular WP tables.
– Also, for my second requirement, I had to create two new user roles in WP (please google how to do it) and assign them to my free and my paid eMember membership levels (you can define it on the ‘Membership level’ panel).
Now, in your template ‘comments.php’, add the following code (also works on child themes) to define the variables:
Code:// Find out the commenter First and Last name
$commenter_id = $comment->user_id;
$commenter_fname = get_usermeta($commenter_id,’first_name’);
$commenter_lname = get_usermeta($commenter_id,’last_name’);// Find out the commenter role
$user = new WP_User( $commenter_id );
if ( !empty( $user->roles ) && is_array( $user->roles ) ) {
foreach ( $user->roles as $role );
if ($role == ‘XXX’) { // Check if the role is the one you defined as ‘paid’
$commenter_role = ZZZ; // Assign a public name to that role
}
}And the following code wherever you want to display the details:
Code:<?php
// Show user First and Last name. Otherwise, show username
if ($commenter_fname != ”){
echo $commenter_fname .’ ‘;
echo $commenter_lname;
}else{
comment_author_link();
}// Show user role public name
echo $commenter_role;
?>Last, if you want to go even further and change the sentence “Connected as USERNAME” plus adding your own “Not connected, connect here” text, you would have to apply kind of a ‘dirty hack’, hiding the default comment form through CSS and adding a new one using the following code (at the bottom of comments.php):
Code:<?php
global $current_user;
get_currentuserinfo();$comments_args = array(
‘logged_in_as’ => ‘<p class=”logged-in-as”>Logged in as ‘ .$current_user->user_firstname.’ ‘.$current_user->user_lastname. ‘</p>’,
‘must_log_in’ => ‘<p class=”must-log-in”>Login here</p>’,
// More parameters: https://codex.wordpress.org/Function_Reference/comment_form
);comment_form($comments_args);
?>Hope it helps! As I said, it is not the cleanest way of doing it, but it works
[Any comment on how to improve this code would be appreciated!]
February 25, 2016 at 9:10 am in reply to: eMember – Show First name and Subscription level on comments #72612ChuchoMemberHi, thanks for taking the time to reply.
I’ll try to clarify my question:
Please look at this image, it’s a screenshot of the comments section of my website: [https://k60.kn3.net/DDD3ABE4E.png]
It currently shows ‘Test1’, which is the eMember username of the person who made the comment. What I need is to show his ‘first_name’ and ‘user_membership_level_name’ instead.
I already know how to retrieve the logged-in user’s info, what I need in the comments section is to retrieve the details of the users who published the specific comments.
Hope it’s clearer now
Thanks again for your help!
February 24, 2016 at 9:06 am in reply to: eMember – Show First name and Subscription level on comments #72610ChuchoMemberHi Wzp, and thanks again.
That are exactly the instructions I followed, unfortunately they rely in knowing the eMember user ID (which is what I don’t know how to get from each one of the comments)
February 23, 2016 at 4:10 pm in reply to: eMember – Show First name and Subscription level on comments #72608ChuchoMemberThanks for the quick reply Wzp.
Following your link I arrived to a piece of code which could work:
Code:<?php
$field_name = ‘first_name’;
$member_id = ‘1’;
$value = wp_emember_get_user_details_by_id($field_name, $id);
echo $value;
?>But my problem is:
How do I find out the eMember user-ID for the author of each comment?
Code:get_comment(get_comment_ID())->user_id;returns the WordPress user ID, but the numbers are not correlative between eMember and WP.
Note: In case it helps, the ‘WordPress User Integration functionality’ is active, so users are created in both tables of the DDBB.
-
AuthorPosts