Multi Vendor Marketplace Plugin | WCFM Marketplace › Forums › WCFM – Feature Request › WCFM Membership subscription timelines
- This topic has 7 replies, 2 voices, and was last updated 6 years, 4 months ago by
WCFM Forum.
- AuthorPosts
- September 22, 2018 at 10:29 am #32213
kasaga311
ParticipantHi,
It would be nice if the Membership plugin shows the following details on the WCFM Dashboard when the user login is done next to the Vendor details on the ‘Welcome to Dashboard’ panel:
1. Membership since: Date on which the user subscribed to a plan
2. Membership expires in: <num days>Thanks,
–Kasaga - September 24, 2018 at 7:48 pm #32441
WCFM Forum
MemberHi,
Sure, we will add this in coming version.
Thank You
- October 1, 2018 at 5:43 am #32945
kasaga311
ParticipantHi,
Any update on this please?
Thanks
- October 3, 2018 at 4:52 am #33132
WCFM Forum
MemberHi,
Kindly add this code for the purpose –
function wcfmvm_0310_vendor_dashboard_username( $vendor_id ) { $wcfm_membership_id = get_user_meta( $vendor_id, 'wcfm_membership', true ); if( $wcfm_membership_id && wcfm_is_valid_membership( $wcfm_membership_id ) ) { $next_schedule = get_user_meta( $vendor_id, 'wcfm_membership_next_schedule', true ); $current_time = strtotime( 'midnight', current_time( 'timestamp' ) ); if( $next_schedule ) { $date = date( 'Y-m-d', $current_time ); $renewal_date = date( 'Y-m-d', $next_schedule ); $datetime1 = new DateTime( $date ); $datetime2 = new DateTime( $renewal_date ); $interval = $datetime1->diff( $datetime2 ); $interval = $interval->format( '%r%a' ); echo '<span class="wcfm_welcomebox_member">( ' . __( 'Expire In', 'wc-multivendor-membership' ) . ': <mark>' . $interval . '</mark> days)</span>'; } } } add_action( 'wcfm_dashboard_after_username', 'wcfmvm_0310_vendor_dashboard_username', 50 );
Thank You
- October 3, 2018 at 5:58 am #33134
kasaga311
ParticipantHi,
Added this to our code.
However, we are looking for Member since and not the Expires in.
Can you suggest the solution for the same?
Thanks,
–Kasaga - October 3, 2018 at 6:47 am #33135
WCFM Forum
MemberHi,
1. Membership since: Date on which the user subscribed to a plan
2. Membership expires in:You were looking for this, right?
Anyway no problem, remove that code and use this one –
function wcfmvm_0410_vendor_dashboard_username( $vendor_id ) { $udata = get_userdata( $vendor_id ); $registered = $udata->user_registered; echo '<div class="wcfm_welcomebox_last_time"><span class="fa fa-user"></span><span class="wcfm_welcomebox_member">' . __( 'Registered On', 'wc-multivendor-membership' ) . ': <mark>' . date_i18n( wc_date_format(), strtotime( $registered) ). '</mark></span></div>'; } add_action( 'wcfm_dashboard_after_username', 'wcfmvm_0410_vendor_dashboard_username', 50 );
Thank You
- October 3, 2018 at 10:19 am #33154
kasaga311
ParticipantHi,
Awesome! Works like a charm..
Thanks,
–Kasaga - October 3, 2018 at 10:30 am #33155
WCFM Forum
MemberGreat … you are welcome 🙂
- AuthorPosts
- The topic ‘WCFM Membership subscription timelines’ is closed to new replies.