I want to disable Cash on delivery based on product tag in woocommerce Checkout Page

add_filter( ‘woocommerce_available_payment_gateways’, ‘cod_enable_manager’ );

function cod_enable_manager( $available_gateways ) {
if ( isset( $available_gateways[‘cod’] ) &&( is_product_tag( ‘Overseas’ ) )) {
unset( $available_gateways[‘cod’] );
}
return $available_gateways;
}

Read more here:: I want to disable Cash on delivery based on product tag in woocommerce Checkout Page

Leave a Reply

Your email address will not be published. Required fields are marked *