Filter
rpress_checkout_update_service_option_response
On this page
Filters the success response after the checkout service option is updated.
Runs in the checkout_update_service_option AJAX handler after the order summary and cart HTML have been rendered. The array holds order_html, cart_html and total_amount (markup for the cart total). The filtered value is sent with wp_send_json_success().
Parameters#
| Parameter | Type | Description |
|---|---|---|
$data | array | Response data with the keys order_html, cart_html and total_amount. |
Return value#
array. The data sent in the JSON success response.
Example#
function my_update_service_option_response( $data ) {
$data['item_count'] = rpress_get_cart_quantity();
return $data;
}
add_filter( 'rpress_checkout_update_service_option_response', 'my_update_service_option_response' );
Source#
Applied in:
includes/class-rpress-ajax.php(line 2155), inRP_AJAX::checkout_update_service_option()
See also#
Was this page helpful?
