AJAX-powered WooCommerce side cart focused on fast UX and developer-first extensibility.
Himuon Flex Cart keeps shoppers on the current page while they:
- update quantities
- edit variations/subscription options
- apply/remove coupons
- review totals and free-shipping progress
- proceed to checkout
All major output areas are extensible via hooks and filters.
This plugin currently has no admin settings page for UI/behavior configuration. Customization is intentionally done through:
- WordPress hooks/filters
- template overrides/patches
- AJAX side cart with WooCommerce fragment refresh
- In-cart quantity update and item removal
- Variation edit panel (inside side cart)
- Subscription edit support (WCS ATT integration)
- Coupon panel with apply/remove flow
- Optional server-rendered coupon list
- Free-shipping progress bar
- Footer coupon rows, discount, and subtotal/total row
- Mobile-friendly drawer behavior
add_filter( 'himuon_flex_cart_header_text', function () {
return __( 'My Cart', 'your-text-domain' );
} );add_filter( 'himuon_flex_cart_free_shipping_threshold', function () {
return 0;
} );add_filter( 'himuon_flex_cart_free_shipping_threshold', function () {
return 75;
} );add_filter( 'himuon_flex_cart_enable_coupon_list', '__return_false' );add_filter( 'himuon_flex_cart_theme_colors', function ( $colors ) {
return [
'primary' => '#16a34a',
'secondary' => '#09090b',
'text' => '#52525b',
'title' => '#27272a',
'border' => '#e4e4e7',
'border-light' => '#f4f4f5',
'danger' => '#ef4444',
'alt-bg' => '#fafafa',
];
} );add_filter( 'himuon_flex_cart_mini_cart_icon', function () {
return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" aria-hidden="true"><path fill="currentColor" d="M7 4h10l1 2h3v2h-1l-2 10H6L4 8H3V6h3l1-2zm1.2 4 1.4 8h5l1.4-8H8.2z"/></svg>';
} );Any element with the himuon-side-cart-handler class will toggle the side cart.
<button type="button" class="himuon-side-cart-handler">
Open Cart
</button>add_filter( 'himuon_flex_cart_show_mini_cart', '__return_false' );himuon_flex_cart_mini_cart_icon(string SVG) (source)himuon_flex_cart_show_mini_cart(bool) (source)himuon_flex_cart_enable_coupon_list(bool) (source)himuon_flex_cart_theme_colors(array) (source)himuon_flex_cart_free_shipping_threshold(float) (source)himuon_flex_cart_header_text(string) (source)himuon_flex_cart_show_thumbnails(bool) (source)himuon_flex_cart_thumbnail_size(string) (source)himuon_flex_cart_footer_subtotal_label(string) (source)himuon_flex_cart_footer_discount_label(string) (source)himuon_flex_cart_footer_checkout_button_label(string) (source)
himuon_flex_cart_footer_start(source)himuon_flex_cart_footer_before_coupon_trigger(source)himuon_flex_cart_footer_after_coupon_trigger(source)himuon_flex_cart_footer_before_applied_coupons(source)himuon_flex_cart_footer_coupon_row(source)himuon_flex_cart_footer_after_applied_coupons(source)himuon_flex_cart_footer_before_discount(source)himuon_flex_cart_footer_after_discount(source)himuon_flex_cart_footer_before_total(source)himuon_flex_cart_footer_after_total(source)himuon_flex_cart_footer_before_checkout(source)himuon_flex_cart_footer_after_checkout(source)himuon_flex_cart_footer_end(source)
add_action( 'himuon_flex_cart_footer_before_checkout', function ( $cart ) {
if ( ! $cart ) {
return;
}
echo '<div class="my-side-cart-note">';
echo esc_html__( 'You can update quantities before checkout.', 'your-text-domain' );
echo '</div>';
}, 10, 1 );himuon_flex_cart_coupon_panel_start(source)himuon_flex_cart_coupon_before_title(source)himuon_flex_cart_coupon_after_title(source)himuon_flex_cart_coupon_before_notices(source)himuon_flex_cart_coupon_after_notices(source)himuon_flex_cart_coupon_before_form(source)himuon_flex_cart_coupon_form_start(source)himuon_flex_cart_coupon_form_end(source)himuon_flex_cart_coupon_after_form(source)himuon_flex_cart_coupon_before_list(source)himuon_flex_cart_coupon_after_list(source)himuon_flex_cart_coupon_before_list_loading(source)himuon_flex_cart_coupon_after_list_loading(source)himuon_flex_cart_coupon_panel_end(source)
add_action( 'himuon_flex_cart_coupon_after_form', function () {
echo '<p class="my-coupon-help">';
echo esc_html__( 'Tip: coupon codes are case-insensitive.', 'your-text-domain' );
echo '</p>';
} );- Main plugin bootstrap:
himuon-flex-cart.php - Runtime classes:
src/SideCart.php,src/Coupon.php - View builders:
src/Frontend/* - Templates:
templates/* - Frontend scripts:
assets/js/himuon-flex-cart.jsassets/js/himuon-flex-cart-coupon.jsassets/js/himuon-flex-cart-add-to-cart.js
readme.txt is kept for WordPress plugin metadata and directory compatibility.
Use this README.md for GitHub-focused documentation and developer examples.