Action
rpress_live_orders_card_after_payment
On this page
Fires inside a Live Orders card, below the payment row.
Runs once for each order card rendered on the Live Orders board, after the payment row. Use it to echo extra card content such as courier status. Output is printed directly, so escape it yourself.
Available since RestroPress 3.5.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$payment_id | int | Order ID. |
$order_status | string | Order status key. |
$service_filter_type | string | Normalised service type, for example 'delivery', 'pickup' or 'dinein'. |
Example#
add_action( 'rpress_live_orders_card_after_payment', 'my_live_card_courier', 10, 3 );
function my_live_card_courier( $payment_id, $order_status, $service_filter_type ) {
if ( 'delivery' !== $service_filter_type ) {
return;
}
$courier = get_post_meta( $payment_id, '_my_courier_status', true );
if ( $courier ) {
echo '<p class="my-courier">' . esc_html( $courier ) . '</p>';
}
}
Source#
Fired from:
includes/admin/payments/class-live-orders.php(line 651), inRP_Live_Orders::render_card()
See also#
Was this page helpful?
