Restrict payment gateways based on taxonomy terms in WooCommerce checkout
In my WooCommerce store I want to restrict and show payment gateway(cheque) only if the product has particular product category with the category ID "266". Now I have this snippet but it does the opposite - it disabled the gateway…