WP Property Drive/docs

4Bids developer reference

Overview

4Bids is an online bidding/offers module for properties. Users register, get approved per property, then can place offers (Private Treaty) or bid in timed auctions. Offers are stored as a custom post type offer; notifications (outbid, watchers, agent) and optional Acquaint CRM sync are supported.

Load order

Entry points

Key data

Flow: placing an offer

  1. Front-end: User (verified for that property) sees bidding UI from get_bidding_container(): latest bid, stepper, history, settings (notify toggle). Script init.js posts to wppd_store_offer (or wppd_store_offer_acquaint_api when Acquaint used).
  2. api-offers.php wppd_store_offer(): Reads JSON (pid, author, amount). Server-side bid floor check: rejects if amount is below max(wppd_price_minimum → wppd_price_reserve → price, highest_bid). Checks no existing non-cancelled offer with same amount for same property. Creates offer post, sets meta. Then: calls wppd_4bids_notify_on_new_offer() (outbid, watchers, agent) and sends a bid-confirmation email to the bidder; applies rollover (extends end time if within interval); returns wp_send_json_success( { message, data: offer_id } ).
  3. wppd_notify_bidders (4bids.php): Separate AJAX action (nonce-protected via check_ajax_referer; also registered for nopriv). Delegates to wppd_4bids_notify_on_new_offer(). Can be called from JS independently (e.g. if the Acquaint path is used and local notifications need to fire separately).

Flow: Acquaint

Core helpers (4bids-functions.php)

AJAX (summary)

Scripts / assets

Integration with rest of plugin