woocommerce_new_order, $order->get_id(
woocommerce_new_order, $order->get_id(
Appears in: woocommerce.11.0.0
Hook Type: action
Displaying hooks found in version: woocommerce.11.0.0do_action('woocommerce_new_order, $order->get_id(') is found 4 times:
- /includes/data-stores/class-wc-order-data-store-cpt.php line 117
if ( in_array( $order->get_status( 'edit' ), array( OrderStatus::AUTO_DRAFT, OrderStatus::DRAFT, 'checkout-draft' ), true ) ) { return; } do_action( 'woocommerce_new_order', $order->get_id(), $order ); } /** * Read order data. Can be overridden by child classes to load other props. * * @param WC_Order $order Order object. - /includes/data-stores/class-wc-order-data-store-cpt.php line 240
$current_status !== $previous_status && ! in_array( $current_status, $draft_statuses, true ) && in_array( $previous_status, $draft_statuses, true ) ) { 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 } - /src/Internal/DataStores/Orders/OrdersTableDataStore.php line 2990
* * @param int Order ID. * @param \WC_Order Order object. */ do_action( 'woocommerce_new_order', $order->get_id(), $order ); } /** * Helper method responsible for persisting new data to order table. * * This should not contain and specific meta or actions, so that it can be used other order types safely.
- /src/Internal/DataStores/Orders/OrdersTableDataStore.php line 3088
&& $changes['status'] !== $previous_status && ! in_array( $changes['status'], $draft_statuses, true ) && in_array( $previous_status, $draft_statuses, true ) ) { do_action( 'woocommerce_new_order', $order->get_id(), $order ); // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment return; } // For backwards compat with CPT, trashing/untrashing and changing previously datastore-level props does not trigger the update hook. if ( ( ! empty( $changes['status'] ) && in_array( 'trash', array( $changes['status'], $previous_status ), true ) ) || ( ! empty( $changes ) && ! array_diff_key( $changes, array_flip( $this->get_post_data_store_for_backfill()->get_internal_data_store_key_getters() ) ) ) ) {