strangerstudios / pmpro-pay-by-check

Add a "Pay by Check" option to PMPro levels, and keep members in "pending" status until an admin changes the order status.
https://www.paidmembershipspro.com/add-ons/pmpro-pay-by-check-add-on/
11 stars 27 forks source link

Fix a confirmation page error #89

Closed michaelbeil closed 1 year ago

michaelbeil commented 1 year ago

devs to check out https://github.com/strangerstudios/pmpro-pay-by-check/pull/85#issuecomment-1599135228.

A customer ran into this, so I added their changes. They added a call to pmpro_getSpecificMembershipLevelForUser() after getting the user since the next line if ( ! empty( $user->membership_level->confirmation ) ) { will always be false, because $user->membership_level is not set. $invoice->membership_level does not contain the custom confirmation message, so the custom confirmation message will never be shown. I also changed $invoice to $user.

This could be merged and https://github.com/strangerstudios/pmpro-pay-by-check/pull/85 closed as it preserves jarryds commit.

dparker1005 commented 1 year ago

Closing as a fix for this issue was already implemented in #80