-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve the deprecation warning for the googlesitekit_analytics-4_tag_block_on_consent
filter
#8362
Comments
I looked at this as well and core wasn't using the message at all from what I found. There is no alternative filter though (as noted in the IB), so I think this is a worthwhile enhancement. AC + IB ✅ |
QA Update:
|
@wpdarren Thank you for testing this. I think this is correct behaviour because this deprecation warning is generated by apply_filters_deprecated, which in turn calls _deprecated_hook. If we look at the function, it calls wp_trigger_error( '', $message, E_USER_DEPRECATED ); So this tells us that this is user generated warning, not the warning generated from PHP itself, thus it will show |
Feature Description
At present, the deprecation warning for the
googlesitekit_analytics-4_tag_block_on_consent
filter that was introduced in #8275 reads as follows:We should improve the message to help steer users toward the Consent Mode feature as an alternative, for example:
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
googlesitekit_analytics-4_tag_block_on_consent
should read as follows:Implementation Brief
Analytics_4\Web_Tag::get_tag_blocked_on_consent_deprecated_args()
to include the translated additional message as per the AC. The second argument should be an empty string.site-kit-wp/includes/Modules/Analytics_4/Web_Tag.php
Lines 92 to 96 in 9a5b02e
Test Coverage
QA Brief
WP_DEBUG
andWP_DEBUG_DISPLAY
set totrue
inwp-config.php
file so that we can see the warning on the page.Changelog entry
googlesitekit_analytics-4_tag_block_on_consent
filter.The text was updated successfully, but these errors were encountered: