Support » Plugin: WooCommerce » What´s wrong with my code?

  • Hi, I am not sure what´s wrong with my code, can you help me please?

    function payment_gateway_disable_country( $available_gateways, $available_methods )
    {
        global $woocommerce;
        if ( isset( $available_methods['local_delivery'] ) ){
            unset( $available_gateways['paypal'] );
        }
        return $available_gateways;
    }
    add_filter( 'woocommerce_available_payment_gateways', 'payment_gateway_disable_country' );

    https://wordpress.org/plugins/woocommerce/

  • The topic ‘What´s wrong with my code?’ is closed to new replies.