Update form-tracking.php

This commit is contained in:
erikdemarco 2022-03-24 07:07:27 +07:00 committed by Jorge A. Torres
parent be8e0744e5
commit 28a5f7866b
1 changed files with 22 additions and 5 deletions

View File

@ -21,18 +21,35 @@ global $post;
?>
<form action="<?php echo esc_url( get_permalink( $post->ID ) ); ?>" method="post" class="woocommerce-form woocommerce-form-track-order track_order">
<?php do_action( 'woocommerce_order_tracking_form_start' ); ?>
<?php
/**
* Hook: woocommerce_order_tracking_form_start.
*/
do_action( 'woocommerce_order_tracking_form_start' );
?>
<p><?php esc_html_e( 'To track your order please enter your Order ID in the box below and press the "Track" button. This was given to you on your receipt and in the confirmation email you should have received.', 'woocommerce' ); ?></p>
<p class="form-row form-row-first"><label for="orderid"><?php esc_html_e( 'Order ID', 'woocommerce' ); ?></label> <input class="input-text" type="text" name="orderid" id="orderid" value="<?php echo isset( $_REQUEST['orderid'] ) ? esc_attr( wp_unslash( $_REQUEST['orderid'] ) ) : ''; ?>" placeholder="<?php esc_attr_e( 'Found in your order confirmation email.', 'woocommerce' ); ?>" /></p><?php // @codingStandardsIgnoreLine ?>
<p class="form-row form-row-last"><label for="order_email"><?php esc_html_e( 'Billing email', 'woocommerce' ); ?></label> <input class="input-text" type="text" name="order_email" id="order_email" value="<?php echo isset( $_REQUEST['order_email'] ) ? esc_attr( wp_unslash( $_REQUEST['order_email'] ) ) : ''; ?>" placeholder="<?php esc_attr_e( 'Email you used during checkout.', 'woocommerce' ); ?>" /></p><?php // @codingStandardsIgnoreLine ?>
<div class="clear"></div>
<?php do_action( 'woocommerce_order_tracking_form' ); ?>
<?php
/**
* Hook: woocommerce_order_tracking_form.
*/
do_action( 'woocommerce_order_tracking_form' );
?>
<p class="form-row"><button type="submit" class="button" name="track" value="<?php esc_attr_e( 'Track', 'woocommerce' ); ?>"><?php esc_html_e( 'Track', 'woocommerce' ); ?></button></p>
<?php wp_nonce_field( 'woocommerce-order_tracking', 'woocommerce-order-tracking-nonce' ); ?>
<?php do_action( 'woocommerce_order_tracking_form_end' ); ?>
<?php
/**
* Hook: woocommerce_order_tracking_form_end.
*/
do_action( 'woocommerce_order_tracking_form_end' );
?>
</form>