Action
rpress_pre_process_purchase
Fires at the very start of checkout form processing.
Runs at the top of rpress_process_purchase_form(), before the checkout nonce is verified and before any validation. The function is hooked to the rpress_purchase action and to the wp_ajax_rpress_process_checkout and wp_ajax_nopriv_rpress_process_checkout AJAX actions, so this hook fires for the AJAX validation request and for the final form submission.
Example#
add_action( 'rpress_pre_process_purchase', 'my_prepare_checkout' );
function my_prepare_checkout() {
if ( ! rpress_get_cart_contents() ) {
return;
}
delete_transient( 'my_checkout_cache' );
}
Source#
Fired from:
includes/process-purchase.php(line 61), inrpress_process_purchase_form()
See also#
Was this page helpful?
