WooCommerce - hide payment gateway
How I can hide a payment-gateway plugin for specific customer on WooCommerce , for example if the customer's first name is : Peter , the plugin will not show for him. eg: Woocommerce hide payment gateway for user roles I hope this will work for you , if any problem persist please let me know. function woo_disable_cod( $available_gateways ) { $current_user = wp_get_current_user(); //check whether the avaiable payment gateways have Cash on delivery and user is not logged in or he is a user with role customer if ( isset($available_gateways['cod']) && ((current_user_can('customer') && $current