Site logo

Archived topic

Bug: WooCommerce Typography problem

3 replies · Started by David R on October 6, 2022

Viewing posts 1–4 of 4

In GP Premium, /woocommerce/functions/functions.php about line 808 begins a small section of code that applies when dynamic typography is in use. The problem is that even though this is pulling typography settings from the dynamic typo settings, it has a hardcoded units choice of 'px'. The result is that when the button font-size is set in the customizer to be under 1, such as 0.8rem, then this code will output a font-size of 0px.

I propose that line 814 ought to be changed from
$css->add_property( 'font-size', absint( $data['fontSize'] ), false, 'px' );
to
$css->add_property( 'font-size', $data['fontSize'], false, $data['fontSizeUnit'] );

Lines 827 and 833 ought to be modified similarly.

Hi there,

thanks for reporting this, ill take a look and get a PR raised to fix that.

Thank you, David.

Is it possible you could confirm this change will be included in the forthcoming update?

Its been added to our Git issues log, so we will get it scheduled in for the fix.

This archived topic is closed to new replies.