Goal
mam-geodirectory adds five MAM-specific fields to every GeoDirectory pricing package. They control how many push notifications a listing on that package can send each month, how many listings the buyer can own, how many special offers (deals) the listing can publish, how many staff seats are available, and whether the in-app chat is offered.
This recipe walks through where to set them and how each is consumed.
Prerequisites
- WordPress admin with
manage_options. - GeoDirectory and GeoDir Pricing Manager installed and active.
- At least one pricing package defined under GeoDirectory → Pricing Packages.
mam-geodirectoryactivated.
Where to find the fields
Open any package under GeoDirectory → Pricing Packages → {Package} → Edit. Scroll to Additional Settings — the section is appended by Hook: geodir_pricing_package_settings in mam_gd_package_settings.
The five fields
| Field | Meta key on the package | Type | Consumed by |
|---|---|---|---|
| Number of Push Notifications per month | pn_per_month |
integer (≥ 0) | mam_app_settings_tab_bar_button_send_notifications — the Send Notification tab bar button is suppressed once pn_sent_{YYYY_MM} on the listing exceeds this value. Default fallback when missing: 10. |
| Number of Listings included | no_of_listings_included |
integer (≥ 0) | Reserved — read by external code; not enforced by this plugin’s runtime. |
| Number of Special Offers included | no_of_deals_included |
integer (≥ 0) | mam_special_offers_deals_allowed filter — caps how many offers the Edit Deals tab bar button (mam-special-offers) will surface. Empty string falls back to the special-offers plugin default. |
| Chat With Venue | chat_with_venue |
checkbox ('1'/'0') |
local_app_geodirectory::add_chat() — when off, the chat tab is suppressed for listings on this package even if mam-chat-manager is active. |
| Number of Staff Members | no_of_staff_members |
integer (≥ 0) | mam_app_settings_tab_bar_button_edit_staff — the Add Staff Member option is hidden in the Edit Staff form once the listing’s accepted staff count reaches this number. Default fallback when missing: 5. |
All five are persisted via Hook: geodir_pricing_process_data_for_save and stored on the GeoDirectory package using geodir_pricing_get_meta().
Steps
- Open the package edit screen.
- Scroll to Additional Settings.
- Fill in the five fields.
- Save the package.
If a field is left blank, integer fields are saved as 0 (which means “the cap will silently zero out the related feature on listings under this package”). If you want unlimited push notifications or staff seats, leave the option missing entirely (do not set it) — runtime falls back to 10 PNs/month and 5 staff seats. To do that programmatically, write the package without meta[pn_per_month] instead of with 0.
Verification
- Buy or assign the package to a test listing.
- Confirm the Send Notification button stops appearing after
pn_per_monthnotifications have been sent in the same calendar month (the counter resets on the first day of the next month). - Confirm the Edit Staff button no longer offers the “Add Staff Member” entry once
no_of_staff_membersaccepted staff/managers exist. - Confirm the chat tab disappears when Chat With Venue is unchecked on the package.
Verification
This article was last verified against:
- Plugin:
mam-geodirectoryv2.1.5 - Source:
includes/mam_gd_package_settings.php - Source:
includes/mam_gd_tab_bar_buttons.php(consumers)
Re-verify whenever the field list in mam_gd_package_settings::$fields changes, the package-meta consumers in mam_gd_tab_bar_buttons change their fallback values, or local_app_geodirectory::add_chat() changes its package gating.
Related articles
- Plugin: mam-geodirectory
- Recipe: Configure the GeoDirectory settings page
- Listing tab bar buttons
- Integration: Special Offers
- Integration: Chat Manager
Metadata
| Field | Value |
|---|---|
| Article type | Recipe (Admin) |
| Plugin slug | mam-geodirectory |
| Applies to plugin version | 2.1.5+ |
| Category | Building Your App |
| Audience | WordPress admin |
| Estimated time | 5 minutes |
| Last verified | 2026-05-01 |
