Hooks and Filters
PeepSo EDD exposes its own extension points and consumes hooks from both PeepSo and Easy Digital Downloads. Everything below is traced from the plugin source for version 1.5.3.
Extension points provided by this plugin
Section titled “Extension points provided by this plugin”Actions
Section titled “Actions”| Hook | Fired when | Arguments |
|---|---|---|
wbpeddi_peepso_edd_integration_loaded |
The main plugin class finishes constructing. | none |
Filters
Section titled “Filters”| Filter | Purpose | Arguments |
|---|---|---|
wbpeddi_show_tab_on_peepso_profile |
Override whether a profile tab is shown. Return truthy to show, falsy to hide. | $enable, $menu_slug, $links |
wbpeddi_edd_menu_setting_for_peepso_profile |
Add or change the set of EDD tabs managed on the admin settings screen. | $menus (slug => label) |
wbpeddi_purchase_activity_setting_display (option) |
Not a filter but the setting key; see the activity filters below. | n/a |
wbpeddi_filter_purchase_activity_content_parameters |
Add or change the placeholders listed on the activity settings screen. | $parameters (placeholder => description) |
wbpeddi_make_edd_purchase_activity_message |
Filter the final rendered purchase activity message. | $activity_content, $payment_id, $setting_content |
wbpeddi_peepso_edd_integration_plugin_locale |
Filter the locale used to load translations. | $locale, 'peepso-edd' |
Example: hide the checkout tab for a role
Section titled “Example: hide the checkout tab for a role”add_filter( 'wbpeddi_show_tab_on_peepso_profile', function ( $enable, $slug, $links ) { if ( 'edd-checkout' === $slug && ! current_user_can( 'edit_posts' ) ) { return false; } return $enable;}, 10, 3 );Example: add a placeholder to the activity message
Section titled “Example: add a placeholder to the activity message”add_filter( 'wbpeddi_filter_purchase_activity_content_parameters', function ( $parameters ) { $parameters['{store_name}'] = 'Store name'; return $parameters;} );
add_filter( 'wbpeddi_make_edd_purchase_activity_message', function ( $content, $payment_id, $setting ) { return str_replace( '{store_name}', get_bloginfo( 'name' ), $content );}, 10, 3 );PeepSo hooks consumed
Section titled “PeepSo hooks consumed”| Hook | Type | Used for |
|---|---|---|
peepso_navigation_profile |
filter | Adds the EDD Checkout and Purchase History profile tabs. |
peepso_profile_segment_edd-checkout |
action | Renders the checkout segment. |
peepso_profile_segment_edd-purchase-confirmation |
action | Renders the post-purchase receipt segment. |
peepso_profile_segment_edd-purchase-history |
action | Renders the purchase history segment. |
peepso_profile_segment_edd-purchase-details |
action | Renders an individual order receipt segment. |
peepso_profile_preferences |
filter | Adds the per-member “add purchase details in activity” toggle. |
peepso_activity_post_content |
filter | Injects the purchase message into the created activity. |
peepso_activity_post_attachment |
action | Attaches purchased-download oEmbed previews to the activity. |
peepso_admin_config_tabs |
filter | Registers the admin settings tab under PeepSo Configuration. |
peepso_init |
action | Boots the activity settings manager. |
The plugin also relies on PeepSo classes including PeepSoConfigSettings, PeepSoUrlSegments, PeepSoProfileShortcode, PeepSoUser, PeepSoActivity, PeepSoTemplate, and PeepSoConfigSectionAbstract.
EDD hooks consumed
Section titled “EDD hooks consumed”| Hook | Type | Used for |
|---|---|---|
edd_insert_payment |
action | Detects a completed order and posts the purchase activity. |
edd_is_checkout |
filter | Makes the profile checkout segment behave as an EDD checkout page. |
edd_remove_item_url |
filter | Rewrites the cart remove-item URL back to the profile checkout. |
edd_success_page_redirect |
filter | Redirects to the in-profile purchase confirmation after payment. |
edd_get_success_page_uri |
filter | Rewrites order “view details” links to the profile. |
edd_get_checkout_uri |
filter | Keeps the checkout URI on the profile. |
template_redirect |
action | Redirects back to the profile checkout after a cart item is removed. |
paginate_links |
filter | Keeps purchase-history pagination on the profile tab. |
The plugin uses EDD’s [download_checkout], [purchase_history], and [edd_receipt] shortcodes and the EDD_Payment class and edd_currency_filter() helper. It does not register any shortcodes of its own for front-end use.
Settings keys reference
Section titled “Settings keys reference”Stored through PeepSoConfigSettings:
wbpeddi_enable_edd-checkout,wbpeddi_label_edd-checkoutwbpeddi_enable_edd-purchase-history,wbpeddi_label_edd-purchase-historywbpeddi_purchase_activity_setting_displaywbpeddi_purchase_activity_content
Stored as user meta:
peepso_wbpeddi_enable_edd_order_activity(per-member activity opt-in)
Stored as post meta on activity items:
peepso_edd_activity_info(order id and customer id)
Stored as a site option:
wbpeddi_default_values_set(one-time activation backfill guard)

