-
Notifications
You must be signed in to change notification settings - Fork 336
Description
Bug Description
Some users are encountering errors on their AdSense dashboard. Reports of this issue started after the last plugin release (1.2.0)
new Intl.NumberFormat(navigator.language,{style:”currency”,currency:n}).formatToParts is not a function. (In ‘new Intl.NumberFormat(navigator.language,{style:”currency”,currency:n}).formatToParts(e)’, ‘new Intl.NumberFormat(navigator.language,{style:”currency”,currency:n}).formatToParts’ is undefined)
Related WP Support Form threads:
- https://wordpress.org/support/topic/adsense-and-analytics-error/
- https://wordpress.org/support/topic/cant-access-sitekit-section-of-wp-dashboard-or-place-ads-because-of-error-code/
- https://wordpress.org/support/topic/wp-site-kit-dashboard-adsense-error/
Additional information
- Unable to reproduce on testing environment
- Possibly related to Javascript Error After Updating #1054
Screenshots
Edge 17 (Win 10) - Different error than reported

Interestingly, this thread reports being on a more recent version of Windows and on an older version of Edge than they should be due to reported problems with auto-update.
Additional Context
- PHP Version:
- OS: [e.g. iOS]
- Browser: Safari 12, Edge 17
- Plugin Version [e.g. 22]
- Device: [e.g. iPhone6]
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- Currency formatting should work in all major browsers, going back at least 2 major versions
Implementation Brief
- Refactor number formatting to use existing
numberFormat()utility function which does not useformatToParts - Merge Fix Adsense dash replace error and enhance formatted number i18n #1261
Changelog entry
- Fix JavaScript errors in AdSense screens that was a result of
Intl.NumberFormat.formatToPartsnot being supported in Safari.

