Remove all fields for payment form
-
Hi for example I want to remove all fields in ‘bank transfer’ like this:
add_filter( "adverts_form_load", function($form){ if( $form['name'] !== "adverts-bank-transfer" ) { return $form; } //remove 'adverts_person' foreach( $form["field"] as $key => $field ) { if( in_array($field["name"], array( "adverts_person" ) ) ) { unset($form["field"][$key]); } } //remove 'adverts_email' foreach( $form["field"] as $key => $field ) { if( in_array($field["name"], array( "adverts_email" ) ) ) { unset($form["field"][$key]); } } return $form; } );It remove all fields. But it seems doesnt work, nothing happens after i click ‘place order’.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Remove all fields for payment form’ is closed to new replies.