strangerstudios / pmpro-gift-levels

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

Level template and new section for level add/edit page for PMPro v2.9+ #61

Closed kimcoleman closed 2 years ago

kimcoleman commented 2 years ago

All Submissions:

Changes proposed in this Pull Request:

The redesign of the Membership Levels page + templates are slated for PMPro v2.9. We are including Gift in the template list. This PR updates the Gift Membership section to match the v2.9+ format for the levels admin page.

Screen Shot 2022-05-31 at 9 59 02 AM

v2.9 adds new hooks so that Add Ons like this can place their settings in more places on the edit page. I have conditionally used the new hook to show this box right below the expiration settings of that new UI.

Screen Shot 2022-05-31 at 9 58 47 AM

For sites that are not on 2.9, the settings section will be shown as it is today at the bottom of the page.

Note that the appearance is a bit less than perfect since the new format relies on CSS in core PMPro v2.9+. I think rather than replicate this formatting or code to variations of the section we add based on PMPro version we just live with this less than desirable look and believe that people will upgrade core.

How to test the changes in this Pull Request:

  1. Check out the pending PR for the 'edit-levels-templates-cycle' from my GitHub user.
  2. Go to Settings > Levels. Click Add New.
  3. You'll see the "Gift" template. Click that.
  4. On the Edit page, see the "Gift Membership" section right below the "Expiration Settings" section.

Other information:

Changelog entry

Enter a summary of all changes on this Pull Request. This will appear in the changelog if accepted.