This filter can be used to pass variables to the Helpful javascript, or manipulate existing variables from Helpful.
/**
* @param array $vars
* @return array
*/
add_filter('helpful_frontend_ajax_vars', function (array $vars) {
$vars['my_var'] = 'some nice content';
return $vars;
});
Afterwards the variable is available in JavaScript with: helpful.my_var
Was this helpful?
Vote now and show me if you like or helped the content. After that, you can also leave feedback if you have a few more words to say.