woocommerce_order_item_quantity_html
Использование
add_filter( 'woocommerce_order_item_quantity_html', 'wp_kama_woocommerce_order_item_quantity_html_filter', 10, 2 ); /** * Function for `woocommerce_order_item_quantity_html` filter-hook. * * @param $html * @param $item * * @return */ function wp_kama_woocommerce_order_item_quantity_html_filter( $html, $item ){ // filter... return $html; }
- $html
- -
- $item
- -
Где вызывается хук
woocommerce_order_item_quantity_html
woocommerce/src/Blocks/BlockTypes/OrderConfirmation/Totals.php 145-149
$item_qty = apply_filters( 'woocommerce_order_item_quantity_html', '<strong class="product-quantity">' . sprintf( '× %s', $qty_display ) . '</strong>', $item );
woocommerce/templates/order/order-details-item.php 44
echo apply_filters( 'woocommerce_order_item_quantity_html', ' <strong class="product-quantity">' . sprintf( '× %s', $qty_display ) . '</strong>', $item ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
woocommerce/templates/checkout/form-pay.php 52
<td class="product-quantity"><?php echo apply_filters( 'woocommerce_order_item_quantity_html', ' <strong class="product-quantity">' . sprintf( '× %s', esc_html( $item->get_quantity() ) ) . '</strong>', $item ); ?></td><?php // @codingStandardsIgnoreLine ?>