diff --git a/plugins/woocommerce-blocks/assets/js/atomic/blocks/product-elements/price/block.tsx b/plugins/woocommerce-blocks/assets/js/atomic/blocks/product-elements/price/block.tsx index 95020978e38..cb0daaa826f 100644 --- a/plugins/woocommerce-blocks/assets/js/atomic/blocks/product-elements/price/block.tsx +++ b/plugins/woocommerce-blocks/assets/js/atomic/blocks/product-elements/price/block.tsx @@ -54,7 +54,8 @@ export const Block = ( props: Props ): JSX.Element | null => { colorProps.className, { [ `${ parentClassName }__product-price` ]: parentClassName, - } + }, + typographyProps.className ); if ( ! product.id && ! isDescendentOfSingleProductTemplate ) { diff --git a/plugins/woocommerce-blocks/assets/js/atomic/blocks/product-elements/price/supports.ts b/plugins/woocommerce-blocks/assets/js/atomic/blocks/product-elements/price/supports.ts index cedd8b3c294..3cca5e36b1e 100644 --- a/plugins/woocommerce-blocks/assets/js/atomic/blocks/product-elements/price/supports.ts +++ b/plugins/woocommerce-blocks/assets/js/atomic/blocks/product-elements/price/supports.ts @@ -14,21 +14,25 @@ export const supports = { ...( isFeaturePluginBuild() && { color: { text: true, - background: false, + background: true, link: false, __experimentalSkipSerialization: true, }, typography: { fontSize: true, + lineHeight: true, + __experimentalFontFamily: true, __experimentalFontWeight: true, __experimentalFontStyle: true, __experimentalSkipSerialization: true, + __experimentalLetterSpacing: true, }, __experimentalSelector: '.wc-block-components-product-price', } ), ...( typeof __experimentalGetSpacingClassesAndStyles === 'function' && { spacing: { margin: true, + padding: true, }, } ), }; diff --git a/plugins/woocommerce-blocks/src/BlockTypes/ProductPrice.php b/plugins/woocommerce-blocks/src/BlockTypes/ProductPrice.php index 795432374ad..997dd60ba12 100644 --- a/plugins/woocommerce-blocks/src/BlockTypes/ProductPrice.php +++ b/plugins/woocommerce-blocks/src/BlockTypes/ProductPrice.php @@ -82,7 +82,7 @@ class ProductPrice extends AbstractBlock { $product = wc_get_product( $post_id ); if ( $product ) { - $styles_and_classes = StyleAttributesUtils::get_classes_and_styles_by_attributes( $attributes, array( 'font_size', 'font_weight', 'font_style', 'text_color', 'background_color', 'margin' ) ); + $styles_and_classes = StyleAttributesUtils::get_classes_and_styles_by_attributes( $attributes ); $text_align_styles_and_classes = StyleAttributesUtils::get_text_align_class_and_style( $attributes ); return sprintf(