Skip to content

Purchase Activity

When a member completes an EDD payment, PeepSo EDD can post an activity item to the PeepSo stream announcing the purchase. The message is built from a template that the site owner defines.

The activity feature is only wired up when the owner-level setting wbpeddi_purchase_activity_setting_display is enabled. When it is, the plugin listens to EDD’s edd_insert_payment action. On each new payment:

  • The buyer’s own per-member preference is checked (peepso_wbpeddi_enable_edd_order_activity). If the member has turned purchase activity off, no activity is posted.
  • If allowed, a PeepSo activity post is created on behalf of the buyer with the rendered message, and the order details are stored on the activity as post meta (peepso_edd_activity_info).

The message comes from the wbpeddi_purchase_activity_content setting. The default is:

{user_name} purchased {product_list}

Supported placeholders:

Placeholder Replaced with
{user_name} The buyer’s name, linked to their PeepSo profile.
{product_list} Comma-separated list of purchased downloads, each linked to its product page.
{order_total} The order total, formatted with EDD’s currency filter.
{order_date} The order creation date.

The placeholder set can be extended with the wbpeddi_filter_purchase_activity_content_parameters filter, and the final rendered message can be filtered with wbpeddi_make_edd_purchase_activity_message (see Hooks and filters).

The plugin also hooks PeepSo’s peepso_activity_post_attachment action to attach the purchased downloads to the activity item as oEmbed previews, so each bought download is shown beneath the activity text.