I am just wondering what would be the if statement if I would like to remove validation from the checkout form when the user picked paypal as a payment option?
I know I can use something like
function not_required_fields( $f ) {
unset( $f['billing']['billing_first_name']['required'] ); // that's it
unset( $f['billing']['billing_phone']['required'] );
return $f;
}
but I would need to know the if statement before such as
if(payment_method == PayPal)
{
above code here
}
The only thing is that I have no idea how I would write it in woocommerce