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.
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:
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.
Build commands:
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.