Filter
rpress_account_hub_reorder_result
On this page
Filters the result of adding a past order's items back to the cart.
Runs at the end of rpress_account_hub_reorder(), after the lines have been added. The result lists the names of lines added, skipped, and added without some add-ons, plus the cart keys that were created.
Parameters#
| Parameter | Type | Description |
|---|---|---|
$result | array | Array with 'added', 'skipped' and 'changed' (line names) and 'keys' (cart keys). |
$order_id | int | Payment ID of the order being reordered. |
Return value#
array. The result array.
Example#
add_filter( 'rpress_account_hub_reorder_result', 'my_reorder_result', 10, 2 );
function my_reorder_result( $result, $order_id ) {
if ( ! empty( $result['skipped'] ) ) {
update_post_meta( $order_id, '_my_reorder_skipped', $result['skipped'] );
}
return $result;
}
Source#
Applied in:
includes/features/account-hub/reorder.php(line 183), inrpress_account_hub_reorder()
See also#
Was this page helpful?
