Skip to content

Commit

Permalink
PHPCS fix
Browse files Browse the repository at this point in the history
  • Loading branch information
martynmjones committed May 31, 2024
1 parent ccf2e0e commit 354baeb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/e2e/test-snippets/test-snippets.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,11 @@
add_filter(
'woocommerce_ga_gtag_consent_modes',
function ( $modes ) {
$status = 'granted';
// Optional: Set the default consent state for tests via the `consent_default` URL parameter.
$status = isset( $_GET['consent_default'] ) ? $_GET['consent_default'] : 'granted';
if ( isset( $_GET['consent_default'] ) ) {

Check failure on line 24 in tests/e2e/test-snippets/test-snippets.php

View workflow job for this annotation

GitHub Actions / PHP coding standards - diff

Processing form data without nonce verification.
$status = sanitize_text_field( wp_unslash( $_GET['consent_default'] ) ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
}

$modes[0]['analytics_storage'] = $status;
$modes[0]['ad_storage'] = $status;
Expand Down

0 comments on commit 354baeb

Please sign in to comment.