Conditional Action Based on Campaign Start Date

Hi There,

Coding Background
Forgive me, I am an API novice, as in I haven’t used Infusionsoft’s API yet and am more comfortable with JavaScript programming so please forgive the simple question.

Website Setup
WordPress hosted website with locally coded sign-up form, with a 2-Pay button, linked to an Infusionsoft order form.

Question
Is there a way to do a dynamic (when the page loads) check on a campaign start date and take a conditional action on my WordPress locally coded sign-up form? This date check result needs to feed a JavaScript action on the 2-Pay button, graying out and inactivating the button.

The JavaScript side I can handle but I don’t know how to make the API call and link it back into the script.

Background - Non Paying Customers…
We recently had a non-paying customer, who selected a two pay then didn’t fulfill the second payment. The time the live class runs meant they received ALL the tuition without making ALL the payment.

What we are trying to do to prevent this happening again, by removing (gray out / inactivate) the 2-Pay button option after a certain period of time after the campaign start date.

Yes I can manually change the page code but its a better long term solution to have the WordPress page query Infusionsoft, get the start date and apply a CSS class / code change automatically.

This way our customers can only pay for the training class up until a date we specify.

Thanks if anyone has some tips or come up with a solution to such a scenario.

Aly :slight_smile: