Skip to content

Conversation

@Axos11
Copy link
Contributor

@Axos11 Axos11 commented Jun 15, 2025

Ads a view-transition-api wrapper to the ajax cart replacements to enable standard behaviour progressively and allows for improvement via css.

Axos11 added 3 commits June 15, 2025 11:39
Streamlines cart item removal by utilizing the existing quantity update mechanism.

This change removes the dedicated 'woocommerce_remove_cart_item' action. Instead, when a user attempts to remove an item from the cart, the quantity is updated to zero. This approach simplifies the process and avoids triggering a full fragment refresh, improving performance and allows integration with the view transition api.
Progressively enhances the AJAX cart functionality to utilize the View Transition API for smoother updates.

Wraps cart fragment updates within `startViewTransition` when supported by the browser.
Adds a fallback to standard updates for browsers like Firefox that do not yet support the API.
Refactors fragment update logic into a dedicated function for better readability.
Avoids a PHP warning by initializing the 'fragments_append' array key
when new items are added to the cart during an update. This occurs
when a plugin (e.g., a BOGO plugin) adds a different item to the
cart during the update process.
@crftwrk crftwrk added this to v6.3.0 Jun 15, 2025
@crftwrk crftwrk moved this to Todo in v6.3.0 Jun 15, 2025
@crftwrk crftwrk moved this from Todo to In Progress in v6.3.0 Jun 15, 2025
@crftwrk crftwrk merged commit 1dd07dc into bootscore:main Jun 16, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done in v6.3.0 Jun 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants