Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
initPaddle(){
//Init the Paddle after it's loaded from their server.
//There is no callback or an event so we use intervals to wait until it's loaded.
//We also must load their script from their servers to get the freshest code.
let interval = setInterval(() => {
if (typeof window.Paddle !== 'undefined') {
//Credentials: https://vendors.paddle.com/account
window.Paddle.Setup({
vendor: 11111,
debug: false
});
clearInterval(interval);
}
}, 500);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.