WC_Order_Factory::get_class_name_for_order_id
Gets the class name an order instance should have based on its ID.
Method of the class: WC_Order_Factory{}
No Hooks.
Returns
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() WC Order Factory::get class name for order id code WC 10.5.0
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;
}