Divi WordPress Theme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

WordPress fix Disable Payment

Discussion in 'Misc WordPress Requests' started by kklo, Dec 28, 2017.

  1. kklo


    Disable Payment, by kklo


    I am trying to Disable Payment by User Type in WooCommerce and found on the internet this code:

    function cwp_cash_delivery_disable_cliente( $available_gateways ) {
    global $woocommerce;

    if ( isset( $available_gateways['paypal'] ) && current_user_can('Cliente') ) {
    unset( $available_gateways['paypal'] );

    return $available_gateways;
    add_filter( 'woocommerce_available_payment_gateways', 'cwp_cash_delivery_disable_cliente' );

    but it’s not working.

    Can someone help me?


    Disable Payment

Share This Page

Monarch Social Sharing Plugin