[resolved] Set up no transportation cost above € 50 (6 posts)

  1. Arie-vld
    Posted 3 years ago #

    I've got a problem in my webshop.
    What I want is that when you order above € 50 that transportation cost is free. Under € 50 you pay a fixed price.

    How can I set this?
    Is there a solution for it?


  2. Coen Jacobs
    Posted 3 years ago #

    Free shipping has a setting called 'Minimum Order Amount', which allows you to make Free shipping only available for orders that are over € 50.

    For the fixed price shipping for all orders under € 50, I suggest you use Flat Rate shipping. If you want to hide Flat Rate shipping once Free shipping is available, you can use this snippet I've posted in some other topic as well:

    add_filter( 'woocommerce_available_shipping_methods', 'cj_woocommerce_available_shipping_methods' );
    function cj_woocommerce_available_shipping_methods( $available_methods ) {
    	if ( isset( $available_methods['free_shipping'] ) ) {
    		foreach ( $available_methods as $key => $value ) {
    			if ( 'free_shipping' != $key ) {
    				unset( $available_methods[ $key ] );
    	return $available_methods;

    You need to put this snippet in your (child) themes functions.php file or in a plugin.

  3. Arie-vld
    Posted 3 years ago #

    So the only thing what I have to do is add this php code to the functions.php file and the choice in the checkout form will disappear?
    Now when I order something above € 50,- I can also choose to pay for it.
    When I order under € 50 it's working right, I only have 1 choice to pay for transportation.

    Is this right?

  4. Coen Jacobs
    Posted 3 years ago #

    That is correct. That code will remove all other shipping methods than 'free shipping' from the list once there is more than one method available.

    In your case, this means that once the free option becomes available, the paid option will be disabled and 'free shipping' is automatically selected.

  5. Arie-vld
    Posted 3 years ago #

    Thank you for this sollution Coen Jacobs!!
    It works totally awesome.

    I'm also looking for 2 other solutions in the check out form of the webshop, maybe you got some answers? Or maybe some one else?

    1. How can I delete fields in both billing address and shipping address. The fields I want to delete are: province (not needed in the Netherlands) and the extra field under Adress: 'apartment, suite, unit, etc' what is an optional field? I don't need both.

    2. And there is a text 'required' if you move your mouse pointer on the asterisk on the required fields. Where en how can I change this word 'required' in my own language?

    I hope some one could help me with this :)

  6. Coen Jacobs
    Posted 3 years ago #

    We have two ways to change the checkout fields. One is by using actions and filters, the other one is by using the new Checkout Field Editor extension.

    All texts can be translated as explained in our documentation about translating.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic