Got a developer question, I have seen questions being asked numerous times on this topic and as far as I can see this feature has not been developed yet, so, assuming it's not coming any time soon, I am attempting to add as part of an add on plugin I am creating. I am running into some hurdles though, so would appreciate some feedback from the developers, I've attempted two methods:
1. Use the
set_expire_date(); method against a MS_Model_Relationship object. I've pasted my code below, this is quite strange as not only does it not work, but it doesn't seem to throw any errors in the log either...
$member = $api->get_member( $member_id ); $current_subscription = $member->get_subscription( $subs_id ); $set_expiry = $current_subscription->set_expire_date( $new_date );
In the above, I can print
$current_subscription to the screen and these are definitely working.
set_expiry_date() appears to do nothing.
2. I've also tried to identify the post ID of the MS_relationship post in order to update the expiry date in the post_meta table directly. This is is also a strange one, as I can see the property in the
$current_subscription object, but cannot understand how to access it.
If I can get some help on this ASAP that'd be great!