Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set $user->membership_level #1

Conversation

michaelbeil
Copy link

@michaelbeil michaelbeil commented Jun 20, 2023

A customer (ticket 482012) ran into this, so they added this line before $confirmation_message.

$user->membership_level = pmpro_getSpecificMembershipLevelForUser( $invoice->user_id, $invoice->membership_level->level_id );

Changed $invoice to $user

See strangerstudios#85 (comment)

call to pmpro_getSpecificMembershipLevelForUser() after getting the user$user->membership_level since the next line - `if ( ! empty( $user->membership_level->confirmation ) ) {` will always be false, because `$user->membership_level `is not set. And `$invoice->membership_level` does not contain the custom confirmation message, so the custom confirmation message will never be shown.
A customer (ticket 482012) ran into this.
The invoice status which is variable is filled into the confirmation message with just $invoice->status
instead of something like __( $invoice->status, 'pmpro-pay-by-check' )
@michaelbeil michaelbeil closed this Jul 7, 2023
@michaelbeil michaelbeil deleted the error-on-confirmation branch August 11, 2023 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant