Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't translate woocommerce product when permalink is changed #43

Open
AleCss81 opened this issue Aug 21, 2019 · 0 comments
Open

Doesn't translate woocommerce product when permalink is changed #43

AleCss81 opened this issue Aug 21, 2019 · 0 comments

Comments

@AleCss81
Copy link

HI, I have changed the base for product slug in "Veicoli" (my predefined language is italian). But using your example function the slug "veicolo" is not translated.

add_filter('pll_translated_post_type_rewrite_slugs', function($post_type_translated_slugs) {
	// Add translation for "product" post type.
	$post_type_translated_slugs = array(
		'product' => array(
			'en' => array(
				'has_archive' => true,
				'rewrite' => array(
					'slug' => 'vehicle',
				),
			),
			'de' => array(
				'has_archive' => true,
				'rewrite' => array(
					'slug' => 'fahrzeug',
				),
			),
		),
	);
	return $post_type_translated_slugs;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant