Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

eStore – Custom php Report for Users Membership Levels with Expiry Date

by

Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Tweaks › eStore – Custom php Report for Users Membership Levels with Expiry Date

  • This topic has 4 replies, 3 voices, and was last updated 8 years, 11 months ago by admin.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • June 12, 2016 at 2:12 am #13526
    lcallander
    Member

    I’m trying to create a PHP report so that we can catch users before their membership expires.

    Right now, I’ve got the code showing only the user and email, and having difficulty pulling in the primary membership level and expiration date.

    Here’s what I have:

    <body>

    <?php

    // Get all users order by amount of posts

    $allUsers = get_users(‘orderby=user_login=ASC’);

    $users = array();

    // Remove admins from the list as they don’t buy anything

    foreach($allUsers as $currentUser)

    {

    if(!in_array( ‘ignoreme’, $currentUser->roles ))

    {

    $users[] = $currentUser;

    }

    }

    ?>

    <section class=”content” >

    <table>

    <thead>

    <tr><th width=”75px”>USER</th>

    <th width=”125px”>EMAIL</th>

    <th width=”125px”>PRIMARY LEVEL</th>

    <th width=”125px”>EXPIRATION</th>

    </tr>

    </thead>

    <?php

    foreach($users as $user)

    {

    ?>

    <tr>

    <td><p><?php echo $user->display_name; ?></p></td>

    <td><p><?php echo $user->user_email; ?></p></td>

    <td><p><?php echo $user->user_membership_level_name; ?></p></td>

    <td><p><?php echo $user->member_expiry_date; ?></p></td>

    </tr>

    <?php

    }

    ?>

    </table>

    </section>

    </body>

    June 12, 2016 at 8:17 am #73379
    admin
    Keymaster

    Have you checked the following resources which tells you how to retrieve details of a member?

    How to Retrieve and Show Details of a Specific Member

    How to Retrieve and Show Specific Details of the Logged-in Member

    https://www.tipsandtricks-hq.com/wordpress-membership/wp-emember-miscellaneous-tweaks-248

    July 29, 2016 at 9:20 pm #73380
    lcallander
    Member

    Unfortunately, those are only great for displaying a single member at a time. I need a report.

    July 29, 2016 at 10:03 pm #73381
    wzp
    Moderator

    Unfortunately, those are only great for displaying a single member at a time. I need a report.

    FOR I = 1 TO HIGHEST_USER_ID

        DO https://support.tipsandtricks-hq.com/forums/topic/how-to-retrieve-and-show-details-of-a-specific-member

    NEXT I

    Custom programming assistance is available:

    https://support.tipsandtricks-hq.com/need-custom-work-done

    July 30, 2016 at 6:05 am #73382
    admin
    Keymaster

    Have you checked the following option in the plugin’s admin interface?

    WP eMember -> Members -> Member Lists -> Display Soon to Expire Member List

    That option produces a list with all the members that are about to expire withing a given timeframe and their expiry data.

  • Author
    Posts
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ