| 开发者 | phoenixwp |
|---|---|
| 更新时间 | 2026年6月22日 20:09 |
| 捐献地址: | 去捐款 |
| PHP版本: | 8.2 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
phoenix-gift-for-woocommerce-cart-item for theme styling on cart and block checkout/wp-content/plugins/phoenix-gift-for-woocommerce/ or install from the WordPress plugin directory.The configurable Gift label badge appears in the mini cart and classic (shortcode) checkout only. It is not shown on the cart page or in the Cart/Checkout blocks, to avoid theme and HTML conflicts.
The plugin adds the CSS class phoenix-gift-for-woocommerce-cart-item to the gift line (classic cart and blocks). Add custom CSS under Appearance → Customize → Additional CSS.
Example for Cart and Checkout blocks:
.phoenix-gift-for-woocommerce-cart-item .wc-block-components-product-name::after { content: "Free gift"; display: inline-block; margin-inline-start: 0.35em; padding: 0.1em 0.45em; font-size: 0.75em; font-weight: 600; border-radius: 3px; background: #e8f5e9; color: #2e7d32; }
Replace Free gift with your shop wording. This text is fixed in CSS and does not sync with the admin Gift label field.
Documentation and support: https://phoenixwp.com/support/ — shorter reference in docs/FAQ.md inside the plugin.
Check that the rule is enabled, the gift product is purchasable, and the threshold is met (gross subtotal excluding the gift line, or item quantity excluding the gift).
The free gift is added by product ID. With WPML (or WooCommerce Multilingual), translate the gift product into every active shop language and keep each translation published and purchasable. If the gift exists only in the default language, customers who switch language on the storefront will usually not see the gift in the cart. Select the gift in Gift settings using the product from your default language; WPML links the translations automatically when they exist.