• Resolved loopforever

    (@loopforever)


    Hello,
    I am doing a transaction with checkbox on the payment page. My purpose is this: If the checkbox is checked, the data from the Billing Address will be transferred to the Delivery Address. So far everything is fine. Name, Surname etc. I can transfer. However, Billing State has a problem. I don’t know why the JQuery code I wrote for this below is not working. Can you help me ?

    //Example code first name:
    jQuery("[name='shipping_first_name']").val(jQuery("[name='billing_first_name']").val());
    //Code not working for Shipping State: 
    jQuery("[name='billing_state']").filter(":selected").val(jQuery("[name='shipping_state']").filter(":selected").val());

    Also, the hook I use is woocommerce_before_checkout_shipping_form

    • This topic was modified 4 years, 8 months ago by loopforever.
    • This topic was modified 4 years, 8 months ago by loopforever.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Checkout Page Billing State Problem’ is closed to new replies.