Reputation: 943
I would like to know how can I insert a custom JavaScript script into a product. I am using the WooCommerce plugin. Basically I have some scripts which would go into different products.
Example:
Script1 is for Product1, Product2, Product3 Script2 is for Product4, Product5
etc.
What I really mean is that different products would have different scripts. So how can I add those scripts into the product?
Kind regards, Urban.
Upvotes: 0
Views: 2361
Reputation: 943
Man...sometimes I just need to ask a question to figure it out on my own :)
What I did:
Installed plugin "Code Embed" so my HTML wouldn't get auto corrected. I could insert my HTML directly into the product.
Uploaded my emailpage.js to my website
Linked it using the first example given here: JavaScript codex
And thats it :)
Upvotes: 1