Delete items from the WooCommerce cart button
v1.0Benjamin Hagh Parast · 2024年4月12日 上架
You can use this shortcode by placing [delete_cart_items_button] in a post, page, or widget.
- 正在使用
- 10 以下
- 评分
- 暂无
- 累计下载
- 793
- 最近更新
- 2026年1月10日
需要 WordPress 6.9+已测试到 6.9.12PHP 8.0+
This code defines a shortcode [delete_cart_items_button] that generates a button. When the button is clicked, it triggers an AJAX request to the server, and the delete_cart_items_ajax_handler function empties the WooCommerce cart.