Closed fanopolis closed 1 year ago
The plugin is working. Can you please add some more details?
Thanks.
Thanks for responding so fast Mirco.
I'm looking at one case specifically. They canceled from the site, not the gateway. It was a stripe payment. What is strange is that I received two admin notification emails about the cancellation, at the same time. One has the correct date, but the other one has today's date.
Thank you!
Thanks for the insights.
Well, this is a known bug actually. I faced it too and already digged into it.
When you click the "cancel" button it takes some time for the page to reload and actually cancel the membership. Sometimes the users click the cancel button once again. The result is a double cancellation request.
They are almost concurrent but since there's no real concurrency here, they are subsequent.
This is clearly an unwanted behaviour and the solution is made of two separate steps.
The first thing you want to do is to avoid double clicks on the cancel button. This can be done via javascript by disabling the button as soon as clicked. I can provide a snippet for this.
Secondly we may want to add something, maybe a filter, to avoid complete cancellation. I mean, with this "filter" set as true, I would expect to keep the membership until expiration date, no way to completely cancel it. This might also mean we don't want to show the "cancel" button anymore when the renewal is already cancelled.
This is something we internally discussed a few times. It's also reported in this draft PR: https://github.com/strangerstudios/pmpro-cancel-on-next-payment-date/pull/37
Let's keep @ideadude in the loop to see if we can come up with a complete solution here.
Understood. Thank you very much.
Can you link me to that snippet, please?
@fanopolis This is a gist to avoid complete cancellation (https://github.com/strangerstudios/pmpro-cancel-on-next-payment-date/issues/16#issuecomment-1061839803).
Thank you @michaelbeil ! Do I add it to functions.php or where?
You can add this recipe to your site by creating a custom plugin or using the Code Snippets plugin available for free in the WordPress repository. Read this companion article for step-by-step directions on either method. If you need further help, you can open a new ticket and we would be happy to provide you with assistance for this Add On in our member support area.
I am having this same issue. @mircobabini What is the snippet to avoid double clicks on the cancel button?
@kathleenfrank This is the gist to avoid complete cancellation (mentioned here). If you need further help, you can open a ticket in our member support area.
I have this plugin installed but it seems it's not working?
I have PMPro version 2.7.2.
When users cancel, their membership is canceled immediately instead of it being canceled at the end of the billing period.
So basically this plugin is not working. Can someone confirm?
thanks