1

I'm using wp_enqueue_script to enqueue the public-facing JS of my WP plugin:

wp_enqueue_script($this->PluginName, plugin_dir_url(__FILE__) . 'js/public.js', array(), $this->version, false); 

And in the other side I have:

var data = { name: '' } 

I would like, somehow, to set the name value to a value that I have access in the server side. Is this possible? Can someone point me to the documentation or an example of how to do that?

1

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.