WordPress.org

Forums

WooCommerce - excelling eCommerce
Collect shipping address even when not required (6 posts)

  1. Chakra Media
    Member
    Posted 1 year ago #

    Where did this option go? I can't find it under Shipping > Shipping Options ...

    I have a virtual product that I need to collect shipping info for (i know that seems odd) and this option used to be there from the searching I've been doing.

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

  2. icc97
    Member
    Posted 1 year ago #

    Yes - I can't find it either. Its been completely removed from the plugin code. Perhaps they only want to allow it in specific extensions.

  3. icc97
    Member
    Posted 1 year ago #

    It has been completely removed from v2.1 (https://github.com/woothemes/woocommerce/issues/5228). Although I can't find any mention of it in the Change Log.

    You can add in a filter it seems instead - which itself has been changed from woocommerce_require_shipping_address to woocommerce_cart_needs_shipping or woocommerce_product_needs_shipping for individual products.

    Edit your theme functions.php to have the following:

    function mytheme_woocommerce_force_shipping() {
    	return true;
    }
    add_filter('woocommerce_cart_needs_shipping', 'mytheme_woocommerce_force_shipping');

    That worked for me although the github issue #5227 implies that it didn't for him.

  4. beachbrine
    Member
    Posted 12 months ago #

    Hi,

    Thank GOD i found this thread. It's the closest I got to a solution. I have the same problem, and tried your code, however it adds "Shipping(free)." to my options.

    I have table rate shipping so the extra option of "Shipping(free)" defeats the purpose. For example: i would have both "Shipping(free)" and also INTERNATIONAL SHIPPING $45 at checkout.

    How do I disable "Shipping(free)." I have already marked as unchecked Free shipping under my Shipping options, however "Shipping(free)" still appears.

    Hope you can help me with your invaluable expertise.

    -Mark

  5. icc97
    Member
    Posted 12 months ago #

    @breachbine that seems to be a completely unconnected issue, which unfortunately I don't know the answer to. I suggest you open a new topic with that question.

  6. Chellchell
    Member
    Posted 6 months ago #

    Hi guys,

    I have added this code to the function.php

    add_filter( 'woocommerce_cart_needs_shipping', '__return_true' );

    So I can collect shipping addresses for virtual products. However, my virtual products are all now charging the table rate shipping charges and are not free shipping anymore.

    Any ideas what I need to do to fix this? Basically I have a bunch of virtual products , that need shipping addresses but also need to be free shipping.

    Hope someone can help! Thanks.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.