woocommerce_order_edit_status

woocommerce_order_edit_status

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

See hook in core

Displaying hooks found in version: woocommerce.9.3.3

do_action('woocommerce_order_edit_status') is found 4 times:

  • /includes/admin/list-tables/class-wc-admin-list-table-orders.php line 478
     
    				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 586
    				// 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 297
    				'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
    				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;
    	}