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

Warnings generated when sending invoice emails to non-members #3173

Open
3 tasks done
dwanjuki opened this issue Oct 22, 2024 · 1 comment
Open
3 tasks done

Warnings generated when sending invoice emails to non-members #3173

dwanjuki opened this issue Oct 22, 2024 · 1 comment
Labels
Good First Bug Issues specifically for first time contributors. Next actions should be clear. The team will help. has PR

Comments

@dwanjuki
Copy link
Contributor

Describe the bug
PHP warnings are generated when an invoice email is sent to a user who does not have an active membership.

PHP Warning: Attempt to read property “id” on bool in /wp-content/plugins/paid-memberships-pro/classes/class.pmproemail.php on line 1225
PHP Warning: Attempt to read property “name” on bool in /wp-content/plugins/paid-memberships-pro/classes/class.pmproemail.php on line 1226

To Reproduce
Steps to reproduce the behavior:

  1. Go to Memberships > Orders.
  2. Click on an Email link on an order.
  3. Enter an email belonging to a user with no membership.
  4. Check debugging log, see warnings.

Expected behavior
No PHP warnings.

Isolating the problem (mark completed items with an [x]):

  • I have deactivated other plugins and confirmed this bug occurs when only Paid Memberships Pro plugin is active.
  • This bug happens with a default WordPress theme active, or Memberlite.
  • I can reproduce this bug consistently using the steps above.

WordPress Environment
WP 6.6.2
PHP 8.1.30
PMPro 3.3

@andrewlimaza andrewlimaza added the Good First Bug Issues specifically for first time contributors. Next actions should be clear. The team will help. label Feb 3, 2025
derekashauer added a commit to derekashauer/paid-memberships-pro that referenced this issue Feb 11, 2025
Set membership id and level name to empty string when membership does not exist for the order
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Good First Bug Issues specifically for first time contributors. Next actions should be clear. The team will help. has PR
Projects
None yet
Development

No branches or pull requests

4 participants
@MaximilianoRicoTabo @andrewlimaza @dwanjuki and others