WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Restrict products to a certain country (2 posts)

  1. rlavs
    Member
    Posted 1 year ago #

    I'm building a site for a gift basket company that has a variety of baskets. They ship ALL of their products to Canada.

    My issue is that they want to ship only CERTAIN products to the United States. There is a restriction on shipping food across the border from Canada to the US, therefore they would like the ability to ship baskets that do not contain food to the US.

    Woocommerce seems to support the ability to show/hide shipping methods based on Country, but is there any way (either natively or through an extension) to support limiting shipping certain products to customers in certain countries?

    http://wordpress.org/extend/plugins/woocommerce/

  2. bheadrick
    Member
    Posted 1 year ago #

    I think you'd need to use the woocommerce_available_shipping_methods filter hook on all shipping methods

    If the country was US, you would check to see if there are any items in your food category in the cart, and remove all shipping methods if so (and display some indication that food items couldn't be shipped to the US)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic