Title: Hide Shipping Address
Last modified: June 19, 2022

---

# Hide Shipping Address

 *  Resolved [mysticminimalistartisan](https://wordpress.org/support/users/mysticminimalistartisan/)
 * (@mysticminimalistartisan)
 * [4 years ago](https://wordpress.org/support/topic/hide-shipping-address/)
 * Hi. I have a service based business so I would like to hide the shipping address
   on the page that loads when clicking the “Open print view in browser” link in
   the e-mail. From the FAQ I have tried the
 *     ```
       function example_removed_payment_method( $fields ) {
           unset( $fields['payment_method'] );
           return $fields;
       }
       add_filter( 'wcdn_order_info_fields', 'example_removed_payment_method' );
       ```
   
 * but I don’t know what to change the “example_removed_payment_method” & “payment_method”
   to.
 * Also, I would like to change the color of the print button at the bottom to a
   more noticeable color so people see it better as it is easy to overlook (& my
   site color just happens to be the perfect color, LOL!). I have used the inspector&
   see it is defined by #navigation .button, but I can’t find this in the stylesheet.
   How can I change the color of the button?
 * I would really appreciate any help. Love the plugin by the way, thanks for creating
   it!!!

Viewing 15 replies - 1 through 15 (of 42 total)

1 [2](https://wordpress.org/support/topic/hide-shipping-address/page/2/?output_format=md)
[3](https://wordpress.org/support/topic/hide-shipping-address/page/3/?output_format=md)
[→](https://wordpress.org/support/topic/hide-shipping-address/page/2/?output_format=md)

 *  [Moksha Shah](https://wordpress.org/support/users/mokshasharmila13/)
 * (@mokshasharmila13)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/hide-shipping-address/#post-15751411)
 * Hi [@mysticminimalistartisan](https://wordpress.org/support/users/mysticminimalistartisan/),
 * For hiding the shipping address, please add the below code in your active theme’s
   functions.php file or use a plugin like Code Snippets:
 *     ```
       function example_removed_shipping_address( $order ) {
       if ( ! $order->get_formatted_shipping_address) {
       	esc_attr_e( 'N/A', 'woocommerce-delivery-notes' );
       }
       }add_filter( 'wcdn_address_shipping', 'example_removed_shipping_address' );
       ```
   
 * Screenshot:- [https://prnt.sc/cTS6xnJt8UBn](https://prnt.sc/cTS6xnJt8UBn)
 * You can change the color of the print button directly in the file.
    path:- woocommerce-
   delivery-notes/includes/class-wcdn-theme.php
 *     ```
       <p class="order-print">
       <a href="<?php echo esc_url( $print_url ); ?>" class="button print" style="background-color:red"><?php echo esc_attr( apply_filters( 'wcdn_print_button_name_order_page', __( 'Print', 'woocommerce-delivery-notes' ), $order ) ); ?></a>
       </p>
       ```
   
 * Screenshot:- [https://prnt.sc/lDm82x2aKWtT](https://prnt.sc/lDm82x2aKWtT)
 * Please note that updating the plugin’s new version will wipe out these changes.
 * Regards,
    Moksha.
    -  This reply was modified 3 years, 12 months ago by [Moksha Shah](https://wordpress.org/support/users/mokshasharmila13/).
    -  This reply was modified 3 years, 12 months ago by [Moksha Shah](https://wordpress.org/support/users/mokshasharmila13/).
 *  Thread Starter [mysticminimalistartisan](https://wordpress.org/support/users/mysticminimalistartisan/)
 * (@mysticminimalistartisan)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/hide-shipping-address/#post-15751496)
 * Weird, I just received a reply to this post, but there’s no reply here. It was
   from moksha shah.
 * Anyways, I added the functions to my themes function file, but I get the following
   eror:
 * Your PHP code changes were rolled back due to an error on line 90 of file wp-
   content/themes/oceanwp-child-theme-master/functions.php. Please fix and try saving
   again.
 * syntax error, unexpected ‘&’
 * I have no idea which & to remove. Help? Thanks!
 *  Thread Starter [mysticminimalistartisan](https://wordpress.org/support/users/mysticminimalistartisan/)
 * (@mysticminimalistartisan)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/hide-shipping-address/#post-15751521)
 * Weird, now your reply is here [@mokshasharmila13](https://wordpress.org/support/users/mokshasharmila13/)
   so strange. Anyways, after copying it from your reply instead of the e-mail, 
   it worked, BUT, it didn’t hide the shipping address. It’s still there, it just
   says Shipping Address N/A
 * I did clear cache on both my browser & on the website.
 * Not sure what I did wrong?
 *  [Moksha Shah](https://wordpress.org/support/users/mokshasharmila13/)
 * (@mokshasharmila13)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/hide-shipping-address/#post-15751562)
 * Hi [@mysticminimalistartisan](https://wordpress.org/support/users/mysticminimalistartisan/),
 * Please can you show me your code, because in our code this sign ‘&’ is not used.
   Check it and paste the code once again and let us know.
 * Regards,
    Moksha.
 *  [Moksha Shah](https://wordpress.org/support/users/mokshasharmila13/)
 * (@mokshasharmila13)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/hide-shipping-address/#post-15751595)
 * Hi [@mysticminimalistartisan](https://wordpress.org/support/users/mysticminimalistartisan/),
 * You can directly remove or comment ‘shipping address’ from the file print-content.
   php Or directly just replace the below file in the given path.
 * Please note that updating the plugin’s new version will wipe out these changes.
 * File path:- woocommerce-delivery-notes/templates/print-order
    File:- [https://www.dropbox.com/s/elzpr1fbl9655xw/print-content.php?dl=0](https://www.dropbox.com/s/elzpr1fbl9655xw/print-content.php?dl=0)
 * Please take a backup of the existing plugin before you replace the above files.
 * Regards,
    Moksha.
 *  Thread Starter [mysticminimalistartisan](https://wordpress.org/support/users/mysticminimalistartisan/)
 * (@mysticminimalistartisan)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/hide-shipping-address/#post-15753680)
 * This is the code I pasted:
 *     ```
       function example_removed_shipping_address( $order ) {
       if ( ! $order->get_formatted_shipping_address) {
       	esc_attr_e( 'N/A', 'woocommerce-delivery-notes' );
       }
       }add_filter( 'wcdn_address_shipping', 'example_removed_shipping_address' );
       ```
   
 * Isn’t there a way I could just have it not show with css? I have tried
 *     ```
       .shipping-address {
       	display: none !important;;
       }
       ```
   
 * but it doesn’t work either. I’d really rather not edit the plugin files, although
   if it’s a template, shouldn’t I be able to copy the template file to my child
   theme so I don’t lose changes with updates?
 *  Thread Starter [mysticminimalistartisan](https://wordpress.org/support/users/mysticminimalistartisan/)
 * (@mysticminimalistartisan)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/hide-shipping-address/#post-15753698)
 * Oops, I noticed the extra ; in the css & removed it, but it still doesn’t work.
 *  [Moksha Shah](https://wordpress.org/support/users/mokshasharmila13/)
 * (@mokshasharmila13)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/hide-shipping-address/#post-15753741)
 * Hi [@mysticminimalistartisan](https://wordpress.org/support/users/mysticminimalistartisan/),
 * Please check we have given one more solution for hiding the shipping address (
   read my last reply) . Replace the file and let us know.
 * Regards,
    Moksha.
 *  Thread Starter [mysticminimalistartisan](https://wordpress.org/support/users/mysticminimalistartisan/)
 * (@mysticminimalistartisan)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/hide-shipping-address/#post-15754598)
 * I uploaded the file, cleared caches on both sides, but it did not work.
 *  [Moksha Shah](https://wordpress.org/support/users/mokshasharmila13/)
 * (@mokshasharmila13)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/hide-shipping-address/#post-15755057)
 * Hi [@mysticminimalistartisan](https://wordpress.org/support/users/mysticminimalistartisan/),
 * For hiding the shipping address replace the below file in the given path and 
   let us know.
    Please note that updating the plugin’s new version will wipe out
   these changes.
 * File path:- woocommerce-delivery-notes/templates/print-order
    File:- [https://www.dropbox.com/s/elzpr1fbl9655xw/print-content.php?dl=0](https://www.dropbox.com/s/elzpr1fbl9655xw/print-content.php?dl=0)
 * Please take a backup of the existing plugin before you replace the above files.`
 *  Thread Starter [mysticminimalistartisan](https://wordpress.org/support/users/mysticminimalistartisan/)
 * (@mysticminimalistartisan)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/hide-shipping-address/#post-15755060)
 * Is this the same one you had me download before or did you change something in
   it? If it’s the same one, I already uploaded it. If it’s different let me know&
   I’ll try it. Thanks.
 *  [Moksha Shah](https://wordpress.org/support/users/mokshasharmila13/)
 * (@mokshasharmila13)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/hide-shipping-address/#post-15755063)
 * Hi [@mysticminimalistartisan](https://wordpress.org/support/users/mysticminimalistartisan/),
 * Yes, we have resolved the issue and sent you the file. Replace this file and 
   let us know.
 * Regards,
    moksha.
 *  Thread Starter [mysticminimalistartisan](https://wordpress.org/support/users/mysticminimalistartisan/)
 * (@mysticminimalistartisan)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/hide-shipping-address/#post-15755076)
 * Nope, it still isn’t gone.
 *  [Moksha Shah](https://wordpress.org/support/users/mokshasharmila13/)
 * (@mokshasharmila13)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/hide-shipping-address/#post-15755092)
 * Hi [@mysticminimalistartisan](https://wordpress.org/support/users/mysticminimalistartisan/),
 * Please remove all the changes which you have done before and replace the file.
   We are sharing the screenshot. You can directly remove or comment on the whole
   code of ‘shipping address’ from the file print-content.php. Please check once
   again and let us know.
 * Please download the file once again and replace it.
 * Screenshot:- [https://prnt.sc/mOk8tpKGeihu](https://prnt.sc/mOk8tpKGeihu)
 * File path:- woocommerce-delivery-notes/templates/print-order
    File:- [https://www.dropbox.com/s/elzpr1fbl9655xw/print-content.php?dl=0](https://www.dropbox.com/s/elzpr1fbl9655xw/print-content.php?dl=0)
 * Please take a backup of the existing plugin before you replace the above files.
 * Regards,
    Moksha.
    -  This reply was modified 3 years, 12 months ago by [Moksha Shah](https://wordpress.org/support/users/mokshasharmila13/).
    -  This reply was modified 3 years, 12 months ago by [Moksha Shah](https://wordpress.org/support/users/mokshasharmila13/).
 *  Thread Starter [mysticminimalistartisan](https://wordpress.org/support/users/mysticminimalistartisan/)
 * (@mysticminimalistartisan)
 * [3 years, 12 months ago](https://wordpress.org/support/topic/hide-shipping-address/#post-15755127)
 * Are you talking about removing the code you gave me for functions.php? If you
   are, I had already done that before.
 * I downloaded the file again & uploaded it again but I am still seeing the shipping
   address. After uploading the file, I cleared my browser cache, cleared the cache
   in wordpress and I also regenerated the invoice e-mail from the order.
 * Here is a screenshot (I took out my clients billing address & phone): [https://drive.google.com/file/d/1ncyQx85WiwDbXpUU9IdQcq5qLhB-aePC/view?usp=sharing](https://drive.google.com/file/d/1ncyQx85WiwDbXpUU9IdQcq5qLhB-aePC/view?usp=sharing)
    -  This reply was modified 3 years, 12 months ago by [mysticminimalistartisan](https://wordpress.org/support/users/mysticminimalistartisan/).

Viewing 15 replies - 1 through 15 (of 42 total)

1 [2](https://wordpress.org/support/topic/hide-shipping-address/page/2/?output_format=md)
[3](https://wordpress.org/support/topic/hide-shipping-address/page/3/?output_format=md)
[→](https://wordpress.org/support/topic/hide-shipping-address/page/2/?output_format=md)

The topic ‘Hide Shipping Address’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce-delivery-notes/assets/icon-256x256.jpg?rev=2829362)
 * [Print Invoice & Delivery Notes for WooCommerce](https://wordpress.org/plugins/woocommerce-delivery-notes/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-delivery-notes/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-delivery-notes/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-delivery-notes/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-delivery-notes/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-delivery-notes/reviews/)

 * 42 replies
 * 2 participants
 * Last reply from: [mysticminimalistartisan](https://wordpress.org/support/users/mysticminimalistartisan/)
 * Last activity: [3 years, 12 months ago](https://wordpress.org/support/topic/hide-shipping-address/page/3/#post-15763610)
 * Status: resolved