CPVC can be used for water supplies
PVC can't be used inside a home.
CPVC can't be used on the tub spout. That will need to be changed. It's creates a restriction that forces water out of the shower head when the tub is filling.
All instructions mention this. No PEX and no CPVC on tub spouts!
The tub spout piping can be copper, brass nipples, or galvanized nipples. Anything smaller than that pushed water out the shower head.