update comment template with improved if statement from plugin