We need to modify (extend expiry dates) of all the members in Membership Pro 2.

hey,
We need to modify (extend expiry dates) of all the members in Membership Pro 2.

From wp backend we can do it one by one but we want to do it bulk i.e using custom MySQL script.

Since new Membership Pro 2 has "5 Custom Post Types" one of the post type "ms_relationship" has post_meta "expiry date".

So is it ok to just extend "expiry_date" post_meta to get all members expiry date extended?

And what happens to other 4 custom post_types? specially "Invoices" post_type do we have to update each relevant post_meta of other Custom post types such as "post modified" e.t.c.

If this is the case could you provide a script on how to do it or guide us in the correct direction.

it would be great if you could consider this as a feature request as well.

Regards,
Shailendra

  • Sajid
    • DEV MAN’s Sidekick

    Hi @Madan,

    Hope you are doing good today :slight_smile:

    I am not sure if Membership 2 just store expiry date in meta table and and what key is used to store it. I will ping developer if we could update it this way and post a back a reply here.

    However, I would suggest you not to inject date in database directly. Instead use PHP script to update/set the expiry date.

    Meanwhile you can find extensive API documentation in Membership 2 > Help > API Docs. That would help write a script to do this job (if you know PHP).

    Take care and have a nice day :slight_smile:

    Cheers, Sajid

  • Sajid
    • DEV MAN’s Sidekick

    Hi @mk9,

    Hope you are doing good today :slight_smile:

    I spoke with the developer and he said, yes you can extend the expiry date from database directly. But the only limitation is that if its recurring subscription/membership then it will not change the next payment date.

    Also further he pointed that make sure the status is also active. So that means there are no "side effects" and you are good to go.

    However, its strongly recommended to take full backup of your database first, specially the tables you are working.

    Take care and have a nice day :slight_smile:
    Cheers, Sajid

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.