woocommerce_email_order_item_quantity
Использование
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 $item_quantity * @param $item * * @return */ function wp_kama_woocommerce_email_order_item_quantity_filter( $item_quantity, $item ){ // filter... return $item_quantity; }
- $item_quantity
- -
- $item
- -
Где вызывается хук
woocommerce_email_order_item_quantity
woocommerce/includes/class-wc-structured-data.php 511
'value' => apply_filters( 'woocommerce_email_order_item_quantity', $item->get_quantity(), $item ),
woocommerce/templates/emails/plain/email-order-items.php 38
echo ' X ' . apply_filters( 'woocommerce_email_order_item_quantity', $item->get_quantity(), $item );
woocommerce/templates/emails/email-order-items.php 82
echo wp_kses_post( apply_filters( 'woocommerce_email_order_item_quantity', $qty_display, $item ) );