woocommerce_api_request

woocommerce_api_request

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action
See hook in action

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

do_action('woocommerce_api_request') is found 1 times:

  • /includes/class-wc-api.php line 155
    			// Make sure gateways are available for request.
    			WC()->payment_gateways();
    
    			// Trigger generic action before request hook.
    			do_action( 'woocommerce_api_request', $api_request );
    
    			// Is there actually something hooked into this API request? If not trigger 400 - Bad request.
    			status_header( has_action( 'woocommerce_api_' . $api_request ) ? 200 : 400 );
    
    			// Trigger an action which plugins can hook into to fulfill the request.
    			do_action( 'woocommerce_api_' . $api_request );
    

See this hook used in plugins: