Woocommerce 如何在woommerce结账页面上添加删除产品图标(x)?

Woocommerce 如何在woommerce结账页面上添加删除产品图标(x)?,woocommerce,Woocommerce,我想在woommerce结帐页面产品上添加一个删除产品图标(x),因为我要直接将用户发送到结帐页面,避免使用购物车页面。所以我想要的是,用户仍然可以选择删除他们不想要的任何产品 谢谢。 Pepe在和部分中添加以下代码到review-order.php 在和部分中向review-order.php添加以下代码 Add the following code to review-order.php in <thead> and <tbody> sections <th

我想在woommerce结帐页面产品上添加一个删除产品图标(x),因为我要直接将用户发送到结帐页面,避免使用购物车页面。所以我想要的是,用户仍然可以选择删除他们不想要的任何产品

谢谢。 Pepe

在和部分中添加以下代码到review-order.php
在和部分中向review-order.php添加以下代码
Add the following code to review-order.php in <thead> and <tbody> sections

<thead>

<tr>

<th class="product-remove"><?php _e( 'Remove', 'woocommerce' ); ?></th>

</tr>

</thead>

<tbody>

<td class="product-remove">

<?php

echo apply_filters( 'woocommerce_cart_item_remove_link', sprintf(

'<a href="%s" class="remove" aria-label="%s" data-product_id="%s" data-product_sku="%s">&times;</a>',

esc_url( WC()->cart->get_remove_url( $cart_item_key ) ),

__( 'Remove this item', 'woocommerce' ),

esc_attr( $product_id ),

esc_attr( $_product->get_sku() )

), $cart_item_key );

?>

</tbody>