Skip to content
Docs
Get RestroPress

Action

rpress_checkout_service_option_updated

Updated
On this page

Fires when the service option is updated from the checkout page.

Fires in the checkout_update_service_option AJAX handler after the nonce check and before the order summary and cart HTML are re-rendered. Use it to recalculate fees or cart state so that the re-rendered summary reflects the change. No arguments are passed; read the new selection from the request or cookie.

Example#

function my_service_option_updated() {
	RPRESS()->fees->remove_fee( 'delivery_fee' );
}
add_action( 'rpress_checkout_service_option_updated', 'my_service_option_updated', 10, 0 );

Source#

Fired from:

  • includes/class-rpress-ajax.php (line 2143), in RP_AJAX::checkout_update_service_option()

See also#

Was this page helpful?