• Resolved rasmus1835

    (@rasmus1835)


    How do I disable the label for customers with a shipping address outside of Denmark (since we only provide free shipping for DK customers)?
    Great plug in Thank you!

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Marin Matosevic

    (@marinmatosevic)

    Hi,

    set two (or more) shipping zones in WooCommerce settings. In the first zone set shipping options for Denmark and in other zone set shipping options for other countries (without free shipping).

    Best regards

    Thread Starter rasmus1835

    (@rasmus1835)

    Hi Marin,

    Thanks for your quick reply.
    We have a lot of zones (20+) and Denmark is the only zone where we have a free shipping option. All other countries doesn’t have free shipping.

    Kind regards

    • This reply was modified 2 years, 8 months ago by rasmus1835.
    Plugin Author Marin Matosevic

    (@marinmatosevic)

    Do you use some other shipping plugin?
    My plugin is compatible with default WooCommerce shipping methods and with FlexibleShipping plugin, other plugins may work in some cases but often needs additional customization.

    Here is the PHP code snippet which will allow progress bar only if Denmark is selected as a shipping country.

    add_filter('fsl_progress_bar_html', function ($html) {
    	$customer = WC()->customer;
    	$customer_shipping_country = $customer ? $customer->get_shipping_country() : null;
    
    	return $customer_shipping_country === 'DK' ? $html : null;
    }, 10);

    Paste this in functions.php in your child theme. If you are not comfortable with editing PHP templates, let someone else do it.
    Or you can add this with a help of some plugin like Code Snippets

    Best regards

    Thread Starter rasmus1835

    (@rasmus1835)

    Its working – Fantastic – thank you so much for an excellent support!

    Kind regards

    Plugin Author Marin Matosevic

    (@marinmatosevic)

    I’m glad I was able to help.

    If you like a plugin, feel free to leave a review ??

    Best regards

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Show only for specific country’ is closed to new replies.