Add docblocks to woocommerce_order_tracking_form hooks.

This commit is contained in:
Jorge A. Torres 2022-04-05 13:55:25 -03:00
parent 28a5f7866b
commit 680ad9ceb8
1 changed files with 20 additions and 14 deletions

View File

@ -21,35 +21,41 @@ global $post;
?>
<form action="<?php echo esc_url( get_permalink( $post->ID ) ); ?>" method="post" class="woocommerce-form woocommerce-form-track-order track_order">
<?php
<?php
/**
* Hook: woocommerce_order_tracking_form_start.
* Action hook fired at the beginning of the form-tracking form.
*
* @since 6.5.0
*/
do_action( '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
<?php
/**
* Hook: woocommerce_order_tracking_form.
* Action hook fired in the middle of the form-tracking form (before the submit button).
*
* @since 6.5.0
*/
do_action( '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
<?php
/**
* Hook: woocommerce_order_tracking_form_end.
* Action hook fired at the end of the form-tracking form (after the submit button).
*
* @since 6.5.0
*/
do_action( 'woocommerce_order_tracking_form_end' );
do_action( 'woocommerce_order_tracking_form_end' );
?>
</form>