Skip to content

Instantly share code, notes, and snippets.

add_action( 'post_tag_add_form_fields', 'mk_add_term_fields' );
function mk_add_term_fields( $taxonomy ) {
echo '<div class="form-field">
<label for="term-field-key">Text Field</label>
<input type="text" name="term-field-key" id="term-field-key" />
<p>Field description may go here.</p>
</div>';
add_filter( 'woocommerce_add_error', function( $message ) {
if( $message == 'Some message' )
$message = '';
return $message;
});
//Open the plugin files and search for wc_add_notice:. That will get the original message to be changed
if (isset($_SESSION['query']['page'])) {
$taxs = $_SESSION['query']['tax'];
foreach ($taxs as $tax) {
${$tax['taxonomy']} = $tax['terms']; //braces
}
}