Cristián Lávaque
Forum Replies Created
-
Thank you so much for the review, it’s very appreciated! I’m glad you like s2Member and have used it and benefited from it for so long! It’s good to have you here. ??
Hi Jason.
I’m sorry you had that problem! There must be something misconfigured that prevented the demotions. s2Member’s demotion is activated and set from: WP Admin > s2Member > PayPal Options > Automatic End-Of-Term Behavior
Also, it’s important that the payment gateway is notifying s2Member correctly of ended subscriptions, so it can tell when to demote/delete the user. WP Admin > s2Member > PayPal Options > Instant Payment Notifications
And while troubleshooting, it’s helpful to enable s2’s logging, so one can go over the logs for the notifications, and see if they got to s2, and what happened. WP Admin > s2Member > Log Files
There is a separate payments log addon for s2, normally the payments are followed and reviewed in the payments gateway, which is the one that has all their details and manages them.
But I see how it’d be hard to now spot several ended subscriptions in the gateway, against your site users to adjust them… Let me think if something could be done to check them in bulk…
Could you check the EOT setting, the IPN integration, and enable logging?
With logging enable, please reproduce the behavior: create test user with a 50 cent/day Level 1 subscription, then end the subscription, see if the test user gets demoted, and show me the log entries please (removing any sensitive details).
I look forward to your update. ??
Hi Jason.
I’m sorry you had that problem! There must be something misconfigured that prevented the demotions. s2Member’s demotion is activated and set from: WP Admin > s2Member > PayPal Options > Automatic End-Of-Term Behavior
Also, it’s important that the payment gateway is notifying s2Member correctly of ended subscriptions, so it can tell when to demote/delete the user. WP Admin > s2Member > PayPal Options > Instant Payment Notifications
And while troubleshooting, it’s helpful to enable s2’s logging, so one can go over the logs for the notifications, and see if they got to s2, and what happened. WP Admin > s2Member > Log Files
There is a separate payments log addon for s2, normally the payments are followed and reviewed in the payments gateway, which is the one that has all their details and manages them.
But I see how it’d be hard to now spot several ended subscriptions in the gateway, against your site users to adjust them… Let me think if something could be done to check them in bulk…
I see you started a forum thread, too. I’ll answer there as well. https://www.ads-software.com/support/topic/memberships-not-downgraded-automatically/
??
Great job sorting that out! ?? Thank your update sharing your solution with the community! ??
??
I was looking at how to help you, and rereading your first post, I realized you’re talking about profile fields specifically…
If you’re using s2Member’s custom profile fields, you can set the field to a certain level in its configuration. https://s2member.com/kb-article/how-do-i-show-different-custom-registration-fields-for-each-signup-form/
See also:
- https://s2member.com/kb-article/s2member-buddypress/
- https://s2member.com/kb-article/buddypress-profile-fields-or-s2member-profile-fields/
??
Hi!
Yes, you’d need to customize the template for that page. Googled about it and found this: https://buddypress.org/support/topic/creating-a-custom-profile-member-page/
And add a conditional that checks the person’s access to show or hide those fields… WP Admin > s2Member > API / Scripting > Advanced Conditionals
??
Thank you very much! ??
Thank you very much! ????
The latest v240325 release includes that fix. ??
Thank you very much! ??
Hi Bernard,
Thanks for reporting that!
I will include this in the next release, but you can try it now if you want…
In the file mentioned in the warning: /wp-content/plugins/s2member/src/includes/classes/security-rest.inc.php
The lines mentioned, 45 and 46, are these:
$type = sanitize_key($route[2]); // e.g. pages $id = (int)$route[3];
You can add these right before/above:
if (empty($route[2]) || empty($route[3])) return $response;
So you’ll have this:
$route = $request->get_route(); // e.g. /wp/v2/pages $route = explode('/', trim($route, '/')); if (empty($route[2]) || empty($route[3])) return $response; $type = sanitize_key($route[2]); // e.g. pages $id = (int)$route[3];
Let me know if you try it and if it helps you!
Warnings are not serious, errors would stop the script from going on. But you may want to hide warnings and errors. If not disable them, at least not display them on the site, instead log them into a file. https://www.ads-software.com/documentation/article/debugging-in-wordpress/#wp_debug_log
??
Thanks for reporting that!
I will include this in the next release, but you can try it now if you want…
In the file mentioned in the warning: /wp-content/plugins/s2member/src/includes/classes/security-rest.inc.php
The lines mentioned, 45 and 46, are these:
$type = sanitize_key($route[2]); // e.g. pages $id = (int)$route[3];
You can add these right before/above:
if (empty($route[2]) || empty($route[3])) return $response;
So you’ll have this:
$route = $request->get_route(); // e.g. /wp/v2/pages $route = explode('/', trim($route, '/')); if (empty($route[2]) || empty($route[3])) return $response; $type = sanitize_key($route[2]); // e.g. pages $id = (int)$route[3];
Let me know if you try it and if it helps you!
Warnings are not serious, errors would stop the script from going on. But you may want to hide warnings and errors. If not disable them, at least not display them on the site, instead log them into a file. https://www.ads-software.com/documentation/article/debugging-in-wordpress/#wp_debug_log
??
Thank you very much, Colin! ????
I see… that seems to be because your s2’s javascript is being blocked by some security setting and giving a 403 error…
See: https://s2member.com/kb-article/mod-security-odd-403-503-500-errors/
??
You can restrict WooCommerce pages with s2, but not sell s2 access with WooCommerce…
Unless WooCommerce lets you sell wordpress roles/capabilities in some way, then yes, you could sell s2’s roles/caps. https://s2member.com/kb-article/s2member-rolescapabilities/
??