Conditionally unset checkout field in woocommerce
问题 How can I conditionally unset the other two fields from server side and remove the required validation from it? Here is how the form looks like: Here is the code: function bs_filter_checkout_fields($fields){ $fields['billing'] = array( 'add_type' => array( 'type' => 'radio', 'label' => __( 'Address Type' ), 'options' => array( 'house' => __( 'House' ), 'building' => __( 'Building' ), 'office' => __( 'Office' ) ), 'required' => true ), 'add_house_name' => array( 'type' => 'text', 'required' =>