register_taxonomy( 'taxonomy', array( 'post', 'coupons' ), $args );
https://generatewp.com/taxonomy/ can help you.
// new code taxonomias
function clrp_taxonomy_post(){
global $wpdb, $app_abbr; //need $wpdb!!
if(get_option($app_abbr.'_coupon_store_tax_permalink')) $store_tax_base_url = get_option($app_abbr.'_coupon_store_tax_permalink'); else $store_tax_base_url="store";
register_taxonomy( APP_TAX_STORE, // taxonomy stores
array( APP_POST_TYPE_POST, APP_POST_TYPE ), // type POST + APP_POST_TYPE
array( 'hierarchical' => true,
'labels' => array(
'name' => __( 'Stores', 'appthemes'),
'singular_name' => __( 'Store', 'appthemes'),
'search_items' => __( 'Search Stores', 'appthemes'),
'all_items' => __( 'All Stores', 'appthemes'),
'edit_item' => __( 'Edit Store', 'appthemes'),
'update_item' => __( 'Update Store', 'appthemes'),
'add_new_item' => __( 'Add New Store', 'appthemes'),
'add_or_remove_items' => __( 'Add or remove Stores', 'appthemes'),
'separate_items_with_commas' => __( 'Separate Stores with commas', 'appthemes'),
'choose_from_most_used' => __( 'Choose from the most common Stores', 'appthemes'),
'new_item_name' => __( 'New Store Name', 'appthemes')
),
'show_ui' => true,
'query_var' => true,
'update_count_callback' => '_update_post_term_count',
'rewrite' => array( 'slug' => $store_tax_base_url, 'with_front' => false, 'hierarchical' => true ),
)
);
}
add_action('init', 'clrp_taxonomy_post', 0);