Skip to content

Commit

Permalink
feat(modal-checkout): display item name on success
Browse files Browse the repository at this point in the history
  • Loading branch information
adekbadek committed Nov 15, 2023
1 parent 9d4d6c3 commit a3a03df
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/modal-checkout/templates/thankyou.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ function newspack_blocks_replace_login_with_order_summary() {
return;
}

$is_success = ! $order->has_status( 'failed' );
$is_success = ! $order->has_status( 'failed' );
$order_item_name = array_values( $order->get_items() )[0]->get_name();

?>

Expand Down Expand Up @@ -79,6 +80,11 @@ function newspack_blocks_replace_login_with_order_summary() {
</li>
<?php endif; ?>

<li>
<?php esc_html_e( 'Item:', 'newspack-blocks' ); ?>
<strong><?php echo esc_html( $order_item_name ); ?></strong>
</li>

<li class="woocommerce-order-overview__order order">
<?php esc_html_e( 'Transaction:', 'newspack-blocks' ); ?>
<strong><?php echo $order->get_order_number(); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></strong>
Expand Down

0 comments on commit a3a03df

Please sign in to comment.