woocommerce_order_edit_status

woocommerce_order_edit_status

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: action

See hook in core

Displaying hooks found in version: woocommerce.9.8.1

do_action('woocommerce_order_edit_status') is found 4 times:

  • /includes/admin/list-tables/class-wc-admin-list-table-orders.php line 479
    476
    477
    478
    479
    480
    481
    482
    483
    484
    485
            foreach ( $ids as $id ) {
                $order = wc_get_order( $id );
                $order->update_status( $new_status, __( 'Order status changed by bulk edit:', 'woocommerce' ), true );
                do_action( 'woocommerce_order_edit_status', $id, $new_status );
                $changed++;
            }
        }
    }
     
    if ( $changed ) {
  • /includes/class-wc-ajax.php line 590
    586
    587
    588
    589
    590
    591
    592
    593
    594
    595
    596
                // Initialize payment gateways in case order has hooked status transition actions.
                WC()->payment_gateways();
     
                $order->update_status( $status, '', true );
                do_action( 'woocommerce_order_edit_status', $order->get_id(), $status );
            }
        }
     
        wp_safe_redirect( wp_get_referer() ? wp_get_referer() : admin_url( 'edit.php?post_type=shop_order' ) );
        exit;
    }
  • /includes/class-wc-order.php line 316
    312
    313
    314
    315
    316
    317
    318
    319
    320
    321
            'manual' => (bool) $manual_update,
        );
     
        if ( $manual_update ) {
            do_action( 'woocommerce_order_edit_status', $this->get_id(), $result['to'] );
        }
     
        $this->maybe_set_date_paid();
        $this->maybe_set_date_completed();
    }
  • /src/Internal/Admin/Orders/ListTable.php line 1444
    1440
    1441
    1442
    1443
    1444
    1445
    1446
    1447
    1448
    1449
                continue;
            }
     
            $order->update_status( $new_status, __( 'Order status changed by bulk edit.', 'woocommerce' ), true );
            do_action( 'woocommerce_order_edit_status', $id, $new_status ); // phpcs:ignore WooCommerce.Commenting.CommentHooks.MissingHookComment
            ++$changed;
        }
     
        return $changed;
    }