Product conditions
if ( ! function_exists( 'conditions_treated' ) ) {
// Register Custom Taxonomy
function conditions_treated() {
$labels = array(
'name' => 'Conditions',
'singular_name' => 'Condition',
'menu_name' => 'Conditions',
'all_items' => 'All Conditions',
'parent_item' => 'Parent Condition',
'parent_item_colon' => 'Parent Condition:',
'new_item_name' => 'New Condition Name',
'add_new_item' => 'Add New Condition',
'edit_item' => 'Edit Condition',
'update_item' => 'Update Condition',
'view_item' => 'View Condition',
'separate_items_with_commas' => 'Separate conditions with commas',
'add_or_remove_items' => 'Add or remove conditions',
'choose_from_most_used' => 'Choose from the most used',
'popular_items' => 'Popular Conditions',
'search_items' => 'Search Conditions',
'not_found' => 'Not Found',
'no_terms' => 'No items',
'items_list' => 'Conditions list',
'items_list_navigation' => 'Conditions list navigation',
);
$rewrite = array(
'slug' => 'conditions',
'with_front' => true,
'hierarchical' => false,
);
$args = array(
'labels' => $labels,
'hierarchical' => false,
'public' => true,
'show_ui' => true,
'show_admin_column' => true,
'show_in_nav_menus' => true,
'show_tagcloud' => false,
'rewrite' => $rewrite,
'show_in_rest' => false,
);
register_taxonomy( 'conditions_treated', array( 'product' ), $args );
}
add_action( 'init', 'conditions_treated', 0 );
}