My Account Order view page in WooCommerce

My Account Order view page in WooCommerce

  1. Code goes in the function.php file of your active child theme (or active theme). Tested and works.
add_action( 'woocommerce_view_order', 'my_custom_tracking' );
function my_custom_tracking( $order_id ){
    // Get an instance of the `WC_Order` Object
    $order = wc_get_order( $order_id );
    // Get the order number
    $order_number  = $order->get_order_number();
    // Get the formatted order date created
    $date_created  = wc_format_datetime( $order->get_date_created() );
    // Get the order status name
    $status_name  = wc_get_order_status_name( $order->get_status() );
    // Display the order status 
    echo '<p>' . __("Order Status:") . ' ' . $status_name . '</p>';

If you want to change the yellow underline texts.

you will have to make changes to myaccount/view-order.php template file.

First, read official documentation to understand “how to Override templates via a theme”.

Once done and once copied WooCommerce templates to your active theme as explained in the documentation, open the edit myaccount/view-order.php template file.

The changes to make are located in lines from 26 to 34:

     /* translators: 1: order number 2: order date 3: order status */
         __( 'Order #%1$s was placed on %2$s and is currently %3$s.', 'woocommerce' ),
         '<mark class="order-number">' . $order->get_order_number() . '</mark>',
         '<mark class="order-date">' . wc_format_datetime( $order->get_date_created() ) . '</mark>',
         '<mark class="order-status">' . wc_get_order_status_name( $order->get_status() ) . '</mark>'

Some other services we provide include:-

  1. PPC (Pay Per Click Advertising)
  2. Social media marketing
  3. Content marketing 
  4. SEO(Search Engine Optimization)
  5. Web design & development
  6. Online reputation management
  7. Voice search SEO
  8. Email/Mobile Marketing
  9. Youtube SEO Optimization
  10. Local SEO
  11. E-commerce SEO Services
  12. Graphic design for Social media
  13. ASO App Store Optimization

When You’re ready to jump in Feel Free to Contact Us or Call Us:- +918053760913