Hooks: mam_wc_delivery_store_post_parent and mam_wc_delivery_image_sizer_url

Setting first, filter second

Both values are configurable without code on Mobile App Manager → WooCommerce Settings → Delivery. The filter is applied on top of the setting, so code overrides always win:

Value Setting (option key) Setting default Filter
Store-location parent post Store Location Parent Post ID (tsl-setting-deliver_store_post_parent) 137 (legacy; fail-safes to 0) mam_wc_delivery_store_post_parent
Image-sizer URL prefix Large Image Resizer URL Prefix (tsl-setting-deliver_image_sizer_url) the TSL hosted sizer URL mam_wc_delivery_image_sizer_url

A blank/unset setting keeps the default shown above.


mam_wc_delivery_store_post_parent

Signature

apply_filters( 'mam_wc_delivery_store_post_parent', int $parent_id );
Parameter Type Description
$parent_id int The configured parent post ID (the setting value; 137 when unset). Return the parent ID to use, or 0 for no parent.

What it does

When a store/location is added from the app’s map form (WC Delivery Location Map → Add), the new mam-cpt-main post is created as a child of this post. The default 137 is the parent from the original deployment; if the resolved parent post does not exist on the current site, the plugin fail-safes to 0 (no parent) after the filter runs. Note the map list only shows posts with a non-zero parent, so pick a real parent post on sites that use the map.

add_filter( 'mam_wc_delivery_store_post_parent', function ( $parent_id ) {
    return 421; // this site's "Stores" container post
} );

mam_wc_delivery_image_sizer_url

Signature

apply_filters( 'mam_wc_delivery_image_sizer_url', string $sizer_url );
Parameter Type Description
$sizer_url string The configured URL prefix (the setting value, or the historic TSL sizer when unset). Return the prefix to use, or '' to disable resizing.

What it does

In the WC Delivery Location Map list, a location’s featured image larger than 800px in either dimension (png/jpg/jpeg) has its URL rewritten to <sizer_url><original image URL> so the app downloads a downscaled copy. White-label sites should point this at their own resizing endpoint via the setting, or disable it:

// Disable remote resizing entirely; serve originals.
add_filter( 'mam_wc_delivery_image_sizer_url', '__return_empty_string' );

  • Recipe: Configure delivery areas
  • Plugin: mam-woocommerce-delivery

Metadata

Field Value
Article type Hook Reference
Plugin slug mam-woocommerce-delivery
Applies to plugin version 1.4.1+
Category Extending MAM Suite
Hook type filter (both)
Audience PHP developer
Last verified 2026-06-10
Contents

    Need Support?

    Can't find the answer you're looking for? Don't worry we're here to help!