WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Reverse checkbox (1 post)

  1. Tonney
    Member
    Posted 4 months ago #

    I'd like to reverse checkbox on checkout page, that as it is checked off the shipping form is hidden. I found and changed this line in checkout.js

    $('#shiptobilling input').change(function(){
    		$('div.shipping_address').hide();
    		if (!$(this).is(':checked')) {
    			$('div.shipping_address').slideDown();
    				}

    to

    $('#shiptobilling input').change(function(){
    		$('div.shipping_address').slideDown();
    		if (!$(this).is(':checked')) {
    			$('div.shipping_address').hide();
    		       	}

    it's work fine but after order the shipping-form data not updating, it's still the same as billing-form data. How to fix it?

    https://wordpress.org/plugins/woocommerce/

Reply

You must log in to post.

About this Plugin

About this Topic