My Woocommerce store has virtual products that don't require shipping. I have disabled the shipping options from the customer on checkout, but now I want to hide it on the backend as well.

When viewing orders on the admin side, I have 3 columns: General Details, Billing Details and Shipping Details. I want to remove the Shipping Details in the third column so that later I can add some custom fields there instead.

I've tried using remove_filter( 'woocommerce_admin_shipping_fields', 'filter_woocommerce_admin_shipping_fields' );

but that doesn't change anything on the backend.

I could probably do it with some deeply complicated CSS and display:none, but I'd rather just remove it programmatically, like with a remove_filter or something.


There is no "clean" solution for what you are asking.

However, you can manually delete this block by editing woocommerce/includes/admin/class-wc-meta-box-order-data.php line 315-397.

  • 1
    Thanks - I'd rather just leave it then. I prefer not to edit core files in plugins as you only lose the changes you make on the next upgrade. – gillespieza Nov 4 '15 at 6:59

Add this to your functions.php

 <?php add_action( 'init', 'hide_shipping_details' );
    function hide_shipping_details() { 
        global $pagenow;
        if( is_admin() && $pagenow == "user-edit.php") { ?>
        <style> #fieldset-shipping{ display: none !important } </style>
    <?php } }

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.