Rewrite.php file (custom-post-type-permalinks/CPTP/Module/Rewrite.php)
line 99
add_rewrite_tag( ‘%’ . $post_type . ‘_slug%’, ‘(‘ . $args->rewrite[‘slug’] . ‘)’, ‘post_type=’ . $post_type . ‘&slug=’ );
add line before
$args->rewrite[‘slug’] = apply_filters( ‘wpml_get_translated_slug’,$args->rewrite[‘slug’],$post_type,$language_code );
——
https://pastebin.com/CtusrEke
—–
Permalink.php file (custom-post-type-permalinks/CPTP/Module/Permalink.php)
line 79
$permalink = str_replace( ‘%’ . $post_type . ‘_slug%’, $pt_object->rewrite[‘slug’], $permalink );
add line before
$pt_object->rewrite[‘slug’] = apply_filters( ‘wpml_get_translated_slug’,$pt_object->rewrite[‘slug’],$post_type,$language_code );
——
https://pastebin.com/SsSbWfTV
—–