Filter
rpress_order_status_use_transaction
On this page
Filters whether order status updates use an InnoDB transaction.
Evaluated by rpress_order_status_supports_transactions() once per request. The detected value is true when the posts and postmeta tables both use InnoDB; otherwise false. Return false to save status changes without row locking, or true to force the transactional path.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$supported | bool | Whether both the posts and postmeta tables were detected as InnoDB. |
Return value#
bool. True to wrap the status update in a locked transaction, false to save without one.
Example#
function my_disable_order_status_transaction( $supported ) {
return false;
}
add_filter( 'rpress_order_status_use_transaction', 'my_disable_order_status_transaction' );
Notes#
The result is cast to bool. Forcing true on a non-transactional storage engine means the locking has no real effect. Intended for environments where the engine check is wrong (for example SQLite-based setups).
Source#
Applied in:
includes/admin/orders/actions.php(line 44), inrpress_order_status_supports_transactions()
See also#
Was this page helpful?
