Support » Plugin: WooCommerce Variable Product Add-Ons » Hide only specific add-ons?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor angelleye

    (@angelleye)

    I agree, that would be nice. I have added this feature request to our GitHub repo. You can track its progress there if you want to.

    Thanks for the feedback!

    Thread Starter Kahil

    (@kahil)

    Actually, I think that there might be a way. Now the Product Addons plugin adds an additional class that is based on what you named the addon section. You could add a simply text field option in there that shows when the checkbox is ticked that allows us to put in that added detail. Right now you have the .js file set to hide the .product-addon sections if ticked. By adding the text box, you could plug that in to add specific sections only. For instance… IF the box is ticked and IF “your name” is put in the text field, then the part that gets blocked will only be .product-addon-your-name and so on. Seems pretty easy to do…I actually did so to test with a custom field. So that’s something you can consider in order to take it to the next level.

    On a related note…I just left a review…this plugin simply isn’t working, at least for me. I have specific variations set to hide, but they don’t.

    Plugin Contributor angelleye

    (@angelleye)

    I wish you would have mentioned this BEFORE leaving the review. The issue was already fixed in GitHub. This plugin simply isn’t nearly as popular as our others and it got placed on the back burner. Had you let me know I could have fixed it pretty quickly.

    I actually did just push the update, so version 0.1.2 is now officially released, which should solve this problem.

    On that note, the 0.x.x version number tells you this is a beta plugin, so again, feedback is appreciated before a 1 star review.

    Kahil, any chance of sharing the code to only hide specific addons.

    I think ineed it the other way around, to hide everything but only show specifc ones.

    Would be very useful.

    Thanks angelleye for a useful plugin

    Thread Starter Kahil

    (@kahil)

    @jamestav If you look at the source of a published product with add-ons, you’ll see that each addon will have a class that matches what you named it. Each variable in there, like each checkbox, will also have a unique class based on the add-on name…will be something like.. addon-name-0, addon-name-1…and so on. That’s how I am currently able to apply custom CSS. So…that’s why I think it would be easier for this plugin to harness that info to make it more flexible with some IF logic applied. Like… IF no options have been selected for the product, show no addons. If option 1 and option 2 have a specific variable selected, show only these add-ons, etc. Could turn this plugin into a very robust one. The only thing that would be the challenge here are add-ons that you mark as required and then being able to add to your cart of a required add-on is hidden because it wasn’t needed for a specific variation.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Hide only specific add-ons?’ is closed to new replies.