Free Gift Coupons v3.8.2 – WooCommerce 11.1 Compatibility & Cart Block Edit Button Styling
Free Gift Coupons 3.8.2 is a maintenance release, tested with WooCommerce 11.1.0 and WordPress 7.1.0. The Choose options button on a variable free gift in the Cart block now carries WooCommerce’s standard button class, so it takes on the styling your theme already applies to add-to-cart and checkout buttons. There is no database update with this release, and the minimum requirements are unchanged.
Updates
Tested with WooCommerce 11.1 and WordPress 7.1
Free Gift Coupons 3.8.2 is tested with WooCommerce 11.1.0 and WordPress 7.1.0. Minimum requirements are unchanged: WordPress 6.2, WooCommerce 8.2 and PHP 7.4.
Improvements
The Cart block edit button for variable gifts matches your theme’s buttons
When a free gift is a variable product, the Cart block shows a Choose options button on the gift line, or Edit options once the customer has picked a variation. Selecting it opens the product page, where the customer chooses their size, colour or other attributes for the gift. In 3.8.2 that button also carries WooCommerce’s standard button class, the class WooCommerce’s own templates put on add-to-cart, update-cart and checkout buttons. A theme that styles buttons through that class now styles the gift’s edit button the same way, so it matches the rest of your store instead of showing the generic outlined block button.
Block themes were already covered: 3.8.0 added the theme’s own button element class to this link, so a block theme’s button colours and shapes applied from that release. 3.8.2 extends the same treatment to themes that rely on the classic button class. The edit button in the classic shortcode cart is unchanged.
Note for developers: The edit link’s class list in the Cart block is now
components-button button wc-fgc-cart-item__edit-link wc-block-components-button outlined contained, plus the theme’s button element class. Thewc-fgc-cart-item__edit-linkhook is unchanged, so existing CSS that targets it keeps working. Any rule you have written for.buttoninside the cart now applies to this link as well.
Why this matters
- Tested with WooCommerce 11.1.0 and WordPress 7.1.0, with no database update to run
- The Choose options and Edit options buttons on variable free gifts in the Cart block pick up the styling your theme applies through the standard button class
- Existing CSS that targets the edit link keeps working, because the plugin’s own class on the link is unchanged
- Minimum requirements stay at WordPress 6.2, WooCommerce 8.2 and PHP 7.4