Skip to content

Instantly share code, notes, and snippets.

@BFTrick
Last active October 3, 2018 16:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BFTrick/6252640 to your computer and use it in GitHub Desktop.
Save BFTrick/6252640 to your computer and use it in GitHub Desktop.
Always display the shipping fields in WooCommerce even if the product is virtual. On [WordPress Answers](http://wordpress.stackexchange.com/questions/110342/woocommerce-always-include-shipping-information-in-checkout/110343#110343 ) and on the [WooThemes Knowledge Base](http://support.woothemes.com/entries/25287857-Always-Include-Shipping-Inform…
<?php
add_filter( 'woocommerce_cart_needs_shipping', '__return_true' );
@Nodws
Copy link

Nodws commented Sep 14, 2016

Filter name is incorrect, try
add_filter( 'woocommerce_cart_needs_shipping_address', '__return_true', 50 );

@jeffclark27
Copy link

add_filter( 'woocommerce_cart_needs_shipping', '__return_true' );

This worked for me!
Cheers.

@curiomuseum
Copy link

Both of these work for me, but I actually need to get woocommerce to show the Order Delivery Date option at checkout (without showing some of the other shipping options). Anyone know the variable I should use in the filter?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment