genetic fallacy
Judging a claim by where it came from instead of by the evidence for it.
The genetic fallacy accepts or rejects a claim because of its origin, such as who first proposed it or how the idea arose, rather than on the evidence for it. Where an idea came from doesn't settle whether it is true.
Examples
"That exercise routine was invented to sell a video series, so it can't be good for you."
See also