woocommerce_create_order

woocommerce_create_order

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

See hook in core

Displaying hooks found in version: woocommerce.9.8.1

do_action('woocommerce_create_order') is found 1 times:

  • /includes/class-wc-checkout.php line 384
    380
    381
    382
    383
    384
    385
    386
    387
    388
    389
    390
    *
     * @param int|null    $order_id Can be set to an order ID to short-circuit the default order creation process.
     * @param WC_Checkout $checkout Reference to the current WC_Checkout instance.
     */
    $order_id = apply_filters( 'woocommerce_create_order', null, $this );
    if ( $order_id ) {
        return $order_id;
    }
     
    try {
        $order_id           = absint( WC()->session->get( 'order_awaiting_payment' ) );

See this hook used in plugins: