I have small WP plugin, in it I have php Ajax handler file, where I can not use wordpress methods. In this file I do simple check:
isset($_REQUEST['action']) && 'woocommerce_refund_line_items' !== strval($_REQUEST['action'])
When I try to pass WC phpcs standards I always get an error:
Detected usage of a non-sanitized input variable:
$_REQUEST['action']
(WordPress.Security.ValidatedSanitizedInput.InputNotSanitized)
Same happen for $_SERVER variables also. How can I solve this problem? Thanks!