[Solved] Woocommerce: disable payment method with cost on delivery


A good way how to do this is through jQuery. Put inside the of your document the following

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>

Then find the file where the checkout page is setup and enter the following:

$(document).ready(function() {
    if ($('input[name=your_radio_name]:checked').val() == "the value when the element should be hidden") {
        $('#id_of_the_element_that_should_be_hidden').hide();
    });
}); 

2

solved Woocommerce: disable payment method with cost on delivery