Pretty bad advice, given what the RCW in question really says:
It could very easily be interpreted that there are two seperate and distinct phrases separated by the second "or" in the first sentence. The two separate and distinct phrases are "upon demand to any police officer" or "to any other person when and if required by law to do so." I believe this would be the more common interpretation and "when and if required by law to do so" would ONLY apply "to any other person".
This is further evidenced by the fact that the word "to" is included before each separate and distinct phrase. "to any police officer" or "to any other person when and if required by law to do so."
If the legislature intended for "when and if required by law to do so" was meant to apply to both, they could have indicated their intention by either writing, "upon demand to any police officer or to any other person, when and if required by law to do so" or "upon demant to any police officer or any other person when and if required by law to do so." In the first case, the added comma separates the limitation from the list, making it applicable to all the items in the list. In the second case the absence of the word "to" ties only "any police officer" and "any other person" together by themselves just like "his or her" before that.
I won't bet my defense on the grammatical interpretation of the law and I will assume "when and if required to do so by law" only applies to "any other person". So, if I am in a situation that requires a CPL, and a police officer demands to see my CPL, I will display it to them. If I am not in a situation that requires a CPL - then there can be no punishment for failure to provide a document for which there is no legal requirement for me to have in my possession.