Fix inconsistent button styling with TT3 (https://github.com/woocommerce/woocommerce-blocks/pull/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
This commit is contained in:
parent
7dd32d73c4
commit
030ebf8142
|
@ -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 = ( {
|
|||
<button
|
||||
className={ classnames(
|
||||
'wp-block-button__link',
|
||||
'wp-element-button',
|
||||
'add_to_cart_button',
|
||||
'wc-block-components-product-button__button',
|
||||
'wc-block-components-product-button__button--placeholder',
|
||||
|
|
|
@ -647,7 +647,7 @@ abstract class AbstractProductGrid extends AbstractDynamicBlock {
|
|||
'data-product_id' => $product->get_id(),
|
||||
'data-product_sku' => $product->get_sku(),
|
||||
'rel' => 'nofollow',
|
||||
'class' => 'wp-block-button__link add_to_cart_button',
|
||||
'class' => 'wp-block-button__link ' . ( function_exists( 'wc_wp_theme_get_element_class_name' ) ? wc_wp_theme_get_element_class_name( 'button' ) : '' ) . ' add_to_cart_button',
|
||||
);
|
||||
|
||||
if (
|
||||
|
|
Loading…
Reference in New Issue