Events Made Easy Forums How do I … Choose the right placeholder for membership renewal

Viewing 28 posts - 1 through 28 (of 28 total)
  • Author
    Posts
  • #61258
    Anonymous
    Inactive

    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.

    #61260
    Franky
    Keymaster

    Just #_PAYMENT_URL should be ok.
    And a renewal can be paid before the end date, then the membership will be extended by 1 period.

    #61299
    Anonymous
    Inactive

    Hi 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.

    #61300
    Franky
    Keymaster

    Well, I always send out reminders and accept offline payments, so I never had that issue before 🙂 Let me see here …

    #61301
    Franky
    Keymaster

    Ok, 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)

    #61302
    Anonymous
    Inactive

    I 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 ?

    #61303
    Franky
    Keymaster

    I 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.

    #61304
    Anonymous
    Inactive

    Yes, 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?

    #61305
    Franky
    Keymaster

    Did 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 … ?

    #61306
    Anonymous
    Inactive

    I 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 ?

    #61307
    Anonymous
    Inactive
    #61308
    Anonymous
    Inactive

    Sorry I did another error. You are completely right. No more pb

    #61309
    Franky
    Keymaster

    Glad to hear.
    Btw, this might interest you too:
    https://plugins.trac.wordpress.org/changeset/2319089/

    #61319
    Anonymous
    Inactive

    Hi 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/w2DXczjqYiT4zBr9A

    copie Ă©cran

    #61335
    Franky
    Keymaster

    If 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.

    #61336
    Anonymous
    Inactive

    So 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.

    #61337
    Anonymous
    Inactive

    I have added a copy screen of the settings of membership.

    https://photos.app.goo.gl/w2DXczjqYiT4zBr9A

    #61338
    Franky
    Keymaster

    Ok, 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/

    #61345
    Franky
    Keymaster

    Another small change will be needed, but that’s for tomorrow 🙂

    #61346
    Anonymous
    Inactive

    I 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.

    #61347
    Franky
    Keymaster

    Well, nothing needed changing, so feel free to test. But I recommend to use the complete dev-version then.

    #61348
    Anonymous
    Inactive

    Ok I download the changed files (I see only 5 files changed in the trunk directory) and will come back after the tests.

    #61349
    Anonymous
    Inactive

    With this dev version I have a critical error WP. When I deactivate EME WP get no errors ?

    #61350
    Anonymous
    Inactive

    the 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:1162

    #61351
    Franky
    Keymaster

    Like 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/

    #61354
    Anonymous
    Inactive

    Indeed, everything is going well. The dates are updated correctly and the payment is memorized. Thank you for this work and your reactivity Franky.

    #61355
    Franky
    Keymaster

    Can I ask which payment gateway you’re using?

    #61356
    Anonymous
    Inactive

    Yes it’s Stripe.

Viewing 28 posts - 1 through 28 (of 28 total)
  • The forum ‘How do I …’ is closed to new topics and replies.
Scroll to Top