SOLVED: AJAX add to cart: ".bricks-cart-added" is never removed after the success text resets

Request

Remove .bricks-cart-added at the same moment the success text is reset, so
the class mirrors the state it represents.

Current behaviour

After a successful AJAX add to cart, the button gets .bricks-cart-added and
the success label (“Added”). When the reset timer expires, the label reverts
to the default text — but .bricks-cart-added stays on the button
permanently.

Why this is a problem

The class is the only hook for styling the success state. Because it is
never removed, any styling applied to it becomes permanent: a button styled
green for confirmation stays green for the rest of the page session, so it
no longer signals anything. This makes visual success feedback impossible —
only the text can change, and it is too brief to read reliably.

Hi Jonas,
Thanks for your suggestion. Sounds like a useful improvement!

Hi @jonaswd

Thanks for explaining the use case. Having success styling reset alongside the button text makes sense.

After review, we’re keeping .bricks-cart-added unchanged because existing sites may rely on it to mark buttons that successfully added a product during the current page session. Removing it automatically could affect their custom styling or scripts.

Instead, we’re introducing .bricks-cart-success for the temporary success state. It will appear with the success text and be removed when the configured timer restores the original text.

You’ll be able to target this new class for styling that should reset with the label.
This supports your use case while preserving the existing behavior for other sites.

We will update this thread once implemented.

This sound perfect and seems even more consistent anyway because the class .bricks-cart-added still has its meaning because the product was indeed added no matter how long ago.

We’ve addressed this in Bricks 2.4.1, now available as a one-click update in your WordPress Dashboard.

Use .bricks-cart-success for styling that resets together with the success text. The existing .bricks-cart-added class keeps its current behavior.

Please read the changelog entry before updating, and let us know if you experience any issues.