Automattic / woocommerce-subscriptions-core

Subscriptions core package for WooCommerce
Other
80 stars 29 forks source link

Support block themes for add to cart button #574

Closed bekarice closed 4 months ago

bekarice commented 4 months ago

Adds a CSS class needed for block themes to appropriately style buttons.

Fixes #

Description

Without the wp-element-button class applied, the add to cart buttons within the Add to Cart with Options block doesn't adopt any of the expected styles. Adding this class, when using add to cart blocks, resolves the styling issue. I tested this with the Twenty Twenty-Four theme.

How to test this PR

Product impact

bekarice commented 4 months ago

@mattallan thanks! ♥️ didn't see any other instances of buttons that would need this fix (maybe the switching buttons?), but would be great to double check!

mattallan commented 4 months ago

didn't see any other instances of buttons that would need this fix (maybe the switching buttons?), but would be great to double check!

@bekarice yeah I had a look too and couldn't see any other <button> uses across subscriptions core and the main plugin so we should be good.

Looks like we use <a href> styled as buttons a lot