Accessing plugin settings in Gutenberg

Posted by Prem Tiwari | Updated on

The WordPress way to access PHP variables with JavaScript is to use wp_localize_script().

Then in your JavaScript, you can access the credentials like

If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@] Your question and answer will appear on and help other developers.

Related Questions & Answers