I have read about hooks and actions and I know that when we see do_action('some_hook')
it means that somewhere add_action('some_hook', function() {...});
or function some_hook()
exists in a theme's functions.php
.
But what is it?! :
From woocommerce/includes/class-wc-checkout.php line #943:
public function process_checkout() {
try {
/////////////
do_action( 'woocommerce_before_checkout_process' ); <----!!!
if ( WC()->cart->is_empty() ) {
throw new Exception( sprintf( __( 'Sorry, your session has expired. <a href="%s" class="wc-backward">Return to shop</a>', 'woocommerce' ), esc_url( wc_get_page_permalink( 'shop' ) ) ) );
}
do_action( 'woocommerce_checkout_process' ); <-----!!!
I can't find woocommerce_checkout_process
and woocommerce_before_checkout_process
anywhere in files! What do they do?