• Resolved bradstreet14

    (@bradstreet14)


    I’m trying to modify the view-order page of a specific order. The web address would be something like:

    https://www.edventurelearning.com/my-account/view-order/244/

    The page lists the status of the order, the order details, customer details, and then the billing address. I’d like to remove the billing address section since I don’t collect the data and all the payments are done through paypal.

    I’m having trouble figuring out how to get rid of the Billing Address field from showing up on the page. (I’ve already removed the field from the checkout process). view-order.php is the file that creates the page and I can modify it but the code that creates all the order detail sections is lumped into:
    do_action( ‘woocommerce_view_order’, $order_id );

    I’ve found the woocommerce_view_order function which is called by woocommerce_order_details_table which is called by wc_get_template. At that point I get lost and I figure there has to be an easier way to modify what is displayed. All I need to do is remove the Billing Address section.

    Thanks for any help.

    https://www.ads-software.com/plugins/woocommerce/

Viewing 3 replies - 1 through 3 (of 3 total)
  • An easier way is to hide it using custom css. I can’t see your view order page as I’m not a customer and haven’t bought anything, but on my site I would use:

    .woocommerce-view-order .woocommerce header.title,
    .woocommerce-view-order .woocommerce address
    {display:none}

    Not very subtle but at least there is no need to maintain a custom version of the relevant template.

    Thread Starter bradstreet14

    (@bradstreet14)

    That did the trick! Thank you very much.

    Hello,

    I had the same problem and I added the custom CSS and it worked perfectly. However, the Header “My Addresses” is still there, whenever I try to add a custom CSS to remove it, it gets removed from all the other pages as well, I only want to remove it from teh view order page. Any help on this?

    Thanks,
    Hashim

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Remove Fields from the View-Order page’ is closed to new replies.