Description
Woocommerce custom product cart button plugin
1. General objective
Allows you to graphically and functionally customize the two key WooCommerce buttons on the product sheet:
-
The “Add to Cart” button
-
The “View my cart” button (added to the right of the “Add to Cart” button)
All options are accessible directly via the Customizer from WordPress, without touching your theme's code.
2. Customizing the “Add to Cart” button
Integrated into the header of each product page, this feature injects inline CSS to instantly adapt the rendering:
-
Button text
– Change the default label “Add to cart” -
Colors
– Background color
– Text color -
border
- Style (none,solid,dotted,dashed)
– Thickness (px)
- Color -
Rounded corners
– Radius of each corner (top-left, top-right, bottom-right, bottom-left) -
Drop shadow
– X/Y Offset (px)
– Blur (px)
– Shadow color -
CSS animations (choice in the Customizer)
- shake : slight horizontal shaking
- zoom meeting : zoom/pulse effect
- cartoon : cyclical change of background color
- random : random selection from the three above
All these styles are applied through a single <style> injected into wp_head, ensuring minimal impact on performance.
3. Added the “View my cart” button
Positioned immediately after the “Add to cart” button thanks to the hook woocommerce_after_add_to_cart_button, this second button:
-
Redirect to the shopping cart page (
wc_get_cart_url()) -
texts editable (default “View my cart”)
-
Colors
- Bottom
- Text -
border
– Style, thickness, color -
Rounded corners (individuals)
-
Drop shadow (X/Y offset, blur, color)
-
Left margin predefined to space from the main button
4. Configuration interface (Customizer)
A unique section “Toilet Button Personalization” groups all the settings:
-
“Add to Cart” Settings
-
“View my cart” settings
For each group:
-
add_setting()+add_control()(text type, color, select, number) -
Validation via
sanitize_text_field,sanitize_hex_color,absint
5. Compatibility and best practices
-
Minimum version required : WooCommerce 3.0+
-
Themes : compatible with most themes (Storefront, Astra, OceanWP, etc.)
-
Performances :
-
Lightweight PHP code, no external dependencies
-
Inline CSS scoped only to product pages
-
-
Maintenance :
-
Current version : 1.5
-
Translatable via text-domain
killerdev98-wc-custom-button
-
6. Typical use cases
-
Strong branding : adapt the button colors to the visuals of your store.
-
Call to action effect : add a “shake” animation to highlight the button.
-
Quick user journey : offer direct access to the basket from the product sheet.
-
Graphic uniformity : Set a consistent shape and shadow for all buttons.
This plugin thus offers total control, with ease, over the appearance and behavior of the main buttons in your WooCommerce product catalog.
Pluggin woocommerce custom button cart product decostickerstore







The sticker is great! 👌 Perfect and very pretty! 👍 Thank you!
Schnelle Lieferung. Good quality.
Received in perfect condition, thank you.
Good Service as well as fast delivery.
Perfect, Excellent quality handling packaging