How to limits one Service Item per Sales Order

Get Started

You can use the below code snippet to limit one Service Item per Sales Order.

This snippet restricts the users from purchasing more than one service in a single order and shows a notice on the checkout page stating

“You can only add one service product to the cart.”

Last updated: December 27, 2023