Here’s the code for reference
function cptui_register_my_taxes() {
/**
* Taxonomy: Country of origins.
*/
$labels = [
"name" => __( "Country of origins", "martfury" ),
"singular_name" => __( "Country of origin", "martfury" ),
];
$args = [
"label" => __( "Country of origins", "martfury" ),
"labels" => $labels,
"public" => true,
"publicly_queryable" => true,
"hierarchical" => true,
"show_ui" => true,
"show_in_menu" => true,
"show_in_nav_menus" => true,
"query_var" => true,
"rewrite" => [ 'slug' => 'country_of_origin', 'with_front' => true, ],
"show_admin_column" => true,
"show_in_rest" => true,
"show_tagcloud" => true,
"rest_base" => "Country",
"rest_controller_class" => "WP_REST_Terms_Controller",
"show_in_quick_edit" => true,
"show_in_graphql" => false,
"meta_box_cb" => "country_of_origin",
];
register_taxonomy( "country_of_origin", [ "product" ], $args );
}
add_action( 'init', 'cptui_register_my_taxes' );
The two parts that stand out the most, and are things that cause some extra consideration from the user are the custom-set “rest base” as well as that “meta_box_cb” value.
Is the rest base value and the meta box callback values being explicitly used by you? or did they just feel like they needed to be filled in?