Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action('after_wcfm_vendors_manage_membership_details', function($vendor_id) {
- $wcfm_membership_id = get_user_meta( $vendor_id, 'wcfm_membership', true );
- if( $wcfm_membership_id && wcfm_is_valid_membership( $wcfm_membership_id ) ) {
- $subscription = (array) get_post_meta( $wcfm_membership_id, 'subscription', true );
- if( isset( $subscription['is_free'] ) ) {
- echo "<div class='wcfm_clearfix'></div><br />";
- _e( 'Cancel vendor membership: ', 'wc-multivendor-membership' );
- echo '<a href="#" style="float: none; padding: 10px !important;" data-memberid="'.esc_attr($vendor_id).'" data-membershipid="'.esc_attr($wcfm_membership_id).'" id="wcfm_membership_cancel_button" class="wcfm_membership_cancel_button wcfm_submit_button">' . esc_html__( 'Cancel', 'wc-multivendor-membership' ) . '</a>';
- echo "<div class='wcfm_clearfix'></div><br />";
- }
- }
- });
- add_action('wcfm_after_membership_pricing_details', function($vendor_id) {
- $wcfm_membership_id = get_user_meta( $vendor_id, 'wcfm_membership', true );
- if( $wcfm_membership_id && wcfm_is_valid_membership( $wcfm_membership_id ) ) {
- $subscription = (array) get_post_meta( $wcfm_membership_id, 'subscription', true );
- if( isset( $subscription['is_free'] ) ) {
- echo "<div class='wcfm_clearfix'></div><br />";
- _e( 'Cancel vendor membership: ', 'wc-multivendor-membership' );
- echo '<a href="#" style="float: none; padding: 10px !important;" data-memberid="'.esc_attr($vendor_id).'" data-membershipid="'.esc_attr($wcfm_membership_id).'" id="wcfm_membership_cancel_button" class="wcfm_membership_cancel_button wcfm_submit_button">' . esc_html__( 'Cancel', 'wc-multivendor-membership' ) . '</a>';
- echo "<div class='wcfm_clearfix'></div><br />";
- }
- }
- });
Add Comment
Please, Sign In to add comment