Please explain how this hook works?

Ok, I read aboot hooks and actions and I know that when we see do_action(‘some_hook’) it means that somewhere exists add_action(‘some_hook’, function() {…}); or function some_hook() in theme/functions.php

But what is it?! :

woocommerce/includes/class-wc-checkout.php #943 line
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?

Read more here:: Please explain how this hook works?

Leave a Reply

Your email address will not be published. Required fields are marked *