rhyswynne / easy-digital-downloads-taxamo-integration

Integrate Taxamo into Easy Digital Downloads. Make yourself Compatible with the VATMOSS EU Legislation
2 stars 6 forks source link

Loading taxamo.all.js #9

Closed samikeijonen closed 9 years ago

samikeijonen commented 9 years ago

Is taxamo.all.js needed anywhere else but in checkout page? If not I suggest that we load it only in checkout page. There is edd_is_checkout() function for it.

samikeijonen commented 9 years ago

Same goes for scripts.js file.

rhyswynne commented 9 years ago

taxamo.all.js shouldn't be loaded, at least at the version currently on the github. It's commented out (or should be!) - https://github.com/rhyswynne/easy-digital-downloads-taxamo-integration/blob/master/includes/scripts.php#L19 - so we can remove that line.

Scripts doesn't need to be loaded in. It can be wrapped in edd_is_checkout() safely. :)

samikeijonen commented 9 years ago

taxamo.all.js it's loaded from here.

https://github.com/rhyswynne/easy-digital-downloads-taxamo-integration/blob/d8bd69d0aabd889a81390245feb65056c92340bf/includes/libraries/taxamo-api/enqueue-js.php

rhyswynne commented 9 years ago

Oh so it is.

Yeah probably needs removing!

rhyswynne commented 9 years ago

Okay, that I have a funny feeling that file probably shouldn't be pulled in. I'll look at it it with #8.

rhyswynne commented 9 years ago

Yep. Shouldn't be in. Removed