ID ); $post_type = $the_order->post_type; if ( $order_type = wc_get_order_type( $post_type ) ) { $classname = $order_type['class_name']; } else { $classname = false; } // Filter classname so that the class can be overridden if extended. $classname = apply_filters( 'woocommerce_order_class', $classname, $post_type, $order_id, $the_order ); if ( ! class_exists( $classname ) ) { return false; } return new $classname( $the_order ); } }