Answer the question
In order to leave comments, you need to log in
How to add city input to WordPress Woocommrerce delivery block?
Answer the question
In order to leave comments, you need to log in
If anyone is interested in solving this issue, then I did the following: I
uploaded the file from the plugin /wp-content/plugins/woocommerce/cart/cart-shipping.php
to my theme /wp-content/themes/rstheme/woocommerce/cart/ cart-shipping.php
And pasted the following code before the opening ul tag with woocommerce-shipping-methods class
<li>
<div class="address-field" data-priority="40">
<label for="billing_city" class="">Укажите город:
<span class="woocommerce-input-wrapper">
<input type="text" class="input-text mt-1 m-0" id="demo1" name="billing_city">
</span>
</label>
</div>
<script>
$(document).ready(function() {
var b = $('#billing_city').val();
$('#demo1').attr('value', b);
});
$('#demo1').keyup(function() {
var a = $(this).val();
$('#billing_city').attr('value', a);
});
</script>
</li>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question