WordPress – Limit purchases to items having the same product attribute in WooCommerce
I am using the code snippet below to limit the purchase of one unique WooCommerce product per order, because of logistic reasons (multiple warehouses). I use an attribute to specify the warehouse and it would be convenient to allow customers…