WooCommerce Product Add-ons with Custom Labels

Github.com

Recently, while working with a WooCommerce shop and using the WooCommerce Product Add-ons extension, I encountered a bit of a problem.  I was unable to identify individual form labels to provide them with a custom style.  Each label in the HTML was simply:

<label>

…with no class attributed to it.  I was able to get a bit of the customization my client wanted using ‘:nth-child’ pseudo selectors in CSS, but it still wasn’t quite as specific as it needed to be.

So it was decided that, despite what I ALWAYS advocate to clients and associates, I needed to modify the original plugin to suit my client’s specific needs.  The code is relatively simple and it works like a charm – however, every time the WooCommerce Product Add-ons plugin is updated, I have to parse through the necessary files and re-edit the code.

In the interim, it came to my attention that a few other people were looking for a similar solution, so I’ve decided to upload the template files with my edits to Github, so that others can download and replace the ones that come with the WooCommerce Product Add-ons extension.

You can view the Github repository here.

I’ll do my best to keep them updated as quickly as possible so that they’re always compatible with the newest version of the WooCommerce Product Add-ons extension.

Note:  I am not including the full plugin on Github because it’s a commercial plugin from the extremely talented team at WooThemes.com.  I have included only what is necessary so that an existing user of the WooCommerce Product Add-ons plugin can easily swap out a few files and have custom label classes added to the HTML output of the original plugin.

This entry was posted in Blog. Bookmark the permalink. Trackbacks are closed, but you can post a comment.
    • |
    • |