I have created a custom taxonomy in Woocommerce and set to appear under Products in the admin. It appears, but Attributes is no longer there. Any ideas?

add_action( 'init', 'ps_custom_taxonomy_cart_incentives');
function ps_custom_taxonomy_cart_incentives()  {
// Labels and Args
$labels = array(
    'name'                          => 'Incentives',
    'singular_name'                 => 'Incentive',
    'menu_name'                     => 'Incentives',
    'all_items'                     => 'All Incentives',
    'parent_item'                   => 'Parent Incentive',
    'parent_item_colon'             => 'Parent Incentive:',
    'new_item_name'                 => 'New Incentive Name',
    'add_new_item'                  => 'Add New Incentive',
    'edit_item'                     => 'Edit Incentive',
    'update_item'                   => 'Update Incentive',
    'separate_items_with_commas'    => 'Separate Incentive with commas',
    'search_items'                  => 'Search Incentives',
    'add_or_remove_items'           => 'Add or remove Incentives',
    'choose_from_most_used'         => 'Choose from the most used Incentives',
);

$args = array(
    'labels'                        => $labels,
    'hierarchical'                  => true,
    'public'                        => true,
    'show_ui'                       => true,
    'show_admin_column'             => true,
    'show_in_admin_bar'             => true,
    'show_in_nav_menus'             => true,
    'menu_position'                 => 10,
    'show_tagcloud'                 => false,
    'supports'                      => array('thumbnail')
);

// Register taxonomy
register_taxonomy( 'cart-incentives', 'product', $args );
register_taxonomy_for_object_type( 'cart-incentives', 'product' );
}

Read more here: Woocommerce custom taxonomy causes attributes to go missing in admin sub menu


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: