Open leewillis77 opened 7 years ago
hey @leewillis77
Not opposed at all to adding these data attributes back for unique names if its's helpful for third-party developers.
we could have it like this data-wpsc-meta-key="wpsc-checkout-field-billingpostcode"
if that works.
but we should decide if we want to add it for all field types. as in for textfields, selects
If you have Javascript that attaches to the fields on the checkout page, they can’t be accessed the same way as they are in the existing system. Specifically in my use-case, they no longer have the data-* attributes that they have in the current release, e.g.
<input id="wpsc-checkout-field-billingemail-control" name="wpsc_checkout_details[9]" value="" type="text">
used to be:
<input data-wpsc-meta-key="billingemail" title="billingemail" type="text" id="wpsc_checkout_form_9" class="text wpsc-visitor-meta" placeholder="Email" value="" name="collected_data[9]”>
I’m currently using the
data-wpsc-meta-key
attribute to attach event handlers to certain fields at checkout. These aren't available in the new theme engine. It looks like each field does have a sensible ID that can be used instead, so it's possible for me to update plugins to look for that as well, but opening this in case you want to consider maintaining the data- attributes for back-compat.