google / site-kit-wp

Site Kit is a one-stop solution for WordPress users to use everything Google has to offer to make them successful on the web.
https://sitekit.withgoogle.com
Apache License 2.0
1.25k stars 292 forks source link

Deprecation error for users when using the Ads module #9531

Open adamdunnage opened 1 month ago

adamdunnage commented 1 month ago

Bug Description

We have had a couple of reports in the support forum of the following Ads deprecation error:

Deprecated: Creation of dynamic property Google\Site_Kit\Modules\Ads\Web_Tag::$home_domain is deprecated in /home/w4397664/public_html/wp-content/plugins/google-site-kit/includes/Modules/Ads/Web_Tag.php on line 37

Like with many of these errors, it doesn't appear to have an impact in the Site Kit plugin but it's likely something that needs addressing with how we deal with the Ads module.

Example support topic: https://wordpress.org/support/topic/deprecated-creation-of-dynamic-property-google/

Steps to reproduce

N/A

Screenshots

Additional Context


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

Implementation Brief

The above should fix the reported issue. However, I see another potential issue with this class. The class accepts a home domain, but doesn't exactly embed this tag config as a linker command in the tag. As it is a simple improvement, the following can be done to solve this:

Test Coverage

QA Brief

Changelog entry

tofumatt commented 5 days ago

IB ✅