Unable to get all string translations (Polylang Pro)
-
Hi,
I’ve been trying to get all string translations that i’ve registered manually but i’m unable to do so.
// Registered the strings (functions.php) add_action('init', function () { pll_register_string('404.title', 'Erro 404', 'SCML', false); pll_register_string('events.place', 'LOCAL', 'SCML', false); });
// Created an endpoint to return all (functions.php) add_action( 'rest_api_init', function () { register_rest_route( 'api/v1', 'translations', array( 'methods' => 'GET', 'callback' => function () { return PLL_Admin_Strings::get_strings(); }, ) ); } );
Is there something i’m missing?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Unable to get all string translations (Polylang Pro)’ is closed to new replies.