@commercelayer/react-components
Version:
The Official Commerce Layer React Components
8 lines (7 loc) • 428 B
TypeScript
import type { Order } from '@commercelayer/sdk';
/**
* Check if a given `order` has subscriptions by checking the `frequency` attribute of the `line_items` (in case of brand new `order_subscription`) or the `subscription_created_at` attribute of the `order` itself (in case `order_subscription` is already existing)
* @param order Order
* @returns boolean
*/
export declare function hasSubscriptions(order: Order): boolean;