Fix linting issues

This commit is contained in:
Daniel Dudzic 2025-03-07 14:37:25 +01:00
parent e84bc21044
commit 3e8d6590f6
No known key found for this signature in database
GPG key ID: 31B40D33E3465483
2 changed files with 8 additions and 3 deletions

View file

@ -567,7 +567,7 @@ return array(
$container->get( 'settings.data.todos' )
);
},
'settings.service.gateway-redirect' => static function (): GatewayRedirectService {
'settings.service.gateway-redirect' => static function (): GatewayRedirectService {
return new GatewayRedirectService();
},
);

View file

@ -85,9 +85,14 @@ class GatewayRedirectService {
// Get current URL parameters.
// phpcs:disable WordPress.Security.NonceVerification.Recommended
$page = isset( $_GET['page'] ) ? $this->sanitize_get_param( $_GET['page'] ) : '';
$tab = isset( $_GET['tab'] ) ? $this->sanitize_get_param( $_GET['tab'] ) : '';
// phpcs:disable WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
// phpcs:disable WordPress.Security.ValidatedSanitizedInput.MissingUnslash
// The sanitize_get_param method handles unslashing and sanitization internally.
$page = isset( $_GET['page'] ) ? $this->sanitize_get_param( $_GET['page'] ) : '';
$tab = isset( $_GET['tab'] ) ? $this->sanitize_get_param( $_GET['tab'] ) : '';
$section = isset( $_GET['section'] ) ? $this->sanitize_get_param( $_GET['section'] ) : '';
// phpcs:enable WordPress.Security.ValidatedSanitizedInput.MissingUnslash
// phpcs:enable WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
// phpcs:enable WordPress.Security.NonceVerification.Recommended
// Check if we're on a WooCommerce settings page and checkout tab.