woocommerce_order_item_name
Использование
add_filter( 'woocommerce_order_item_name', 'wp_kama_woocommerce_order_item_name_filter', 10, 3 ); /** * Function for `woocommerce_order_item_name` filter-hook. * * @param $sprintf() * @param $item * @param $is_visible * * @return */ function wp_kama_woocommerce_order_item_name_filter( $sprintf(), $item, $is_visible ){ // filter... return $sprintf(); }
- $sprintf()
- -
- $item
- -
- $is_visible
- -
Где вызывается хук
woocommerce_order_item_name
woocommerce_order_item_name
woocommerce/src/Blocks/BlockTypes/OrderConfirmation/Totals.php 135-140
$item_name = apply_filters( 'woocommerce_order_item_name', $product_permalink ? sprintf( '<a href="%s">%s</a>', $product_permalink, $item->get_name() ) : $item->get_name(), $item, $is_visible );
woocommerce/includes/class-wc-structured-data.php 522
'name' => wp_kses_post( apply_filters( 'woocommerce_order_item_name', $item->get_name(), $item, $is_visible ) ),
woocommerce/templates/order/order-details-item.php 33
echo wp_kses_post( apply_filters( 'woocommerce_order_item_name', $product_permalink ? sprintf( '<a href="%s">%s</a>', $product_permalink, $item->get_name() ) : $item->get_name(), $item, $is_visible ) );
woocommerce/templates/emails/plain/email-order-items.php 34
echo wp_kses_post( apply_filters( 'woocommerce_order_item_name', $item->get_name(), $item, false ) );
woocommerce/templates/emails/email-order-items.php 50
echo wp_kses_post( apply_filters( 'woocommerce_order_item_name', $item->get_name(), $item, false ) );
woocommerce/templates/checkout/form-pay.php 43
echo wp_kses_post( apply_filters( 'woocommerce_order_item_name', $item->get_name(), $item, false ) );