Skip to content

Instantly share code, notes, and snippets.

@plugin-republic
Last active September 9, 2021 06:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save plugin-republic/0246100836aebf1fa14cc26603e522ce to your computer and use it in GitHub Desktop.
Save plugin-republic/0246100836aebf1fa14cc26603e522ce to your computer and use it in GitHub Desktop.
<?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' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment