What it does
mam-woocommerce is the bridge between a WooCommerce store and the mobile app. It does five jobs:
- Checkout / order pipeline. The app posts a cart as JSON to the plugin’s AJAX endpoint (
admin-ajax.php?action=mam_woocommerce_manager, subactionmam_submit_order— apps read the action name from theorder_actionfield in the phone data). The plugin authenticates the caller from their app token, builds a realWC_Order(line items with variations and add-ons, shipping address, tips, driver tip, taxes, delivery/service fees, coupon discounts), charges the card through themam_pmt_charge_cardfilter (answered by the active payment plugin, e.g. MAM Stripe Manager), and returns the result plus refreshed app data. A failed charge moves the order to Failed so it can’t be fulfilled. - Order screens in the app. The My Orders and All Open Orders content classes build the customer’s order list and the store-side open-orders list, including per-order tab-bar buttons (share, reorder, feedback, cancel order, request refund) and the order detail content blocks (
order_details,order_location,order_seller_profile,order_review_with_tip,order_seller_location). - Customer order actions. Cancel, feedback, and refund-request forms (Gravity Forms, picked in MAM Main’s Forms Manager) route back through the plugin with deny-by-default authorization: the acting user must own the order (customer actions) or be staff of the order’s vendor (fulfillment actions), with
manage_woocommercealways allowed and amam_wc_user_can_*filter as the escape hatch. Refund availability is additionally gated by the Refund settings (seemam_wc_is_refund_allowed). - Review/tip prompt. When Show Tip and Review after order complete is on, the most recent completed, un-reviewed order is pinned to the top of the home screen as a “Review your Order” card. In wp-admin, a Tip meta box on the order edit screen links a tip order back to the order it tips.
- Settings page. Mobile App Manager → WooCommerce hosts the General / Cart / Checkout / Refund / Color Settings tabs — and is also the page where sibling plugins mount their own tabs (e.g. GeoFilters, Product Vendors’ tabs) via the
mam_woocommerce_admin_settings_tabsfilter.
It also registers the order-feedback notification type (sent to administrators when a customer submits order feedback) and the WooCommerce reviews provider for MAM Reviews Manager, so app product reviews write through WooCommerce’s native rating data.
How an app order flows
- The app submits the cart JSON to
admin-ajax.php?action=mam_woocommerce_managerwith subactionmam_submit_orderand the user’s app token (pid). - The plugin resolves the customer from the token (orders can only be created for the server-resolved user — see
mam_wc_user_can_submit_order). - The cart is pre-processed (
woocommerce_before_order_modify_cart); a pre-processor can refuse the order with a real error message, or take over processing entirely (mam_woocommerce_menu_before_order_processing). - The
WC_Orderis created: items, addresses, tips, driver tip (delivery only — pickup orders never carry a delivery fee or driver tip), taxes, delivery/service fees, coupon discount, plus the order meta sibling plugins read (location_id,pickupDeliverOption,_selectedDate,selectedTime,_store_id,_order_addon_list, …). The order is attributed to the mobile app (created_via = app). - The card is charged via
mam_pmt_charge_card. With Place Hold on Order = Yes, an uncaptured authorization for 120% of the order total is placed instead, captured later throughmam_wc_settle_order. - On success the order moves to the
order_createdtrigger’s status (Processing by default — see Order status triggers); on charge failure it moves to Failed. - The response is filtered through
mam_wc_order_completedand returned with refreshed phone data.
Where it appears
| Surface | Driver |
|---|---|
| Cart / checkout screens in the app | Settings + per-user data injected into the phone data (mam_get_phone_data_before_send) |
| My Orders screen | wc_my_orders content class |
| All Open Orders screen (staff) | all-open-orders content class |
| Order detail sections | mam_content_section_order_* content blocks |
| Cancel / feedback / refund buttons on an order | tab-bar button filters + the forms picked in Forms Manager |
| Home-screen review/tip prompt | mam_hss_stack_after_bottom_tabbar |
| wp-admin → order edit screen | Tip meta box (works on both legacy and HPOS order screens) |
| wp-admin → Mobile App Manager → WooCommerce | the settings page (General / Cart / Checkout / Refund / Color Settings + sibling-plugin tabs) |
Setup paths
mam-main, WooCommerce, and Gravity Forms are installed and active; the entitlement filtermam_plugin_entitlementreturns a non-blocked record formam-woocommerce.- Activate the plugin. It self-registers the AJAX endpoint, the content classes/blocks, the settings page, and the order-status trigger registry on
plugins_loaded. - Configure the app texts, checkout behavior, tips, and refund policy on Mobile App Manager → WooCommerce — see Configure checkout for the app.
- (Optional) Pick the Cancel Order / Feedback / Refund forms in Mobile App Manager → Forms Manager — see Configure the cancel, feedback, and refund forms.
- A payment plugin (e.g.
mam-stripe-manager) must be active to answermam_pmt_charge_card, or every paid order will fail to charge.
Key concepts to know
- Menu-order checkout — the plugin always reports
checkout_is_menu_order_type = yesandcart_version = 2to the app: the cart is built client-side and submitted as one JSON payload, not item-by-item server round-trips. - Order status triggers — a registry that maps event slugs (
order_created,payment_failed, …) to WooCommerce statuses and app display labels; everything in the suite that changes or displays an order status goes through it. See Order status triggers. - Hold-and-settle — instead of charging immediately, checkout can place an authorization hold (120% of the total) and capture the exact amount days later; the capture runs through
mam_wc_settle_order(called by the Product Vendors auto-settle cron, or by your own code). - Deny-by-default authorization — every state-changing order action checks ownership/role server-side, with per-action
mam_wc_user_can_*filters as documented escape hatches.
Related articles
- Recipe: Configure checkout for the app
- Recipe: Configure the cancel, feedback, and refund forms
- Recipe: Order status triggers
- Hook:
mam_submit_order - Hook:
mam_wc_order_completed - Hook:
mam_wc_settle_order - Hook:
mam_pmt_charge_card/mam_pmt_refund_card - Hook:
mam_wc_is_refund_allowed - Hook:
get_order_status_triggers - Hook: the `mam_wc_usercan` authorization filters*
Metadata
| Field | Value |
|---|---|
| Article type | Plugin Overview |
| Plugin slug | mam-woocommerce |
| Applies to plugin version | 26.19.3+ |
| Category | Plugin Reference |
| Depends on | MAM Main, WooCommerce, Gravity Forms |
| Works with | MAM Stripe Manager (cards), MAM WooCommerce Product Vendors, MAM WooCommerce Delivery, MAM Reviews Manager, MAM Chat Manager |
| Hooks exposed | mam_submit_order, mam_wc_order_completed, mam_wc_settle_order, mam_pmt_charge_card / mam_pmt_refund_card, mam_wc_is_refund_allowed, get_order_status_triggers / get_wc_status_using_trigger, mam_wc_cancel_order, the mam_wc_user_can_* authorization filters, mam_wc_admin_settings, mam_woocommerce_admin_settings_tabs |
| HPOS | Compatible — declares custom_order_tables compatibility; all order reads/writes use the WooCommerce CRUD layer |
| Last verified | 2026-06-10 |
