In this example we change the position of update cart button before checkout button in Cart page.
Put the below code in functions.php page
add_action('woocommerce_cart_totals_after_order_total', 'change_update_cart');
function change_update_cart(){
?>
<button type="button" class="button" name="update_cart" value="<?php esc_attr_e( 'Update cart', 'woocommerce' ); ?>" id="new_update_btn"><?php esc_html_e( 'Update cart', 'woocommerce' ); ?></button>
<?php
}
In cart.php file find this code for update cart button
<button type="submit" class="button" name="update_cart" value="<?php esc_attr_e( 'Update cart', 'woocommerce' ); ?>" id="main_update_btn" style="display: none;"><?php esc_html_e( 'Update cart', 'woocommerce' ); ?></button>
style=”display: none;” Add this code for hiding the woocommerce default button.
Now just put js code in footer.php
<script>
jquery('#new_update_btn').on('click', function(event) {
jquery('#main_update_btn').trigger('click');
});
</script>