strangerstudios / pmpro-reason-for-cancelling

Require members to provide a reason for leaving before they can cancel their membership.
https://www.paidmembershipspro.com/add-ons/pmpro-reason-cancelling/
12 stars 10 forks source link

Email shows "N/A" when cancelling from a payment gateway #7

Open andrewlimaza opened 4 years ago

andrewlimaza commented 4 years ago

If a user cancels from payment gateway side (i.e. PayPal) the reason shows as "N/A". We could maybe handle this to say "Cancelled at gateway" to make it clearer for admins.

kimcoleman commented 4 years ago

+1 for this idea - I just was about to suggest it in the dev Slack channel and saw this issue.

dparker1005 commented 4 years ago

Can we use the wp_doing_ajax() function (which should be true for IPN/Webhook handlers) and, if that is the case, give a general message about the cancellation being caused by an ajax request, likely due to cancellation at a payment gateway? https://developer.wordpress.org/reference/functions/wp_doing_ajax/

ideadude commented 3 years ago

Can we use the wp_doing_ajax()...

This is a good approach. It shows a bit more context for folks here, but also covers other cases where levels change during AJAX calls (our Zapier add on).

kimcoleman commented 2 years ago

Would we want "System Cancelled" to be the message so it covers all cases?