Using Customizer value in an external PHP file inside a theme

Question

I’m working on a theme for a company and they don’t want the users to touch the code at all. So as I love, they asked me to use Customizer API.

Now, there’s a PHP file in the theme which we don’t call anyone but on a MailChimp form, via AJAX. So basically, this PHP file is inside /inc/helper/mailchimp.php file but only gets called by an AJAX script.

So is there any way to render Customizer value inside the form? And the value will MailChimp API key so we don’t want this to appear anywhere in the source code.

Anyone knows a way to do this? I have completed the entire theme and I just need to finish this. 🙂

0
Hardeep Asrani 5 months 2020-12-17T17:10:27-05:00 0 Answers 8 views 0

Leave an answer

Browse
Browse