GithubHelp home page GithubHelp logo

Comments (5)

xgat avatar xgat commented on July 20, 2024

Hi,
I have the same problem, I looked at the code and managed to fix it by hooking in my theme's functions the following action:
add_action( "pmpro_membership_post_membership_expiry", "fix_pmpro_membership_post_membership_expiry", 10, 2 );

public function fix_pmpro_membership_post_membership_expiry( $user_id, $membership_id )
{
pmpro_changeMembershipLevel( false, $user_id, "expired", $membership_id );
}

It works but I'm not sure there can't be some collateral effects, a note from the author would be great.
However, I noticed this addon is no longer offically available, probably there are other open issues.
Hope to help!

from pmpro-multiple-memberships-per-user.

AAnkudovich avatar AAnkudovich commented on July 20, 2024

@itibet thank you very much will try it today

from pmpro-multiple-memberships-per-user.

AAnkudovich avatar AAnkudovich commented on July 20, 2024

The above code solved the issue on Vagrant (Local set up) but after publishing to live server no changes happened.

I see an error in my logs like so (this error may be caused by back ticks)

 WordPress database error Unknown column 'mlg.group' in 'where clause' for query \n\t\t\t\t\tSELECT level \n\t\t\t\t\tFROM wp_pmpro_membership_levels_groups AS mlg \n\t\t\t\t\tINNER JOIN wp_pmpro_membership_levels AS ml ON `ml.id` = `mlg.level` AND `ml.allow_signups` LIKE '1'\n\t\t\t\t\tWHERE `mlg.group` = 1 \n\t\t\t\t\tAND `ml.id` IN (2,3,4,6,8,9,10 )\n\t\t\t\t\tORDER BY level ASC made by require('wp-blog-header.php'), wp, WP->main, do_action_ref_array, WP_Hook->do_action, WP_Hook->apply_filters, pmpro_wp, require_once('/plugins/paid-memberships-pro/preheaders/checkout.php'), do_action('pmpro_after_checkout'), WP_Hook->do_action, WP_Hook->apply_filters, pmprommpu_pmpro_after_checkout, pmprommpu_get_levels_and_groups_in_order, referer: http://www.taxworld.co.uk/membership-account/membership-checkout/?level=4

from pmpro-multiple-memberships-per-user.

xgat avatar xgat commented on July 20, 2024

Hi, that's another issue, see: #2

from pmpro-multiple-memberships-per-user.

AAnkudovich avatar AAnkudovich commented on July 20, 2024

It is but solution provided only worked after back ticks were removed not sure if its related but should be all sorted now. Thank you

from pmpro-multiple-memberships-per-user.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.