Mailchimp Banner | Q2 2024

added by Latoya

Product Icon

Product Add-Ons

by  Woo
Offer add-ons like gift wrapping, special messages or other special options for your products.

Set addon ID or Classes

Before version 6 if an addon “color” were created its html tag looked like this:

wc-pao-addon-color

Since version 6 it was changed to this:

wc-pao-addon-1-1

Adding CSS and JS was quite easy because tag name was predictible. But now is more difficult. Besides if we change addon order the ID also change.

Since rollback is not the best solution, maybe if there were a field to add “id” o “class” to the addon it would help a lot.

Attached an example made with CSS and JS.
Since version 6 all coding needed to be redone to fit new addons IDs.

Thanks

Screenshots

Author

Jairo

Current Status

Open

Last updated: November 20, 2023

2 comments

Log in to comment on this feature request.

  1. orhanf says:

    Hiya! Thanks for taking the time to put in this feature request.

    The reason why we removed the add-on name from the classes is that if the name contains non-latin characters, then it generates an invalid HTML that throws off the add-ons script.

    With that being said, we are monitoring this feature request and should it get more votes, we are open to considering different ways to target these items.

  2. rockeypjb says:

    I 100% agree with this. I could name add-ons the same across various products and since the naming was the same I could have the same JS action attach. Now each one has a unique class and it would take an insane amount of time to track down and list each class. I agree that it should have both: keep the unique ID but also throw the name of field into the class. That is a win-win.