Skip to content

Checkout page markup changes in Theme Engine v2 #2297

@leewillis77

Description

@leewillis77

I've just been testing a few of my plugins against the branch-4.0.0 branch, I'm going to raise a few issues, mostly for discussion as there's nothing broken. Please feel free to ignore / close :)

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions