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.

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.