strangerstudios / pmpro-gift-levels

Allow members to purchase gift codes for membership at checkout.
https://www.paidmembershipspro.com/add-ons/pmpro-gift-levels/
8 stars 12 forks source link

Gift Membership Warning shows for all levels #59

Closed dparker1005 closed 1 year ago

dparker1005 commented 2 years ago

Describe the bug The Gift Membership Warning should only show if the level being edited was set as a Gift Level, but it is currently showing for all levels with a recurring payment or expiration date.

To Reproduce Steps to reproduce the behavior:

  1. Edit a membership level with an expiration date or recurring payments, but that is not a gift level
  2. See that the warning is shown

Expected behavior The warning should not be shown in the above case.

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

WordPress Environment

``` Please share non-sensitive information about your hosting environment such as WordPress version, PHP version, Paid Memberships Pro and any related plugins versions. ```
dparker1005 commented 2 years ago

This line probably just needs to be updated to check that $enabled is true: https://github.com/strangerstudios/pmpro-gift-levels/blob/d7ed00842e81c455781a2f6b8d7168f09b1bd167/includes/admin.php#L41

michaelbeil commented 2 years ago

Reported in ticket 411462 (moderators only).

I have a warning on the “normal” product settings page. The warning is: Gift Membership Warning: The settings of this level are not recommended. Remove the recurring subscription and membership expiration from this level. When it says “gift membership”, I suppose it’s related to the option to make it as a gift, isn’t it ? Because the option is not ticked on those “normal” products, I don’t understand why I have the warning. Can you explain what’s wrong ? I attach a screenshot of the settings of the “normal” product. On gift product settings, I have no warning.