I changed the frontend templates (override by copying the file(s) into my custom theme folder) of the cart and checkout page by replacing some table-row-columns-constructs with div containers in order to create a (in my opinion) clearer layout, also for handling responsive layout changes.
It seems, the Wordpress hook/action woocommerce_checkout_order_review
triggered from the template checkout/form-checkout.php
template uses the code from cart/cart-shipping.php
which is fine, because ist keeps the list containing the choosable shipping methods consistant on both pages.
A 'critical' change was: removing the td
and th
tags, and replacing <tr class="shipping">
with <div class="shipping">
in cart/cart-shipping.php
.
This leads to the problem:
Clicking a list item of the shipping_methods ul triggers the events update_checkout
and updated_checkout
, which (i think) are responsible for updating the cart/chekout page.
With my changed HTML templates things are not working as they should; with every click the whole ul
gets replicated.
I could not find any occurences of tr.shipping
or .shipping
in the woocommerce js code.
Why is changing the template structure breaking the jQuery code? And how can I achieve that change without breaking?