woocommerce_update_order

woocommerce_update_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_update_order') is found 2 times:

  • /includes/data-stores/class-wc-order-data-store-cpt.php line 233
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
            do_action( 'woocommerce_new_order', $order->get_id(), $order );  // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment
            return;
        }
     
        do_action( 'woocommerce_update_order', $order->get_id(), $order );  // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment
    }
     
    /**
     * Helper method that updates all the post meta for an order based on its settings in the WC_Order class.
     *
     * @param WC_Order $order Order object.
  • /src/Internal/DataStores/Orders/OrdersTableDataStore.php line 2848
    2844
    2845
    2846
    2847
    2848
    2849
    2850
    2851
    2852
    2853
    2854
            || ( ! empty( $changes ) && ! array_diff_key( $changes, array_flip( $this->get_post_data_store_for_backfill()->get_internal_data_store_key_getters() ) ) ) ) {
            return;
        }
     
        do_action( 'woocommerce_update_order', $order->get_id(), $order ); // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment
    }
     
    /**
     * Proxy to updating order meta. Here for backward compatibility reasons.
     *
     * @param \WC_Order $order Order object.

See this hook used in plugins: