Skip to content

BuddyPress Activity

When BuddyPress and its Activity component are active, the addon can post marketplace events to the activity feed. There are three activity types, each controlled by its own setting. All are off by default.

  • BuddyPress must be active.
  • The BuddyPress Activity component must be enabled. Until it is, the three activity settings are shown disabled in the admin, with a notice that the Activity component is required.
  • Setting: Create Product Activity (General sub-tab), stored as product_activity.
  • Trigger: a product moves to the publish status from a non-published status (transition_post_status).
  • Result: an activity entry of type wcfm_product_create reading “added a new product”, linking to the product, attributed to the product author.

The product title in the activity action is filterable through reign_wcfm_format_activity_action_product_create.

  • Setting: Add Review Activity (General sub-tab), stored as review_activity.
  • Trigger: a product review comment is posted or its status changes to approved (comment_post and wp_set_comment_status). The addon listens on both so it also catches reviews released from moderation.
  • Result: an activity entry of type wcfm_product_review reading “wrote a review”, linking to the product. Only logged-in users generate review activity.

On display, the review’s star rating and text are rendered above the activity content.

  • Setting: Order Activity (General sub-tab), stored as order_activity.
  • Trigger: the WooCommerce order-received (thank-you) page loads (woocommerce_thankyou).
  • Result: a “made a purchase” activity entry. Orders whose products are all catalog-hidden are skipped, and each order is only posted once (guarded by the order_activity_id order meta).
  • Display: the purchased products are embedded as a slider of oEmbed previews inside the activity entry. Each product’s oEmbed markup is cached for a day so it is not re-fetched on every render.

The activity type is wcfm_order_create normally. When Youzify is active, the entry is stored as Youzify’s activity_status type and flagged with a marker so the addon can still recognise it as an order. See Third-party integrations.

The addon registers two activity actions with BuddyPress so they appear in activity filters and streams:

  • wcfm_product_create (“Added a product”)
  • wcfm_product_review (“Added a review”)

Order activity is created but not registered as a filterable action.