Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author Keylor Mendoza

    (@keylorcr)

    Hey @demuri

    This is a functionality that I am working on, I hope to complete it in a few days.

    Thread Starter demuri

    (@demuri)

    @keylorcr Here’s my made-on-the-go function based on some BusinesBloomer’s articles, maybe it could be somehow useful:

    add_filter('woocommerce_package_rates', 'pax_remove_shipping_options_for_particular_country', 10, 2);
    
    function pax_remove_shipping_options_for_particular_country($available_shipping_methods){
    
    	if ( is_admin() ) return $available_shipping_methods;
    
    	if ( isset( $available_shipping_methods['wc_pickup_store'] ) && WC()->customer->get_shipping_country() <> 'LV' ) {
            unset( $available_shipping_methods['wc_pickup_store'] );
        }
        return $available_shipping_methods;
    }

    I also looking for this. I would be awesome if it’s in-build with it.

    I see this is already implemented, but this is not good for my store. I have clients from the United Kingdom who come to Portugal and want to pick up here in a local Store.
    How can I go around this?

    Thanks.

    • This reply was modified 4 years, 5 months ago by magaworks.

    Has this been implemented?
    I can’t seem to find how to do it.

    thanks!

    • This reply was modified 4 years, 4 months ago by mlarino.

    Hi @mlarino
    I have all updates implemented and not yet, sorry.
    I am hoping for it too.

    @demuri Hi Demuri, has your snippet solved the issue ? Hiding pickup store method based on country selection ?

    Best regards

    Thread Starter demuri

    (@demuri)

    @davidgabe yes, the function still works.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Show this method only for selected zone/country’ is closed to new replies.