Based ona customer's requirement.
If a user purchases a Pass (AA, recurring) they are charged a signup fee. The next time they wish to purchase it they should not be charged the signup fee:
function edd_remove_signup_fee_if_purchased( $item ) {
if ( ! is_user_logged_in() ) {
return $item;
}
// Change your Membership ID here for which you wish to remove the Signup Fee.
$excluded_download = 405;
if ( $excluded_download != $item['id'] ) {
return $item;
}
if ( isset( $item['options']['recurring']['signup_fee'] ) ) {
if( edd_has_user_purchased( get_current_user_id(), $item['id'] ) ) {
$item['options']['recurring']['signup_fee'] = 0;
}
}
return $item;
}
add_filter( 'edd_add_to_cart_item', 'edd_remove_signup_fee_if_purchased', 10 );