diff --git a/editor.planx.uk/src/@planx/components/Pay/Public/Pay.tsx b/editor.planx.uk/src/@planx/components/Pay/Public/Pay.tsx index 52565741e0..794f155e75 100644 --- a/editor.planx.uk/src/@planx/components/Pay/Public/Pay.tsx +++ b/editor.planx.uk/src/@planx/components/Pay/Public/Pay.tsx @@ -67,14 +67,14 @@ function Component(props: Props) { state.flowSlug, ]); const fee = props.fn ? Number(passport.data?.[props.fn]) : 0; + const defaultMetadata = [ { key: "source", value: "PlanX" }, { key: "flow", value: flowSlug }, { key: "paidViaInviteToPay", value: "@paidViaInviteToPay" }, ]; - const metadata = props.govPayMetadata?.length - ? props.govPayMetadata - : defaultMetadata; + + const metadata = [...(props.govPayMetadata || []), ...defaultMetadata]; // Handles UI states const reducer = (_state: ComponentState, action: Action): ComponentState => {