CYS - Core: install fonts only when the tracking is enabled (#44558)
* CYS - Core: install fonts only when the tracking is enabled * add a parameter to reduce the response payload * add changelog
This commit is contained in:
parent
8d5c0dae83
commit
a2d35b0563
|
@ -63,6 +63,11 @@ const installAndActivateTheme = async () => {
|
|||
};
|
||||
|
||||
const installFontFamilies = async () => {
|
||||
const isTrackingEnabled = window.wcTracks?.isEnabled || false;
|
||||
if ( ! isTrackingEnabled ) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
const installedFontFamily = ( await resolveSelect(
|
||||
'core'
|
||||
|
|
|
@ -115,7 +115,7 @@ export const fetchIntroData = async () => {
|
|||
const fetchIsFontLibraryAvailable = async () => {
|
||||
try {
|
||||
await apiFetch( {
|
||||
path: '/wp/v2/font-collections',
|
||||
path: '/wp/v2/font-collections?_fields=slug',
|
||||
method: 'GET',
|
||||
} );
|
||||
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
Significance: minor
|
||||
Type: fix
|
||||
|
||||
CYS - Core: install fonts only when the tracking is enabled
|
Loading…
Reference in New Issue