• Resolved laoyingzhige

    (@laoyingzhige)


    For guest orders, they don’t enter email, only enter name and phone number. How to edit shortcode: Enter name and phone number to tracking order?

    thank you❤️

    • This topic was modified 6 years, 8 months ago by laoyingzhige.
    • This topic was modified 6 years, 8 months ago by laoyingzhige.
    • This topic was modified 6 years, 8 months ago by laoyingzhige.
    • This topic was modified 6 years, 8 months ago by laoyingzhige.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter laoyingzhige

    (@laoyingzhige)

    At the same time, tracking the guest order,how can display the order name, address and other details at the same time?

    Howdy @laoyingzhige,

    That’s a great question. If this was my site, I would approach this by copying the tracking shortcode and making a modified version that searches by the phone number instead. Here’s the file that creates the shortcode:

    https://github.com/woocommerce/woocommerce/blob/d0491072e8a7d0a4535db0ec2bae4a6d43ff64fd/includes/shortcodes/class-wc-shortcode-order-tracking.php

    You can duplicate it in your theme and change it so it loads by phone number instead of email. You’d also want to copy over the tracking form and save it as a new form that has a field for the phone number.

    It may be a bit tricky to match these since WooCommerce has a bit of latitude when it comes to the format of phone numbers. I haven’t tested it, but I’m not sure if searching for (888) 867-5309 would match an order with a number of 888 867-5309.

    If you need help creating that, you can hire a freelancer at codeable to make that for you.

    Take care

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘❤️ Edit shortcode [woocommerce_order_tracking] to enter name and phone number?’ is closed to new replies.