Added check for deprecated setting

Avoids adding the method as deprecated if the value of the deprecated setting is false