I checked the code, database, even find the file and placed the code also and its shows also. But in the end i checked the last payment date of user in database field ‘wp_s2member_last_payment_time’ is wrong .

I wrote all my code which find the next payment date according to last payment by user.

Please send me the alternative of my requirement ( show the next payment date to user ) OR let me know how and where to change the code so that ‘wp_s2member_last_payment_time’ saves the updated value in database

Can you check to see if get_user_field('s2member_paid_registration_times') is being populated correctly? This should be an array, so var_dump() it.

If that’s not working for you either, please make sure that your PayPal IPN URL is set up correctly within PayPal. If you have logging enabled, you should check out your paypal-ipn.log file to ensure that it is getting populated. If you do not have a paypal-ipn.log file, then this is most likely your issue.

Technically, if your IPN URL is wrong, you could still be getting user signups, because user upgrades/downgrades are done within the PayPal Return processes, or within WP_Cron in /includes/classes/auto-eots.inc.php. However, this problem, and also a problem where all of your subscription-based members would not be downgraded would occur.

The first file is the class for the recurring payments, and the second is for the signup for the subscription.

I’m going to run tests to try to get this to happen in a test environment. For now I suggest using get_user_field (“s2member_auto_eot_time”) – 1 day to display the date that users will be billed again. If this field is not being populated correctly either, then I would suggest disabling all plugins possible (except s2Member) and running test transactions until the problem is resolved.

But i guess .. get_user_field (“s2member_auto_eot_time”) … This shows the End Of Time when user cancel their payment.

My requirement is different , i want user to show next payment date ( without cancelling their account ), thats why i need last payment date so that i can add the plan days in that and can show user the next payment date.

If you have any other solution to my requirement then that would be great as well.

Thanks for the info.

Thanks for the heads up on this thread.

Regarding the next billing date. This is NOT something that s2Member keeps a record of on-site. s2Member keeps track of the last time a payment was received, but not when the next payment is set to occur. This is maintained by your payment gateway. If you’re running PayPal, then the next billing date is established on the PayPal side of things.

s2Member is fully aware of transactions, cancellations, expirations, failed billing attempts, and other events that occur with a billing profile established on the payment gateway side of things, because s2Member communicates with your payment gateway through a combination of APIs, including things like the PayPal IPN service. However, personal billing details, other financials, and billing cycle specifics are left on the payment gateways side of things for maximum flexibility and security.

If you’re running PayPal Pro, it’s possible to obtain the billing profile details from the PayPal side of things programmatically – via the PayPal Pro API. While it’s not something that s2Member keeps a record of on-site, s2Member does have the ability to pull this information for you from the PayPal API.

The $paypal variable will contain the following details, as documented by PayPal. This was pulled from the PayPal API docs, which are provided to you in your s2Member.com account. Upon logging in at s2Member.com, go to the My Account page, and download the s2m-pro-extras.zip file. Inside the zip file, you’ll find this information in the file: payflow-pro-rec-api.pdf