Ignore a single PHPCS rule instead of ignoring all rules
Replace the usage of `// @codingStandardsIgnoreStart` and `// @codingStandardsIgnoreEnd` with `// phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores` on WC_Gateway_Paypal_IPN_Handler::check_response(). Ignoring a single PHPCS rule is better than ignoring everything to protect the line against potential violations of the other rules.
This commit is contained in:
parent
e0ccc64571
commit
5b5256370a
|
@ -45,9 +45,8 @@ class WC_Gateway_Paypal_IPN_Handler extends WC_Gateway_Paypal_Response {
|
|||
if ( ! empty( $_POST ) && $this->validate_ipn() ) { // WPCS: CSRF ok.
|
||||
$posted = wp_unslash( $_POST ); // WPCS: CSRF ok, input var ok.
|
||||
|
||||
// @codingStandardsIgnoreStart
|
||||
// phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
|
||||
do_action( 'valid-paypal-standard-ipn-request', $posted );
|
||||
// @codingStandardsIgnoreEnd
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue