diff --git a/plugins/woocommerce-admin/client/customize-store/assembler-hub/sidebar/global-styles/variation-container.jsx b/plugins/woocommerce-admin/client/customize-store/assembler-hub/sidebar/global-styles/variation-container.jsx index c3a86919a1b..36e5d12d733 100644 --- a/plugins/woocommerce-admin/client/customize-store/assembler-hub/sidebar/global-styles/variation-container.jsx +++ b/plugins/woocommerce-admin/client/customize-store/assembler-hub/sidebar/global-styles/variation-container.jsx @@ -95,10 +95,10 @@ export const VariationContainer = ( { variation, children } ) => { // With the Font Library, the fontFamilies object contains an array of font families installed with the Font Library under the key 'custom'. // We need to compare only the active theme font families, so we compare the theme font families with the current variation. const { theme } = user.settings.typography.fontFamilies; - - return isEqual( variation.settings.typography, { - fontFamilies: { theme }, - } ); + return variation.settings.typography?.fontFamilies.theme.every( + ( { slug } ) => + theme.some( ( { slug: themeSlug } ) => themeSlug === slug ) + ); }, [ user, variation ] ); let label = variation?.title; diff --git a/plugins/woocommerce/changelog/44724-fix-font-is-not-selected b/plugins/woocommerce/changelog/44724-fix-font-is-not-selected new file mode 100644 index 00000000000..d1bb92000c2 --- /dev/null +++ b/plugins/woocommerce/changelog/44724-fix-font-is-not-selected @@ -0,0 +1,4 @@ +Significance: patch +Type: fix +Comment: [CYS - Core] improve logic to find active fonts +