• Resolved abood666

    (@abood666)


    hi thank you for a great plugin and the ability to snippets and filters they taught me a lot example a month ago I didnt know what is php lol… anyways how to remove the “Ship to a different address?” slide down animation? it looks ugly when I put it checked by default and hide it. the user will see half of the container sliding down and the other half is static.

    Thanks In Advance.

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

Viewing 10 replies - 1 through 10 (of 10 total)
  • To hide it all together, simply add this snippet to your child theme’s functions.php file

    add_filter( 'woocommerce_cart_needs_shipping_address', '__return_false');

    For getting rid of the animation simply have it always visible by adding this to either your child theme’s css file or Additional CSS in the Customize section.

    #ship-to-different-address-checkbox {
        display:none;
    }
    
    /* disable touch event or mouse click */
    #ship-to-different-address label {
        pointer-events: none;
    }
    
    .shipping_address{
        display:block !important
    }
    • This reply was modified 2 years, 12 months ago by Stef.
    Thread Starter abood666

    (@abood666)

    that didnt work

    Did you clear cache after adding? Where did you add the code?

    Thread Starter abood666

    (@abood666)

    yes and to the header of the page method is working fine for all elements in the page. Is it possible it is using jQuery?

    I’ve tested in several themes and it worked on all. Where are you adding it? You didn’t answer.

    Thread Starter abood666

    (@abood666)

    add_action( ‘wp_head’, ‘checkout_CSS’, 999 );

    function checkout_CSS() {
        if (is_checkout()) :
    		
    		?>
    <style>

    adding it to the page heading induced

    however for argument sake i added it to additional CSS in the WordPress default theme editor. same animation is still there. when you first load the page the shipping container is sliding down automatically.

    Please read my instructions again. You’re not applying this correctly.

    Thread Starter abood666

    (@abood666)

    ok my friend the tried ur instruction and all failed:

    add_filter( ‘woocommerce_cart_needs_shipping_address’, ‘__return_false’); > removes the shipping fields all together.tired following instruction with or with out it incase u where not clear….

    I have add_filter( ‘woocommerce_ship_to_different_address_checked’, ‘__return_true’ );
    deployed turned it off and on with all ur following instructions. tried all possibilities…..

    tried this code:

    #ship-to-different-address-checkbox {
        display:none;
    }
    
    /* disable touch event or mouse click */
    #ship-to-different-address label {
        pointer-events: none;
    }
    
    .shipping_address{
        display:block !important
    }

    inserting in the header
    or inserting in the custom CSS in WP
    or in the theme file CSS or in the customizer….

    singular and together i tried them all in fact i tried more than that

    .shipping_address{
      -webkit-transition: none !important;
      -moz-transition: none !important;
      -o-transition: none !important;
      transition: none !important;
    }

    .shipping_address{

    -o-transition-property: none !important;
    -moz-transition-property: none !important;
    -ms-transition-property: none !important;
    -webkit-transition-property: none !important;
    transition-property: none !important;
    /*CSS transforms*/
    -o-transform: none !important;
    -moz-transform: none !important;
    -ms-transform: none !important;
    -webkit-transform: none !important;
    transform: none !important;
    /*CSS animations*/
    -webkit-animation: none !important;
    -moz-animation: none !important;
    -o-animation: none !important;
    -ms-animation: none !important;
    animation: none !important;
    }

    note i even tried ::before and ::after

    so my friend it doesn’t work, that are the results we can keep trying but it keep giving same output. i dont think that is very smart.

    I’m not sure what you’re talking about or why you would stray from my instructions, but there is no Shipping Address on your store now at all.

    Not to mention it appears you have completely redesigned the entire checkout page.

    If you’re going to use plugins or other methods of customizing the checkout page as you’ve had then certain elements are going to be out of our control to assist you with. My above code works in any default situation.

    You may not be seeing it working, but I’m not seeing any Shipping Form at all.

    This thread has been inactive for a bit, so I’m going to mark it as resolved now. Hopefully, the above information was helpful to you!

    Please feel free to open a new thread if you have any further questions.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘remove Ship to a different address? animation’ is closed to new replies.