These 2 code snippets force your customers to add at least 1 item from a specific category before items from other categories can be added to the cart. If no items from your allowed category are added first, then items from other categories cannot be added.
Is Purchasable On Specific Date
Additionally, the 2nd code snippet also enables you to add a specific date so your customers are forced on this specific date to purchase at least 1 product from a specific category before they can buy products from other categories. On all other dates, they can purchase products from any categories without restrictions.
Copy & paste 1 of the 2 code snippets to the end of your child themes functions file or custom functionality plugin.
Swap out the allowed-category slug with the category slug for your specific category.
If using the date specific code, swap out the date as well so the code only runs on a specific date.