Action
rpress_sales_summary_widget_after_purchases
On this page
Fires at the end of the Sales Summary dashboard widget after the recent orders table.
Runs after the recent orders table, which is only printed when there are orders. The argument is the array of the five latest published orders returned by RPRESS_Payments_Query::get_payments(). It may be empty.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$payments | array | Latest published orders (payment objects), up to five. Can be empty. |
Example#
function my_sales_widget_after_purchases( $payments ) {
echo '<p>' . esc_html( sprintf( 'Showing %d recent orders', count( (array) $payments ) ) ) . '</p>';
}
add_action( 'rpress_sales_summary_widget_after_purchases', 'my_sales_widget_after_purchases', 10, 1 );
Source#
Fired from:
includes/admin/dashboard-widgets.php(line 189), inrpress_load_dashboard_sales_widget()
See also#
Was this page helpful?
