If you’d like to add some fields to the quote request form, you can modify this snippet:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Add extra fields to quote form | |
*/ | |
function prefix_add_quote_fields( $fields ) { | |
$fields['province'] = array( // Update the key here | |
'type' => 'text', // This will add a text field | |
'label' => 'Province', // Update the label here | |
'required' => true, // Set whether this field is required | |
'placeholder' => 'Province', // Update the placeholder text here | |
); | |
return $fields; | |
} | |
add_filter( 'wcraq_quote_fields', 'prefix_add_quote_fields' ); |
Here’s how to add the snippet.