Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Commit 04fb85d

Browse files
authored
Mini Cart Block: additional class are visible on the frontend page #5581 (#6716)
Mini Cart Block: additional class are visible on the frontend page
1 parent 9371278 commit 04fb85d

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎src/BlockTypes/MiniCart.php‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,10 @@ protected function get_markup( $attributes ) {
339339

340340
$classes_styles = StyleAttributesUtils::get_classes_and_styles_by_attributes( $attributes, array( 'text_color', 'background_color', 'font_size', 'font_family' ) );
341341
$wrapper_classes = sprintf( 'wc-block-mini-cart wp-block-woocommerce-mini-cart %s', $classes_styles['classes'] );
342-
$wrapper_styles = $classes_styles['styles'];
342+
if ( ! empty( $attributes['className'] ) ) {
343+
$wrapper_classes .= ' ' . $attributes['className'];
344+
}
345+
$wrapper_styles = $classes_styles['styles'];
343346

344347
$aria_label = sprintf(
345348
/* translators: %1$d is the number of products in the cart. %2$s is the cart total */

0 commit comments

Comments
 (0)