From 01cdb1a73d3f4eca6af93d0364528317714c1a28 Mon Sep 17 00:00:00 2001 From: Luigi Teschio Date: Fri, 28 Oct 2022 19:07:56 +0200 Subject: [PATCH] Fix inconsistent button styling with TT3 (#7516) * fix inconsistent button styling with TT3 * use wc_wp_theme_get_element_class_name * add check to be sure that wc_wp_theme_get_element_class_name function exists --- assets/js/atomic/blocks/product-elements/button/block.js | 2 ++ src/BlockTypes/AbstractProductGrid.php | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/assets/js/atomic/blocks/product-elements/button/block.js b/assets/js/atomic/blocks/product-elements/button/block.js index 579424b2f1b..19a63d8e0ef 100644 --- a/assets/js/atomic/blocks/product-elements/button/block.js +++ b/assets/js/atomic/blocks/product-elements/button/block.js @@ -162,6 +162,7 @@ const AddToCartButton = ( { aria-label={ buttonAriaLabel } className={ classnames( 'wp-block-button__link', + 'wp-element-button', 'add_to_cart_button', 'wc-block-components-product-button__button', colorStyles.className, @@ -206,6 +207,7 @@ const AddToCartButtonPlaceholder = ( {