• I know how to get and place the “view order” link onto various places within an order status page or email…but what about outside of those scenarios? I sell custom graphic designs for printing and have created a custom post type to generate preview pages for approvals. I’d like to include a link back to their order. I know I could just use a custom field and past that in, but I’d like to see if there is a more automatic and elegant solution.

    I use the order number as the page slug. Ideally, it’d be awesome if I could just call that page slug and have it create a link back to the order. The order numbers are nowhere in the order page URL…so it isn’t as easy as outputting it like that. Can anyone think of something that would work? My goal is to make these preview/approval pages as automatic as possible.

    https://wordpress.org/plugins/woocommerce/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mike Jolley (a11n)

    (@mikejolley)

    View order links use IDs:

    /my-account/view-order/1395/

    You need to know the ID to view each order. Do you record this?

    Thread Starter Kahil

    (@kahil)

    As stated in my post, I know that they use IDs. Of course they get recorded, there’s no way to use WooCommerce without doing so. I’m looking for a programmatic way to output the URL so it is automatic and I don’t have to search, copy and paste. The IDs have no set pattern to them like order numbers do.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘View Order Link outside of order?’ is closed to new replies.