Viewing 5 replies - 1 through 5 (of 5 total)
  • 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.

    Thread Starter Arie-vld

    (@arie-vld)

    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?

    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.

    Thread Starter Arie-vld

    (@arie-vld)

    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 ??

    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.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Set up no transportation cost above € 50’ is closed to new replies.