Events Made Easy › Forums › How do I … › Choose the right placeholder for membership renewal
- This topic has 27 replies, 2 voices, and was last updated 4 years, 5 months ago by Anonymous.
-
AuthorPosts
-
Wed 27 May 2020 at 16:39 #61258AnonymousInactive
Hi Franky,
I have a membership with a grace period of 10 days. I want to send an email with a link to pay for this membership renewal.
I hesitate between #_PAYMENT_URL and #_EXPIRED_MEMBERSHIP_PAYMENT_URL
I guess the placeholder, I have to use in the remember mail, is not the same depending on whether you’re before the end of the membership to renew the annual fee, for example, or in the grace period or after the grace period. So what’s the right choice?
Is it possible to pay the renewal before the end date of the membership? or I have to wait until the end date is passed before sending the email.Best regards.
Wed 27 May 2020 at 18:07 #61260FrankyKeymasterJust #_PAYMENT_URL should be ok.
And a renewal can be paid before the end date, then the membership will be extended by 1 period.Fri 5 Jun 2020 at 10:52 #61299AnonymousInactiveHi Franky,
Effectively the placeholder #_EXPIRED_MEMBERSHIP_PAYMENT_URL never works.
Only the #_PAYMENT_URL link works in an e-mail.
However, if the membership is still active or grace period we arrive at the payment page where it is already written “This has already been paid for” and it is not possible to pay.
Renewal of membership is only possible when the member has expired and with the link #_PAYMENT_URL.So my questions are :
how do you allow payment for membership renewal before the membership expires?
How to allow access to the payment page from the frontend and not from the mail?Thanks a lot for your work and your so rich plugin.
Fri 5 Jun 2020 at 10:56 #61300FrankyKeymasterWell, I always send out reminders and accept offline payments, so I never had that issue before 🙂 Let me see here …
Fri 5 Jun 2020 at 11:39 #61301FrankyKeymasterOk, this should help:
https://plugins.trac.wordpress.org/browser/events-made-easy/(maybe I should make that message an option too, but for now it works)
Fri 5 Jun 2020 at 15:15 #61302AnonymousInactiveI am going to test with the two new files. However, #_EXPIRED_MEMBERSHIP_PAYMENT_URL has no action.
I would like also give to a connected member the ability (by the menu to a page) to renewed his membership. Is it possible ?Fri 5 Jun 2020 at 15:46 #61303FrankyKeymasterI don’t understand “#_EXPIRED_MEMBERSHIP_PAYMENT_URL has no action”. That placeholder needs an argument (the membership name) because it is meant to be used outside the context of memberships, see the doc.
And I don’t understand your second question either. The generic placeholders #_MEMBERSHIP_PAYMENT_URL and #_EXPIRED_MEMBERSHIP_PAYMENT_URL (that both need the name of the membership as argument) can be used in regular pages.Fri 5 Jun 2020 at 16:23 #61304AnonymousInactiveYes, you’re right. It’s a confusion on my part between #_PAYMENT_URL that I can send it with a mail and the other two to be used with the short code eme_if.
So I use this shortcode : [eme_if tag='#_IS_USER_MEMBER_OF{3}' value='1'] You can renew your membership here [#_MEMBERSHIP_PAYMENT_URL{3} /eme_if] but when I follow this link it is written “This has already been paid for”. So, how a member can renewed his membership before being expired?
Fri 5 Jun 2020 at 16:53 #61305FrankyKeymasterDid you update the code for eme_payments.php? That message now only shows if the membership is active but has no end date (so it never expires and so doesn’t need to be paid again).
Edit: the case of no end date should not exist for paid memberships, unless maybe you imported them like that … ?Fri 5 Jun 2020 at 17:50 #61306AnonymousInactiveI have the last EME plugin version. I replaced 2 files from the trunk directory eme_payments.php and eme_members.php.
I create a page with :
[eme_if tag='#_IS_USER_MEMBER_OF{3}' value='1'] Vous pouvez renouveler votre adhĂ©sion pour l’annĂ©e prochaine en payant votre cotisation ici #_MEMBERSHIP_PAYMENT_URL{3} [/eme_if]
[eme_if tag='#_IS_USER_MEMBER_PENDING{3}' value='1'] Vous pouvez payer votre cotisation ici #_MEMBERSHIP_PAYMENT_URL{3} [/eme_if]
[eme_if tag='#_IS_USER_MEMBER_EXPIRED{3}' value='1'] Vous pouvez rĂ©gulariser votre cotisation ici #_EXPIRED_MEMBERSHIP_PAYMENT_URL{3} [/eme_if]I am connected on the site in the first case (eme_if) the link #_MEMBERSHIP_PAYMENT_URL{3} (that I need to copy/paste to my browser because non-clickable link) directed me to the payment page with this message “This has already been paid for”. So I don’t understand what is false ?
Fri 5 Jun 2020 at 17:52 #61307AnonymousInactiveFri 5 Jun 2020 at 18:01 #61308AnonymousInactiveSorry I did another error. You are completely right. No more pb
Fri 5 Jun 2020 at 18:48 #61309FrankyKeymasterGlad to hear.
Btw, this might interest you too:
https://plugins.trac.wordpress.org/changeset/2319089/Tue 9 Jun 2020 at 18:28 #61319AnonymousInactiveHi Franky, my tests take a long time !
I still have something that’s not working out the way I expect. As you can see from the attachment. My user gets the reminder email today. He clicks on the payment link #_PAYMENT_URL and pays online. He does have the message on his screen that his membership will be extended for another week (duration of membership) however, after payment, the end date is not updated and remains June 8. Shouldn’t it be updated to 15 June as announced in the message before payment?
https://photos.app.goo.gl/w2DXczjqYiT4zBr9ATue 9 Jun 2020 at 18:31 #61335FrankyKeymasterIf the payment is successful, the end-date being updated should be the case. Is the payment approved/accepted/… ? I’ll check the code here too.
Edit: there were indeed some issues in the code (seems like nobody actually did membership extensions online until now). Can you try this fix:
https://plugins.trac.wordpress.org/changeset/2321002/Btw: don’t just download the new file, just apply the changes. Downloading the new file would require downloading a lot of new files since it contains other changes too … in that case I would recommend to use the dev-version.
Tue 9 Jun 2020 at 19:03 #61336AnonymousInactiveSo I did.
Firstly I have replace the file and it doesn’t work, and after I read you say not to do. So secondly I set only the changes in the file eme_members.php of the last version. The end date is not update and nothing stop to paid again and again.Tue 9 Jun 2020 at 19:31 #61337AnonymousInactiveI have added a copy screen of the settings of membership.
Wed 10 Jun 2020 at 00:13 #61338FrankyKeymasterOk, the reason it isn’t working is that I checked if the payment was already paid when a payment via a payment gateway arrives. This was in order to prevent double payments for bookings, but for memberships this is of course another story.
I now changed it so that I also store the id returned by the payment gateway and mark that id handled or not, so if something via a payment gateway arrives, I can check for that.
This already works ok for paypal (well it will work for all, but if you refresh the payment result page, there might be some place I didn’t catch an error for an already handled payment, but that’s not really an issue).
The change is quite big though (the renaming of eme_refund to eme_refund_booking can be skipped if you want):
https://plugins.trac.wordpress.org/changeset/2321177/Wed 10 Jun 2020 at 01:30 #61345FrankyKeymasterAnother small change will be needed, but that’s for tomorrow 🙂
Wed 10 Jun 2020 at 08:35 #61346AnonymousInactiveI understand this is getting very sharp. I prefer to wait until you’ve worked out the various changes before running more tests. Many thanks for the work.
Wed 10 Jun 2020 at 09:27 #61347FrankyKeymasterWell, nothing needed changing, so feel free to test. But I recommend to use the complete dev-version then.
Wed 10 Jun 2020 at 09:36 #61348AnonymousInactiveOk I download the changed files (I see only 5 files changed in the trunk directory) and will come back after the tests.
Wed 10 Jun 2020 at 09:46 #61349AnonymousInactiveWith this dev version I have a critical error WP. When I deactivate EME WP get no errors ?
Wed 10 Jun 2020 at 09:48 #61350AnonymousInactivethe error line in php log :
[10-Jun-2020 07:43:32 UTC] PHP Fatal error: Uncaught Error: Call to undefined function eme_check_access() in /Users/fredericmoriniere/Documents/Sites Web/LOCAL_Vogue/wp-content/plugins/events-made-easy/eme_events.php:1162Wed 10 Jun 2020 at 09:54 #61351FrankyKeymasterLike I said: use the dev version, don’t just replace some files … (some files were changed yesterday, some before, in this case it is eme_functions.php you’re missing too).
The dev version can be downloaded here:
https://wordpress.org/plugins/events-made-easy/advanced/Wed 10 Jun 2020 at 10:38 #61354AnonymousInactiveIndeed, everything is going well. The dates are updated correctly and the payment is memorized. Thank you for this work and your reactivity Franky.
Wed 10 Jun 2020 at 11:09 #61355FrankyKeymasterCan I ask which payment gateway you’re using?
Wed 10 Jun 2020 at 12:45 #61356AnonymousInactiveYes it’s Stripe.
-
AuthorPosts
- The forum ‘How do I …’ is closed to new topics and replies.