A new state law has officially come into force, ending a practice that has long frustrated diners.