I created a custom taxonomy in my product for woocommerce.

Like this:


function custom_taxonomy_Item()  {
$labels = array(
    'name'                       => 'Aplicações',
    'singular_name'              => 'Aplicação',
    'menu_name'                  => 'Aplicação',
    'all_items'                  => 'All Items',
    'parent_item'                => 'Parent Item',
    'parent_item_colon'          => 'Parent Item:',
    'new_item_name'              => 'New Item Name',
    'add_new_item'               => 'Adicionar nova Aplicação',
    'edit_item'                  => 'Edit Item',
    'update_item'                => 'Update Item',
    'separate_items_with_commas' => 'Separate Item with commas',
    'search_items'               => 'Search Items',
    'add_or_remove_items'        => 'Add or remove Items',
    'choose_from_most_used'      => 'Choose from the most used Items',
);
$args = array(
    'labels'                     => $labels,
    'hierarchical'               => true,
    'public'                     => true,
    'show_ui'                    => true,
    'show_admin_column'          => true,
    'show_in_nav_menus'          => true,
    'show_tagcloud'              => true,
);
register_taxonomy( 'aplicacao', 'product', $args );
register_taxonomy_for_object_type( 'aplicacao', 'product' );
}

I need to filter my list products by two taxonomy.
I try to use add_rewrite_rule, but not work =/


Example request url:

http://my_site?page-name="produtos"&product_cat=caixas-de-tomadas&aplicacao=piso-elevado/

This would get transformed to

http://my_site/produtos/caixas-de-tomadas/piso-elevado/

Read more here: Add Rewrite Rule for custom taxonomy


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: