You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 );
The text was updated successfully, but these errors were encountered:
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:
The text was updated successfully, but these errors were encountered: