strangerstudios / pmpro-approvals

Grants administrators the ability to approve/deny memberships after signup.
https://www.paidmembershipspro.com/add-ons/approval-process-membership/
19 stars 29 forks source link

Add support for Pay By Check Add On #130

Closed gausam closed 3 years ago

gausam commented 4 years ago

Closes #46

All Submissions:

Changes proposed in this Pull Request:

If a user is approved via the Approvals Add On, their Pay By Check order status will be changed to 'success'

If a user's check order is set to 'success', the user's membership will be approved.

Closes Issue: #46.

How to test the changes in this Pull Request:

  1. If a user is approved via the Approvals Add On, their Pay By Check order status will be changed to 'success'
  2. If a user's check order is set to 'success', the user's membership will be approved.

Other information:

Changelog entry

Added support for Pay By Check Add On.

gausam commented 4 years ago

The admin setting for toggling this behaviour on and off is still a WIP

gausam commented 4 years ago

image

The feature flag is toggled per membership level, defaulting to false. I feel this enables more granular control than having it set across all membership levels from one high setting. I'm open to better/alternative approaches 🙌

tictag commented 4 years ago

I don't think there is conflict but just please bear in mind that some people (myself included) use the approvals add-on and the pay-by-check-add on for completely independent reasons. For example, we offer concessionary memberships for people on state benefits, they are asked to send in a copy of their benefits letter, once this is checked, they are approved. They actually pay upfront pay with PayPal, bank transfer, cheque, cash etc. The two addons are used independently of each other.

andrewlimaza commented 3 years ago

Thanks for letting us know @tictag, I do think there should be an option of some sort that allows these two to 'talk' to each other or let them still work independently.

andrewlimaza commented 3 years ago

@tictag, I've merged an update in that allows Approvals to update orders in Pay By Check automatically but it has to be enabled by a filter and is 'off' by default. I've taken your request here into consideration and I think it makes more sense for admins to toggle this on/off vs always on as I can see why people would want to treat these two independently.

I recommend a gist for Pay By Check to Approvals as this would be on updated_order and check if the status is success and then call the PMPro Approvals::approveMember method.

Thanks for the work @gausam, just going in a different direction for this right now.