• muchemik

    (@muchemik)


    Hi Roland,

    Thanks for building the Payment Portal!!!! I’m about to dive into integrating this; I haven’t fully scoped it out yet.

    Can I set the plugin to automatically approve/unapprove members based on payment status?
    Paid Up = set as approved.
    Expired/not paid up = set as unapproved.

    Thanks!
    Ken

    • This topic was modified 7 years ago by muchemik.
    • This topic was modified 7 years ago by muchemik.
Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author xnau webdesign

    (@xnau)

    Yes, you’ll find the setting under the “signup Member Payments” tab.

    Make sure your “approved” field defaults to “no”

    Thread Starter muchemik

    (@muchemik)

    Thanks, Roland,

    I understand the signup part, however for clarity when the payment period lapses without payment it will automatically change approved to “no”, correct?

    Regards!
    Ken

    Plugin Author xnau webdesign

    (@xnau)

    No, they will not be automatically marked as unapproved. It’s possible by setting up an action that is triggered when the account goes past due. I published a code snippet here: https://gist.github.com/xnau/7423daa6cc6bb9e6eff76904ff5d0756

    Thread Starter muchemik

    (@muchemik)

    Thanks for the snippet!

    Thread Starter muchemik

    (@muchemik)

    Hi Roland,

    We implemented the script but “Payment Past Due” members are still not “Unappproved”.

    ——————————————
    When we run a test script it however works.
    function unapprove_test(){
    global $PDb_Member_Payments;
    // now set the record to not approved (2nd argument)
    $PDb_Member_Payments->approve_record( 16814, false );
    }
    unapprove_test();
    ——————————————

    Here are some records that have recently gone “Payment Past Due” but were not “unapproved”:

    https://www.hitagroup.org/single-record/?pdb=16661
    https://www.hitagroup.org/single-record/?pdb=16773
    https://www.hitagroup.org/single-record/?pdb=16774

    How can I fix this?

    Regards,
    Ken

    Plugin Author xnau webdesign

    (@xnau)

    Where did you place the snippet code?

    Hi Roland,

    The code was placed inside a plugin.

    I have noticed there is Cron script (running daily once), which is hooked with the action that we are using for this.

    I have already tested the code manually and it works. But not sure what is happening with the Cron script?

    Could you please provide some insights in this regards?

    Thanks again,

    Mahmudur

    Plugin Author xnau webdesign

    (@xnau)

    I suggest you check to make sure the cron is running properly. You can do this by installing a plugin called WP_Crontrol. Open the “Cron Events” page. It will let you know if the cron can run. You can also test the cron by running it manually on that page.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Approve/Unapprove Members Automatically Based on Payments’ is closed to new replies.