Hi @kabiahmet,
Generally, I no longer provide any extra customization service for functionalities directly related to 3rd party plugins.
To rewrite the product permalinks like this, you will need a different snippet (you do not need to use the old one you mentioned in the previous post):
function pm_adjust_product_permalinks($permalink, $post, $old_permalink) {
if(!empty($post->post_type) && $post->post_type == 'product') {
$store_name = get_user_meta($post->post_author, 'dokan_store_name', true);
if(!empty($store_name)) {
$permalink = add_query_arg('store', sanitize_title($store_name), $permalink);
}
}
return $permalink;
}
add_filter('permalink_manager_filter_final_post_permalink', 'pm_adjust_product_permalinks', 999, 3);
You will also need to change your product permastructures to:
fiyati/%postname%
As regards the second part of the problem – WordPress normally does not allow to use the same slug for more than one post (product):
https://permalinkmanager.pro/docs/faq/native-slug-in-wordpress-permalinks/
That is why (“copy” suffix is appended to the URL). However, you can make my plugin use the actual product titles instead:
https://permalinkmanager.pro/docs/plugin-settings/slugs-mode/#use-actual-titles-as-slugs
In the end do not forget to use “regenerate/reset” tool again 😉 Please also do not open another support thread – this would help other users to find the needed information here 😉