woocommerce_email_order_item_quantity
Email Order Item Quantity hook.
Использование
add_filter( 'woocommerce_email_order_item_quantity', 'wp_kama_woocommerce_email_order_item_quantity_filter', 10, 2 ); /** * Function for `woocommerce_email_order_item_quantity` filter-hook. * * @param int $quantity Item quantity. * @param WC_Order_Item $item Item object. * * @return int */ function wp_kama_woocommerce_email_order_item_quantity_filter( $quantity, $item ){ // filter... return $quantity; }
- $quantity(int)
- Item quantity.
- $item(WC_Order_Item)
- Item object.
Список изменений
С версии 2.4.0 | Введена. |
Где вызывается хук
woocommerce_email_order_item_quantity
woocommerce/templates/emails/plain/email-order-items.php 55
$product_name .= ' × ' . apply_filters( 'woocommerce_email_order_item_quantity', $item->get_quantity(), $item );
woocommerce/templates/emails/plain/email-order-items.php 84
echo ' X ' . apply_filters( 'woocommerce_email_order_item_quantity', $item->get_quantity(), $item );
woocommerce/templates/emails/email-order-items.php 203
echo wp_kses_post( apply_filters( 'woocommerce_email_order_item_quantity', $qty_display, $item ) );
woocommerce/includes/class-wc-structured-data.php 621
'value' => apply_filters( 'woocommerce_email_order_item_quantity', $item->get_quantity(), $item ),