Forum Replies Created

Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter pryons

    (@pryons)

    Hi guys,
    i solved my issue with a custom code.
    I execute function check_membership_status only for 2 membership, with no error, and i add this custom function in wp-cron.
    All works fine.
    I put “solved” at this post.
    Thanks a lot.
    Dario

    Thread Starter pryons

    (@pryons)

    Hi Oguz,
    thanks for your reply.
    In last 2 days i did a lot of test.
    With custom code, i executed the function check_membership_status for each membership, and all was done. Then i tested by couple of memberships, and all was done. If i test three or more togheter, the server responde with error 500.
    So i deduced that error is caused by execution time of server or other limit of my hosting.
    I found my own solution:
    i have 4 memberships, but only two is paid memberships. So i put my custom code in a custom page in backend. Once a day i open that page and check status only of that memberships.

    Thanks for all.

    Thread Starter pryons

    (@pryons)

    Hey Oguz,
    i don’t use multiple memberships add-on.

    I tried to reactivate membership, but check_membership_status returns error 500.

    Dario

    Thread Starter pryons

    (@pryons)

    I tried to solve and tested with some coding.
    In a custom page, i wrote this:

    
    $subscriptions = ( MS_Model_Relationship::get_subscriptions( $args ) );
    
    foreach ( $subscriptions as $subscription ) {
    	if (($subscription->membership_id == 4510)or($subscription->membership_id == 4528)) {
    		$subscription->check_membership_status();
    	}
    }
    

    Executing check_membership_status for each membership, i noticed that it doesn’t work with the deactivated memberships.
    Maybe the issue is here.
    I have 2 deactivated memberships with some members, but if i erase those, what will be happened?

    Thanks
    Dario

    UPDATE
    After a re-test i noticed that only one membership give error 500.

    • This reply was modified 6 years, 8 months ago by pryons.
    • This reply was modified 6 years, 8 months ago by pryons.
    Thread Starter pryons

    (@pryons)

    Hi Oguz,
    i’ve already activate debug log, but cron didn’t write any string.
    My .user.ini is set to:
    max_input_vars = 5000
    memory_limit = 1024M
    max_execution_time = 360

    Maybe an error of .htaccess?

    Thread Starter pryons

    (@pryons)

    Hi Oguz,
    i try some plugin to test cronjob.
    The problem is about job “ms_cron_check_membership_status”
    With advanced cron manager it has been executed with errors (the free plugin didn’t print any log);
    with trigger schedule event it gets error 500;
    cron status checker says:
    “WP-Cron is working as of 07/03/2018 1:25:20 pm”

    The other cron job works fine, also “ms_cron_process_communications” has been executed correctly.

    I hope you can find the issue.
    Dario

    Thread Starter pryons

    (@pryons)

    Hi Oguz, in my site i have 3 kind of membership. One of this is monthly.
    After that date (30 days) in backend i see the correct expire date, but the status is “active”. When i click on “refresh status” the member become correctly”expired”. So i think the problem is about automatic refresh status. As this i have a problem with the automate mails, that don’t send. The only mail sended is “registration” and “signup”

    I didn’t try to move in local,, i should do it?

    Thread Starter pryons

    (@pryons)

    No.
    Uncheck the option don’t fix the problem.

    Thread Starter pryons

    (@pryons)

    Hi,
    thank you for reply.
    I try to uncheck “Use WordPress Cron for sending emails”.
    Now i test it.
    But some mail, like registration’s and membership mails works fine, and the users recieve them.
    Now with the unchecked field, how membership2 send emails?

    Dario

    Thread Starter pryons

    (@pryons)

    Hi,
    it seem doesn’t work.
    I don’t understand why the other cronjobs works fine.
    In debug log i didn’t find any error or alert.

    Is it possible that only membership2 cron events doesn’t works?

    Thread Starter pryons

    (@pryons)

    Hy Oguz.
    Thanks a lot.
    I’ll try your suggest.

    Thread Starter pryons

    (@pryons)

    Hi Oguz,
    I try to explain you the problem.
    My website is online since 01/01/2018. I’ve about 40 users with a data range membership, with expire date on 31.05.2018.
    Two users of 40 is my test accounts.
    Since 2nd june in backend the expire date is correctly 31/05/2018 but if i login i can see all protected content.
    The same day i clicked on “refresh” status and all expired membership has recieved the automate mail of “membership expired”.
    I read a lot about this problem before write in this support page, and a lot of user had problem with wp-cron.
    With wp-crontrol i check my cron and all seems works fine.
    I noticed that also the automate mail of trial expired didn’t send until my manually “update”.
    About cron my big problem is that my web hosting don’t include cronjob.

Viewing 12 replies - 1 through 12 (of 12 total)