• Resolved accend4web

    (@accend4web)


    Hi,
    I recently noticed that the shipping costs arent showing until the customers completes the town and postcode which is not going to work for me really, as all my shipping rates are based on country only.

    So I did some research and it seems there was a fix, and it came in the form of updating class-wc-shipping.php until a patch was made. It seems in an update that has been fixed, as the code below seems to reflect what Im needing.

    	public function is_package_shippable( $package ) {
    		// Packages are shippable until proven otherwise.
    		if ( empty( $package['destination']['country'] ) ) {
    			return true;
    		}
    
    		$allowed = array_keys( WC()->countries->get_shipping_countries() );
    		return in_array( $package['destination']['country'], $allowed, true );
    	}
    

    But Im still having the issue. The issue is I want the shipping to show on selection of the country only, not only after they select a town and postcode.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Mirko P.

    (@rainfallnixfig)

    Hi @accend4web,

    This is a fairly complex development topic. I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.
    
    I can also recommend the WooCommerce Developer Resources Portal for resources on developing for WooCommerce.
    
    You can also visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.

    Thanks.

    Mirko P.

    (@rainfallnixfig)

    Hi there,

    We’ve not seen any activity on this thread for a while, so I’m marking this thread as resolved.

    Hopefully, you were able to come up with a solution and the above resources were helpful. If you have further questions, please feel free to open a new topic.

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Shipping not available until town and postcode completed’ is closed to new replies.