If the player is riding a pig, using a splash or normal invisibility potion will have no affect until the player gets off of the pig. However, if you get back on the pig you will still be invisible and stay invisible even after the potion wears off. This was observed in singleplayer both survival and creative using third person.
Linked issues
Comments 4
A better term for this might be that invisibility does not toggle on riding entities. The pig becomes invisible if a splash potion. However, this can be abused as it provides infinite invisibility until you get off of the pig.
Resolving as Duplicate of MC-333.
This is probably related to or a duplicate of MC-790.