There any way in product discount function to know where the request came from (POS- Online Store)?

Topic summary

Ability to detect sales channel in a Shopify product discount function. The author wants a discount to apply only on the Online Store, but the Product Discount Function also runs in POS (point of sale), causing the discount to be applied there too.

Key need: A way for the function to know the request’s source (Online Store vs POS) to conditionally apply or skip the discount.

Observed behavior: Shopify invokes the product discount function for POS as well, leading to unintended discounting in POS.

Open question: Is there a channel/source identifier or context available in the function to differentiate POS from Online Store?

Status: No answers or solution provided yet; issue remains unresolved.

Summarized with AI on January 4. AI used: gpt-5.

Is there any way in the product discount function to know where the request came from (POS- Online Store)?
I have created a discount for the online store only and I’m calculating the Discount through the Product Discount Function but Shopify also calls the product discount function on POS as well and that discount also applied on POS as well.

Thank you in advance,