How to set product category base same as shop base - and not have any 404 errors in subcategories?
add_filter( 'rewrite_rules_array', function( $rules )
{
$new_rules = array(
'shop/([^/]*?)/page/([0-9]{1,})/?$' => 'index.php?product_cat=$matches[1]&paged=$matches[2]',
'shop/([^/]*?)/?$' => 'index.php?product_cat=$matches[1]',
);
return $new_rules + $rules;
} );
Comments
what you ask for, requires files customization what in reference to Item Support Policy [Links visible only for registered users] is not allowed. So if you want to modify files and don't know how, you should contact with your web developer.
Thanks!