A proposed ban on vaping and smoking in pub gardens will not go ahead, the health secretary has confirmed.