Allows developers to modify the list of actions shown on the single order view page in the WordPress admin for Paid Memberships Pro.
apply_filters( 'pmpro_order_view_actions', $order_actions, $order );
Use this filter to add, remove, or change the admin action buttons displayed for a specific order. You can hook into external systems, add custom workflows, or tailor labels/URLs/permissions based on the current order’s status, payment method, or other properties.
Each action is an associative array keyed by a unique slug (e.g. 'edit'
, 'refund'
) with the following supported keys:
title
: string; Thetitle
attribute for the link (tooltip text).href
: string; The link target. May be a URL or a JavaScript call (e.g. a ThickBox or confirmation dialog).target
: string; Optional. Sets the link’starget
(e.g._blank
).class
: string; Space-separated CSS class list for styling and icons.label
: string; The visible button text.data-order
: string|int; Optional. Data attribute used by certain UI behaviors (e.g. sending email via ThickBox).
Parameters
- $order_actions
- array; The associative array of action definitions to render for the current order.
- $order
MemberOrder
object; The Paid Memberships Pro order object being viewed.
Source
File: https://github.com/strangerstudios/paid-memberships-pro/blob/master/adminpages/orders/view-order.php
View in Source CodeAbout Actions and Filters in PMPro
Hooks allow you to extend Paid Memberships Pro without editing any core plugin files. You can use a hook to program custom code that interacts with or modifies code in our plugin, Add Ons, your theme, and even WordPress itself.
There are two kinds of hooks: actions and filters.
- Action hooks allow you to run new custom code at pre-defined locations.
- Filter hooks allow you to change or extend existing code by modifying the data and returning it back to the software.
Click here to browse the full database of action and filter hooks available in Paid Memberships Pro. For help extending our Add Ons, refer to the individual Add On's documentation page for a list of available hooks.
For more developer-focused information about Paid Memberships Pro, check out the advanced developer topics documentation.