woocommerce_store_api_checkout_order_processed хук-событиеWC 1.0

Fires before an order is processed by the Checkout Block/Store API.

This hook informs extensions that $order has completed processing and is ready for payment.

This is similar to existing core hook woocommerce_checkout_order_processed. We're using a new action:

  • To keep the interface focused (only pass $order, not passing request data).
  • This also explicitly indicates these orders are from checkout block/StoreAPI.


add_action( 'woocommerce_store_api_checkout_order_processed', 'wp_kama_woocommerce_store_api_checkout_order_processed_action' );

 * Function for `woocommerce_store_api_checkout_order_processed` action-hook.
 * @param \WC_Order $order Order object.
 * @return void
function wp_kama_woocommerce_store_api_checkout_order_processed_action( $order ){

	// action...
Order object.

Где вызывается хук

woocommerce/packages/woocommerce-blocks/src/StoreApi/Routes/V1/Checkout.php 226
do_action( 'woocommerce_store_api_checkout_order_processed', $this->order );

Где используется хук в WooCommerce

Использование не найдено.