Cart and Checkout Validation Functions now run in online store cart
API
Effective August 22, 2023
Cart and Checkout Validation Functions now run on the online store cart (they previously only ran on the storefront cart API). You can now apply custom validation logic to buyers on the online store as well as custom storefronts.
Learn more about Cart and Checkout Validation Functions on Shopify.dev.