Filter
rpress_non_trashable_statuses
On this page
Filters the payment statuses for which an order cannot be moved to the trash.
Used by rpress_is_order_trashable(). An order whose payment status is in the returned list is treated as not trashable. The default list contains only trash.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$non_trashable_statuses | array | Array of payment status slugs that cannot be trashed. |
Return value#
array. The list of non-trashable payment status slugs.
Example#
function my_non_trashable_statuses( $statuses ) {
$statuses[] = 'publish';
return $statuses;
}
add_filter( 'rpress_non_trashable_statuses', 'my_non_trashable_statuses' );
Notes#
The comparison is against the payment status (such as publish, pending or refunded), not the order status. For per-order logic use rpress_is_order_trashable.
Source#
Applied in:
includes/admin/orders/actions.php(line 274), inrpress_is_order_trashable()
See also#
Was this page helpful?
