0

I'm trying to (temporarily) ignore some errors about not using Nonces. I've tried using // @codingStandardsIgnoreLine. before the line, and I've tried using // phpcs:ignore WordPress.Security.NonceVerification.Missing., I'm still being notified of a nonce problem:

enter image description here

What have I done wrong? I'm using VSCode. I have PHPCS installed using composer, and the PHPCS (and -BF) extensions installed.

gillespieza
  • 137
  • 8

1 Answers1

0

Did you add /Users/your-username/.composer/vendor/bin/phpcs as part of the installation? I had a similar issue because I had added another username.

Also, make sure that the following line is at the root of your project in a terminal:

composer require --dev squizlabs/php_codesniffer

To ignore the line, you can alternatively type // phpcs:disable and // phpcs:enable at the beginning and end of the line.

User2207
  • 32
  • 11
  • Thank you - ```composer require --dev squizlabs/php_codesniffer``` did the trick. I had changed git branches and I don't think the package file came with it... Either way, thanks, that did it. – gillespieza Aug 10 '22 at 08:17