0
votes

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.

1

1 Answers

1
votes

Man...sometimes I just need to ask a question to figure it out on my own :)

What I did:

  1. Installed plugin "Code Embed" so my HTML wouldn't get auto corrected. I could insert my HTML directly into the product.

  2. Uploaded my emailpage.js to my website

  3. Linked it using the first example given here: JavaScript codex

And thats it :)