I have a client requirements to hide 'billing section' of wrodpress checkout page when choose 'bitpay payment method' since bitpay doesn't demand the billing section. I tried lot but as the payment methods come through API, I couldn't hook the id/selector of radio button. I don't know how to sort it out. Expert's please pay ur kind attention.
code stuffs :
html:
<div class="woocommerce-billing-fields">
.....
</div>
<li class="payment_method_bitpay">
<input id="payment_method_bitpay" class="input-radio" name="payment_method" value="bitpay" checked="checked" data-order_button_text="Proceed to BitPay" type="radio">
<label for="payment_method_bitpay">
Bitcoin <img src="http://localhost/wp/wp-content/plugins/bitpay-for-woocommerce/assets/img/icon.png" alt="Bitcoin"> </label>
<div class="payment_box payment_method_bitpay">
<p>You will be redirected to bitpay.com to complete your purchase.</p>
</div>
</li>
js:
jQuery(document).ready(function($){
$('#payment_method_bitpay').on('click',function(){
$('.woocommerce-billing-fields').hide();
})
})