Home Plugins ajaxified cart woocommerce
Ajaxified Cart logo

Ajaxified Cart

by Abhishek Kumar on WordPress.org

AJAX add-to-cart for WooCommerce: simple & variable products on archives/blocks via accessible modal and instant cart refresh.

(12)

WooCommerce core does not provide AJAX add-to-cart on the single product page or for variable products listed on archive pages (it redirects to the single view). This plugin adds an unobtrusive AJAX workflow for:

  • Simple products (single product page button becomes AJAX)
  • Variable products on archive & block-based Product Collection (opens an accessible modal to choose attributes, then adds via AJAX)
  • Classic themes and modern block/FSE themes (2025 and later) with Product Collection blocks

Highlights:
* Works with WooCommerce fragments (mini-cart updates automatically)
* Accessible modal (focus trap, ESC to close, restore focus)
* Nonce-secured AJAX endpoints; sanitized and validated input
* Settings page to enable/disable variable product archive functionality
* Block theme compatibility (intercepts “Select options” buttons) with slug/product_id fallback
* Performance-minded (loads minified bundles built via Webpack; falls back to source if missing)
* Translations auto-loaded from WordPress.org (no manual POT/PO generation required)

Privacy: This plugin does not send any data to external services. It only uses WooCommerce cart/session APIs.

Development

Build commands:

  1. Install dependencies:
    npm install
  2. Production build (minified + source maps):
    npm run build
  3. Watch during development:
    npm run watch
  4. Lint JS:
    npm run lint

Translations: WordPress.org language packs auto-load this plugin’s strings. The former POT/PO/MO tooling and i18n loader file were removed (WP 4.6+). Do not add a load_plugin_textdomain() call; simply keep the Text Domain header accurate.

WooCommerce is a registered trademark of Automattic Inc. This plugin is not affiliated with or endorsed by Automattic/WooCommerce.

Active installations400+
Weekly downloads
14-33.33%
Version2.0.2
Last updated11/11/2025
WordPress version5.8
Tested up to6.8.3
PHP version8.0
Tags
add to cartajaxblock themescartwoocommerce