Appointment Plus and Membership Integration

Hello,

I have tried to set Appointments plus so that certain individuals with a Membership do not have to pay in advance. The Membership level is "Pay in Person Clients". I checked the appropriate box in appointments plus and highlighted the appropriate membership level. I created a test account with a customer under the "pay in Person Clients" Level. This person is still required to make a payment for an unknown reason. Please let me know how to troubleshoot this problem

  • Tyler Postle

    Hey dcayme1,

    Thanks for your question and welcome to the WPMU DEV Community!

    I have the same behaviour on my install as well. I will mark this as a bug so the developer can get it resolved asap :slight_smile:

    Sorry for the inconvenience.

    In the meantime, I got this code from one of our devs as a temporary solution:

    add_filter( 'app_paypal_amount', 'no_paypal_for_membership' );
    function no_paypal_for_membership( $price ) {
    	global $appointments;
    	//check for membership
    	if ( $appointments->membership_active && is_user_logged_in() ) {
    		$opts    = $appointments->get_options();
    		$members = maybe_unserialize( $opts['members'] );
    		if ( is_array( $members ) ) {
    			$levels = $members['level'];
    			foreach ( $levels as $level ) {
    				if(current_user_on_level($level)){
    					$price = 0;
    					break;
    				}
    			}
    		}
    	}
    
    	return $price;
    }

    Can you paste that into your themes functions.php file? That should resolve the issue for the time being :slight_smile:

    Let me know if you have any further questions!

    Talk to you soon.

    All the best,
    Tyler

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.