WC_Order_Factory::get_class_name_for_order_id()private staticWC 6.9.0

Gets the class name an order instance should have based on its ID.

Method of the class: WC_Order_Factory{}

No Hooks.

Return

String. The class name or FALSE if the class does not exist.

Usage

$result = WC_Order_Factory::get_class_name_for_order_id( $order_id );
$order_id(int) (required)
The order ID.

Changelog

Since 6.9.0 Introduced.

WC_Order_Factory::get_class_name_for_order_id() code WC 8.6.1

private static function get_class_name_for_order_id( $order_id ) {
	$classname = self::get_class_names_for_order_ids( array( $order_id ) );
	return $classname[ $order_id ] ?? false;
}