<span class="resolved" aria-label="Resolved" title="Topic is resolved."></span>Транслитерация в своем скрипте

[ad_1]

Replies: 1

Как можно использовать транслитерацию при создании поста/товара программно?

Пробую как у вас было в примере:

$itemH1 = ‘Мой текст на русском’;

global $cyr_to_lat_plugin;
$product = new WC_Product_Simple();
$product->set_slug($cyr_to_lat_plugin->transliterate(sanitize_title($itemH1)));

Но не работает – текст не транслируется.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer