When a plugin creates a post type it may have its own api to fetch them.
Internally, this function probably uses a get_posts() or get_terms() call that is affected by our language filter currently.
So the expected behavior of this function is affected. This is bad and weird.
Examples:
WooCommerce has a product post type.
And you can use wc_get_products to fetch them.
ACF has a ACF-Field post type.
And its used internally by functions like get_fields to fetch field groups .
This issue can be solved by allowing users select which post types will be translatable. And also warning about the risks.
By default, we can choose common post types to be translatable.
When a plugin creates a post type it may have its own api to fetch them.
Internally, this function probably uses a
get_posts()
orget_terms()
call that is affected by our language filter currently. So the expected behavior of this function is affected. This is bad and weird.Examples: WooCommerce has a product post type. And you can use
wc_get_products
to fetch them.ACF has a ACF-Field post type. And its used internally by functions like
get_fields
to fetch field groups .This issue can be solved by allowing users select which post types will be translatable. And also warning about the risks. By default, we can choose common post types to be translatable.